vfs_glusterfs: Fix exporting subdirs with shadow_copy2
authorMichael Adam <obnox@samba.org>
Fri, 20 Oct 2017 12:55:10 +0000 (14:55 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 1 Nov 2017 09:49:25 +0000 (10:49 +0100)
commit5e1abab6af20f71334018164ba21307c439bbef2
tree2d844f6c073950d60d39059ad238c7d77af048e0
parent9a5761ba01d314adba5e6e745e74496d70dffeac
vfs_glusterfs: Fix exporting subdirs with shadow_copy2

Since the glusterfs vfs module does not operate on a
locally mounted path, but on a "virtual" path starting
at the volume root, some assumptions of the code about
the vfs connect path fail. One example is the shadow_copy2
module which tries to detect the mount point from the
connectpath. In order to circumvent this problem, this
patch forces the "shadow:mountpoint" option to "/", which
skips the mount-point-detection code.

This patch will only have an effect if both the glusterfs
and the shadow_copy2 module are listed in vfs objects
in the right order, i.e. first shadow_copy2, and then
glusterfs.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13091

Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1249801ec73c55449068dd72efde81ce6235ec8e)
source3/modules/vfs_glusterfs.c