diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2014-07-03 17:13:38 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-07-16 02:27:50 -0700 |
commit | 1dea949cb60c3814c9206df6ba8dddec8d471a94 (patch) | |
tree | 4685ce644e5d4f813eb4dd9309b7b335e20ffd6c /xlators/features/snapview-client | |
parent | dcc1696045f12127ff37e6312a04c0024c8a4e24 (diff) |
make snapview-server more compatible with NFS server
* There was no handle based API for listxattr. With this change, glfs_h_getxattrs
also handles the listxattr functionality by checking whether the name is NULL
or not (like posix). But all the gfapi functions for listxattr
(glfs_h_getxattrs AND glfs_listxattr AND glfs_flistxattr) returns the names of
the xattrs in a buffer provided by the caller. But snapview-server has to
return the list of xattrs in a dict itself (similar to posix xlator). But
the buffer just contains the names of the xattrs. So for each xattr, a zero
byte value is set (i.e. "") into the dict and sent back. Translators which
do xattr caching (as of now md-cache which caches selinux and acl related
xattrs) should not cache those xattrs whose value is a zero byte data ("").
So made changes in md-cache to ignore zero byte values.
* NFS server was not linking the inodes to inode table in readdirp. This was
leading to applications getting errors. The below set of operations would
lead to applications getting error
1) ls -l in one of the snaopshots (snapview-server would generate gfids for
each entry on the fly and link the inodes associated with those entries)
2) NFS server upon getting readdirp reply would not link the inodes of the
entries. But it used to generate filehandles for each entry and associate
the gfid of that entry with the filehandle and send it as part of the
reply to nfs client.
3) NFS client would send the filehandle of one of those entries when some
activity is done on it.
4) NFS server would not be able to find the inode for the gfid present in the
filehandle (as the inode was not linked) and would go for hard resolution
by sending a lookup on the gfid by creating a new inode.
5) snapview-client will not able to identify whether the inode is a real inode
existing in the main volume or a virtual inode existing in the snapshots
as there would not be any inode context.
6) Since the gfid upon which lookup is sent is a virtual gfid which is not
present in the disk, lookup would fail and the application would get an
error.
To handle above situation, now nfs server also does inode linking in readdirp.
Change-Id: Ibb191408347b6b5f21cff72319ccee619ea77bcd
BUG: 1115949
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/8230
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/snapview-client')
-rw-r--r-- | xlators/features/snapview-client/src/snapview-client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c index 344a8c9562a..ad022101715 100644 --- a/xlators/features/snapview-client/src/snapview-client.c +++ b/xlators/features/snapview-client/src/snapview-client.c @@ -161,6 +161,7 @@ svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, do_unwind = _gf_false; } } + gf_log (this->name, GF_LOG_WARNING, "Lookup on normal graph failed"); goto out; |