Bug 1067930

Summary: File creation on cifs mount of a gluster volume fails
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Raghavendra Talur <rtalur>
Component: glusterfs-develAssignee: Raghavendra Talur <rtalur>
Status: CLOSED UPSTREAM QA Contact: Sudhir D <sdharane>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.0CC: gluster-bugs, grajaiya, nlevinki, nsathyan, pgurusid, rhs-bugs, vbellur, vraman
Target Milestone: ---   
Target Release: RHGS 3.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1066837 Environment:
Last Closed: 2014-02-28 07:21:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1066837    
Bug Blocks:    

Description Raghavendra Talur 2014-02-21 12:10:52 UTC
+++ This bug was initially created as a clone of Bug #1066837 +++

Description of problem:
Create, write of any file fails on a cifs mount of a gluster volume.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Cifs mount a gluster volume
2. Echo to a new file fails


Actual results:
[root@vm2 cifs]# echo "kjdshjfds" > test
-bash: test: Cannot allocate memory
[root@vm2 cifs]# 


Expected results:


Additional info:
This is a regression caused by the patch http://review.gluster.org/#/c/6931/

--- Additional comment from Anand Avati on 2014-02-19 03:57:30 EST ---

REVIEW: http://review.gluster.org/7125 (libgfapi: In glfs_resolve_at(), do not overrite the previous return value.) posted (#1) for review on master by Poornima G (pgurusid)

--- Additional comment from Anand Avati on 2014-02-19 04:15:06 EST ---

REVIEW: http://review.gluster.org/7125 (libgfapi: In glfs_resolve_at(), do not override the previous return value.) posted (#2) for review on master by Poornima G (pgurusid)

--- Additional comment from Anand Avati on 2014-02-19 20:10:06 EST ---

COMMIT: http://review.gluster.org/7125 committed in master by Anand Avati (avati) 
------
commit ff0cd7c4e326d848d5fa6591c7cc8ce54711d2d7
Author: Poornima G <pgurusid>
Date:   Wed Feb 19 14:12:29 2014 +0530

    libgfapi: In glfs_resolve_at(), do not override the previous return value.
    
    Overriding ret to contain glfs_loc_touchup()s' return value implies that
    if glfs_loc_touchup() is successful, glfs_resolve_at() is also successful
    which is not necessarily true. This was causing glfs_resolve_at() to
    succeed even if it couldn't resolve, thus create and other fops would
    fail. Hence overriding ret only if glfs_loc_touchup() fails.
    
    Change-Id: I0804afbd120b3798abe07e870bfc40bf162bc289
    BUG: 1066837
    Signed-off-by: Poornima G <pgurusid>
    Reviewed-on: http://review.gluster.org/7125
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 2 Raghavendra Talur 2014-02-21 12:34:45 UTC
Patch posted at https://code.engineering.redhat.com/gerrit/#/c/20150/