summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-06-10 07:01:45 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-11 07:29:01 -0700
commit5dcbc0563f10cf68db2af10665953425ed262906 (patch)
tree82243b39a421da97eba3d9b652d12272e4739456 /libglusterfsclient/src/libglusterfsclient.h
parent8ebb4499d0bf568ea58562708f8baaedfe9fa58a (diff)
libglusterfsclient: implement glusterfs_fcntl.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.h')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.h26
1 files changed, 26 insertions, 0 deletions
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