diff options
author | Raghavendra G <raghavendra@zresearch.com> | 2009-06-10 07:01:45 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-06-30 14:36:25 -0700 |
commit | 84a3008991235a14291706e5dbdaa2e5767b8f32 (patch) | |
tree | 5b8cd1ed6b47e0c454968274e3dca780ee8f7617 /libglusterfsclient/src/libglusterfsclient.h | |
parent | f8cacccf10dc3f52c4d2e73d7408394eed8664e3 (diff) |
libglusterfsclient: implement glusterfs_fcntl.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.h')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.h b/libglusterfsclient/src/libglusterfsclient.h index 7ce7288f8..795857c9c 100755 --- a/libglusterfsclient/src/libglusterfsclient.h +++ b/libglusterfsclient/src/libglusterfsclient.h @@ -1277,6 +1277,32 @@ ssize_t glusterfs_sendfile (int out_fd, glusterfs_file_t in_fd, off_t *offset, size_t count); +/* manipulate file descriptor + * This api can have 3 forms similar to fcntl(2). + * + * int + * glusterfs_fcntl (glusterfs_file_t fd, int cmd) + * + * int + * glusterfs_fcntl (glusterfs_file_t fd, int cmd, long arg) + * + * int + * glusterfs_fcntl (glusterfs_file_t fd, int cmd, struct flock *lock) + * + * @fd : file handle returned by glusterfs_open or glusterfs_create. + * @cmd : Though the aim is to implement all possible commands supported by + * fcntl(2), currently following commands are supported. + * F_SETLK, F_SETLKW, F_GETLK - used to acquire, release, and test for + * the existence of record locks (also + * known as file-segment or file-region + * locks). More detailed explanation is + * found in 'man 2 fcntl' + */ + +int +glusterfs_fcntl (glusterfs_file_t fd, int cmd, ...); + + /* FIXME: review the need for these apis */ /* added for log related initialization in booster fork implementation */ void |