Bug 762313 (GLUSTER-581)

Summary: posix_open does not report open(2) failures correctly
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: posixAssignee: Vikas Gorur <vikas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: anush, fharshav, gluster-bugs, shehjart, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Set op_ret when open fails none

Description Jeff Darcy 2010-02-01 19:32:49 UTC
Multiple kinds of failures will set op_ret correctly, but a failure on the open itself only sets _fd, not op_ret.  Thus, callers who check for failures by checking op_ret might not see them.  The attached patch fixes this.

Comment 1 Anand Avati 2010-02-02 09:51:51 UTC
PATCH: http://patches.gluster.com/patch/2725 in master (storage/posix: Set op_ret to -1 when open fails.)

Comment 2 Anand Avati 2010-02-06 13:44:16 UTC
PATCH: http://patches.gluster.com/patch/2726 in release-2.0 (storage/posix: Set op_ret to -1 when open fails.)

Comment 3 Shehjar Tikoo 2010-02-16 02:41:31 UTC
Err..regression test is required. I hit this when a open(2) is called for a directory without the O_DIRECTORY flag.