summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c19
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.h13
2 files changed, 32 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 3321630d80e..b4a7e6e546a 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -6449,6 +6449,25 @@ out:
return;
}
+void
+glusterfs_seekdir (glusterfs_dir_t dirfd, off_t offset)
+{
+ libglusterfs_client_fd_ctx_t *fd_ctx = NULL;
+
+ fd_ctx = libgf_get_fd_ctx ((fd_t *)dirfd);
+ if (!fd_ctx)
+ goto out;
+
+ pthread_mutex_lock (&fd_ctx->lock);
+ {
+ fd_ctx->offset = offset;
+ }
+ pthread_mutex_unlock (&fd_ctx->lock);
+
+out:
+ return;
+}
+
static struct xlator_fops libgf_client_fops = {
};
diff --git a/libglusterfsclient/src/libglusterfsclient.h b/libglusterfsclient/src/libglusterfsclient.h
index ccf115f1eaf..70c6669dc05 100755
--- a/libglusterfsclient/src/libglusterfsclient.h
+++ b/libglusterfsclient/src/libglusterfsclient.h
@@ -1204,6 +1204,19 @@ glusterfs_lchown (const char *path, uid_t owner, gid_t group);
*/
void
glusterfs_rewinddir (glusterfs_dir_t dirfd);
+
+
+
+/* Seek to the given offset in the directory handle.
+ *
+ * @dirfd : Directory handle returned by glusterfs_open on
+ * glusterfs_opendir.
+ * @offset : The offset to seek to.
+ *
+ * Returns no value.
+ */
+void
+glusterfs_seekdir (glusterfs_dir_t dirfd, off_t offset);
/* FIXME: review the need for these apis */
/* added for log related initialization in booster fork implementation */
void