Bug 762313 (GLUSTER-581) - posix_open does not report open(2) failures correctly
Summary: posix_open does not report open(2) failures correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-581
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Vikas Gorur
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-01 19:32 UTC by Jeff Darcy
Modified: 2015-12-01 16:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTP
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
Set op_ret when open fails (513 bytes, text/plain)
2010-02-01 16:32 UTC, Jeff Darcy
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.