diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2017-07-03 12:45:38 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-07-09 04:57:48 +0000 |
commit | 70a5dfdea4980dea5da5b5008a16fd155a3adf34 (patch) | |
tree | abe5e3198095ee5535332fbffa015e222153f136 /xlators/features/snapview-client/src/snapview-client.h | |
parent | ecd92d42bbd9249aa637b1ad3000aa242308cb04 (diff) |
svc: send revalidate lookup on special dir
.snaps directory is a virtual direcotory, that doesn't
exist on the backend. Even though it is a special dentry,
it doesn't have a dedicated inode. So the inode number is
always random. Which means it will get different inode
number when reboot happens on snapd process.
Now with windows client the show-direcotry feature requires
a lookup on the .snpas direcoty post readdirp on root.
If the snapd restarted after a lookup, then subsequent lookup
will fail, because linked inode will be stale.
This patch will do a revalidate lookup with a new inode.
Change-Id: If97c07ecb307cefe7c86be8ebd05e28cbf678d1f
BUG: 1467513
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: https://review.gluster.org/17690
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/features/snapview-client/src/snapview-client.h')
-rw-r--r-- | xlators/features/snapview-client/src/snapview-client.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/features/snapview-client/src/snapview-client.h b/xlators/features/snapview-client/src/snapview-client.h index 5b7a862cf3f..e1fcb371e8c 100644 --- a/xlators/features/snapview-client/src/snapview-client.h +++ b/xlators/features/snapview-client/src/snapview-client.h @@ -23,6 +23,7 @@ struct __svc_local { fd_t *fd; void *cookie; dict_t *xdata; + uint16_t revalidate; }; typedef struct __svc_local svc_local_t; @@ -94,4 +95,7 @@ typedef enum { VIRTUAL_INODE } inode_type_t; +int +gf_svc_special_dir_revalidate_lookup (call_frame_t *frame, xlator_t *this); + #endif /* __SNAP_VIEW_CLIENT_H__ */ |