Bug 1102989 - [libgfapi] glfs_open doesn't works for O_CREAT flag
Summary: [libgfapi] glfs_open doesn't works for O_CREAT flag
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Ric Wheeler
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks: 1103004
TreeView+ depends on / blocked
 
Reported: 2014-05-30 02:53 UTC by SATHEESARAN
Modified: 2014-07-04 08:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
As of glusterfs 3.5, glfs_open() does not support O_CREAT as documented here: https://github.com/gluster/glusterfs/blob/release-3.5/api/src/glfs.h#L362
Clone Of:
: 1103004 (view as bug list)
Environment:
Last Closed: 2014-07-04 08:58:56 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description SATHEESARAN 2014-05-30 02:53:07 UTC
Description of problem:
-----------------------
glfs_open doesn't recognize the O_CREAT flag as the open system call and hence
call to create new files with glfs_open() fails

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

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. use glfs_open() with O_CREAT flag to create a new file and to open it

Actual results:
---------------
glfs_open() fails with error message, "No such file or directory"

Expected results:
------------------
glfs_open() should create a file, if issued with O_CREAT flag


Additional info:
-----------------
Code snippet from the C program which uses libgfapi
<snip>

fd2 = glfs_open(fs1, file, O_WRONLY|O_SYNC|O_CREAT);
    if( fd2 == NULL ) {
        printf( "Error: %s\n",strerror(errno) );
        close( fd1 );
    }

</snip>


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