From 89c2cc5ddb21f337fe66629fefe7230facbf9d7e Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Fri, 28 Nov 2014 18:08:53 +0530 Subject: features/snapview-client: handle readdir requests differently for samba. * For samba export, the entry point is also added to the readdir response. Change-Id: I825c017e0f16db1f1890bb56e086f36e6558a1c2 BUG: 1175742 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/9218 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur Signed-off-by: Sachin Pandit Reviewed-on: http://review.gluster.org/9344 --- xlators/features/snapview-client/src/snapview-client.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'xlators/features/snapview-client/src/snapview-client.h') diff --git a/xlators/features/snapview-client/src/snapview-client.h b/xlators/features/snapview-client/src/snapview-client.h index 000490393c1..9973458884b 100644 --- a/xlators/features/snapview-client/src/snapview-client.h +++ b/xlators/features/snapview-client/src/snapview-client.h @@ -25,6 +25,9 @@ struct __svc_local { loc_t loc; xlator_t *subvolume; + fd_t *fd; + void *cookie; + dict_t *xdata; }; typedef struct __svc_local svc_local_t; @@ -81,10 +84,19 @@ svc_local_free (svc_local_t *local); } while (0); struct svc_private { - char *path; //might be helpful for samba + char *path; + char *special_dir; /* needed for samba */ + gf_boolean_t show_entry_point; }; typedef struct svc_private svc_private_t; +struct svc_fd { + off_t last_offset; + gf_boolean_t entry_point_handled; + gf_boolean_t special_dir; +}; +typedef struct svc_fd svc_fd_t; + typedef enum { NORMAL_INODE = 1, VIRTUAL_INODE @@ -107,4 +119,8 @@ svc_inode_ctx_set (xlator_t *this, inode_t *inode, int inode_type); void svc_local_free (svc_local_t *local); +gf_boolean_t +svc_readdir_on_special_dir (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, + gf_dirent_t *entries, dict_t *xdata); #endif /* __SNAP_VIEW_CLIENT_H__ */ -- cgit