From 5dcbc0563f10cf68db2af10665953425ed262906 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 10 Jun 2009 07:01:45 +0000 Subject: libglusterfsclient: implement glusterfs_fcntl. Signed-off-by: Anand V. Avati --- libglusterfsclient/src/libglusterfsclient.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'libglusterfsclient/src/libglusterfsclient.h') diff --git a/libglusterfsclient/src/libglusterfsclient.h b/libglusterfsclient/src/libglusterfsclient.h index 7ce7288f..795857c9 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 -- cgit