diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2014-11-28 18:08:53 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-01-08 01:41:20 -0800 |
commit | 89c2cc5ddb21f337fe66629fefe7230facbf9d7e (patch) | |
tree | d6ec464b64882144926a113543d315a2630e067c /xlators/features/snapview-client/src/snapview-client.h | |
parent | ea25ad8762bf40698f92567c273cfb8daebd6513 (diff) |
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 <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/9218
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/9344
Diffstat (limited to 'xlators/features/snapview-client/src/snapview-client.h')
-rw-r--r-- | xlators/features/snapview-client/src/snapview-client.h | 18 |
1 files changed, 17 insertions, 1 deletions
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__ */ |