diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2015-06-12 15:12:05 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-07-02 02:15:54 -0700 |
commit | c1a8ae20bd055227921d199b952582eca4104f67 (patch) | |
tree | 8e56a6c2c4da95d00212408e25171c7e0c800e9b /libglusterfs/src/inode.h | |
parent | e7f2547f89dbcd90cdb3714f63620a36bdc2ef3a (diff) |
libgfapi: send explicit lookups on inodes linked in readdirp
If the inode is linked via readdirp, then the consuners of gfapi which are using
handles (got either in lookup or readdirp) might not send an explicit lookup on
that object again (ex: NFS, samba, USS). If there is a replicate volume where
the replicas of the object are not in sync, then readdirp followed by fops might
lead data being served from the subvolume which is not in sync with latest
data. And since lookup is needed to trigger self-heal on that object the
consumers might keep getting wrong data until an explicit lookup is not done.
Fuse handles this situation by sending an explicit lookup by itself (fuse
xlator) on those inodes which are linked via readdirp, whenever a fop comes on
that inode.
The same procedure is done in gfapi as well to address this situation.
Thanks to shyam(srangana@redhat.com) for valuable inputs
Change-Id: I64f0591495dddc1dea7f8dc319f2558a7e342871
BUG: 1236009
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/11236
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'libglusterfs/src/inode.h')
-rw-r--r-- | libglusterfs/src/inode.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.h b/libglusterfs/src/inode.h index 3a7aa063920..633e771fc3d 100644 --- a/libglusterfs/src/inode.h +++ b/libglusterfs/src/inode.h @@ -267,4 +267,10 @@ inode_ctx_merge (fd_t *fd, inode_t *inode, inode_t *linked_inode); int inode_is_linked (inode_t *inode); +void +inode_set_need_lookup (inode_t *inode, xlator_t *this); + +gf_boolean_t +inode_needs_lookup (inode_t *inode, xlator_t *this); + #endif /* _INODE_H */ |