summaryrefslogtreecommitdiff
path: root/tests/virfiledata
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2018-10-09 13:08:07 +0200
committerMichal Privoznik <mprivozn@redhat.com>2018-10-10 17:14:45 +0200
commit1dbf6222dd5e1fedcbe335fc0852ef66e7a92901 (patch)
tree020d74022d358008878be858711315cf4f4c9d57 /tests/virfiledata
parent98ca1d52a2a871e1c068504450b4dc15db063ef4 (diff)
downloadlibvirt-1dbf6222dd5e1fedcbe335fc0852ef66e7a92901.tar.gz
virfile: Rework virFileIsSharedFixFUSE
There are couple of things wrong with the current implementation. The first one is that in the first loop the code tries to build a list of fuse.glusterfs mount points. Well, since the strings are allocated in a temporary buffer and are not duplicated this results in wrong decision made later in the code. The second problem is that the code does not take into account subtree mounts. For instance, if there's a fuse.gluster mounted at /some/path and another FS mounted at /some/path/subdir the code would not recognize this subdir mount. Reported-by: Han Han <hhan@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Diffstat (limited to 'tests/virfiledata')
-rw-r--r--tests/virfiledata/mounts3.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/virfiledata/mounts3.txt b/tests/virfiledata/mounts3.txt
index 226f67dc00..134c6e8f81 100644
--- a/tests/virfiledata/mounts3.txt
+++ b/tests/virfiledata/mounts3.txt
@@ -31,3 +31,5 @@ hugetlbfs /hugepages2M hugetlbfs rw,relatime,mode=1777,pagesize=2M 0 0
none /run/user/1000 tmpfs rw,relatime,mode=700,uid=1000 0 0
host:/nfs /nfs nfs4 rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=::,local_lock=none,addr=:: 0 0
dev /nfs/blah devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=4093060,mode=755 0 0
+host:/gv0 /gluster fuse.glusterfs rw 0 0
+root@host:/tmp/mkdir /gluster/sshfs fuse.sshfs rw 0 0