summaryrefslogtreecommitdiffstats
path: root/tests/basic/uss.t
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2014-07-03 17:13:38 +0530
committerVijay Bellur <vbellur@redhat.com>2014-07-16 02:27:50 -0700
commit1dea949cb60c3814c9206df6ba8dddec8d471a94 (patch)
tree4685ce644e5d4f813eb4dd9309b7b335e20ffd6c /tests/basic/uss.t
parentdcc1696045f12127ff37e6312a04c0024c8a4e24 (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 'tests/basic/uss.t')
-rw-r--r--tests/basic/uss.t50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/basic/uss.t b/tests/basic/uss.t
index 004395660b5..8c6a8982eea 100644
--- a/tests/basic/uss.t
+++ b/tests/basic/uss.t
@@ -101,27 +101,27 @@ TEST fd_close $fd3
# test 44
TEST mount_nfs $H0:/$V0 $N0 nolock;
-TEST ls $N0/.snaps;
+TEST ls -l $N0/.snaps;
NUM_SNAPS=$(ls $N0/.snaps | wc -l);
TEST [ $NUM_SNAPS == 4 ];
-TEST ls $N0/.snaps/snap1;
-TEST ls $N0/.snaps/snap2;
-TEST ls $N0/.snaps/snap3;
-TEST ls $N0/.snaps/snap4;
+TEST ls -l $N0/.snaps/snap1;
+TEST ls -l $N0/.snaps/snap2;
+TEST ls -l $N0/.snaps/snap3;
+TEST ls -l $N0/.snaps/snap4;
-TEST ls $N0/.snaps/snap3/dir1;
-TEST ls $N0/.snaps/snap3/dir2;
+TEST ls -l $N0/.snaps/snap3/dir1;
+TEST ls -l $N0/.snaps/snap3/dir2;
-TEST ls $N0/.snaps/snap4/dir1;
-TEST ls $N0/.snaps/snap4/dir2;
+TEST ls -l $N0/.snaps/snap4/dir1;
+TEST ls -l $N0/.snaps/snap4/dir2;
-TEST ! ls $N0/dir1/.snaps/snap1;
-TEST ! ls $N0/dir2/.snaps/snap2;
-TEST ls $N0/dir1/.snaps/snap3;
-TEST ls $N0/dir2/.snaps/snap4;
+TEST ! ls -l $N0/dir1/.snaps/snap1;
+TEST ! ls -l $N0/dir2/.snaps/snap2;
+TEST ls -l $N0/dir1/.snaps/snap3;
+TEST ls -l $N0/dir2/.snaps/snap4;
TEST fd1=`fd_available`
TEST fd_open $fd1 'r' $N0/.snaps/snap1/file1;
@@ -205,21 +205,21 @@ NUM_SNAPS=$(ls $N0/.history | wc -l);
TEST [ $NUM_SNAPS == 4 ];
-TEST ls $N0/.history/snap1;
-TEST ls $N0/.history/snap2;
-TEST ls $N0/.history/snap3;
-TEST ls $N0/.history/snap4;
+TEST ls -l $N0/.history/snap1;
+TEST ls -l $N0/.history/snap2;
+TEST ls -l $N0/.history/snap3;
+TEST ls -l $N0/.history/snap4;
-TEST ls $N0/.history/snap3/dir1;
-TEST ls $N0/.history/snap3/dir2;
+TEST ls -l $N0/.history/snap3/dir1;
+TEST ls -l $N0/.history/snap3/dir2;
-TEST ls $N0/.history/snap4/dir1;
-TEST ls $N0/.history/snap4/dir2;
+TEST ls -l $N0/.history/snap4/dir1;
+TEST ls -l $N0/.history/snap4/dir2;
-TEST ! ls $N0/dir1/.history/snap1;
-TEST ! ls $N0/dir2/.history/snap2;
-TEST ls $N0/dir1/.history/snap3;
-TEST ls $N0/dir2/.history/snap4;
+TEST ! ls -l $N0/dir1/.history/snap1;
+TEST ! ls -l $N0/dir2/.history/snap2;
+TEST ls -l $N0/dir1/.history/snap3;
+TEST ls -l $N0/dir2/.history/snap4;
TEST fd1=`fd_available`
TEST fd_open $fd1 'r' $N0/.history/snap1/file1;