]> xenbits.xensource.com Git - libvirt.git/commit
virfile: Rework virFileIsSharedFixFUSE
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Oct 2018 11:08:07 +0000 (13:08 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 10 Oct 2018 15:14:45 +0000 (17:14 +0200)
commit1dbf6222dd5e1fedcbe335fc0852ef66e7a92901
tree020d74022d358008878be858711315cf4f4c9d57
parent98ca1d52a2a871e1c068504450b4dc15db063ef4
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>
src/util/virfile.c
tests/virfiledata/mounts3.txt
tests/virfiletest.c