* [PATCH] nfs-utils: exportfs: automatically set 'nohide' on referral exports.
@ 2007-10-02 14:38 Steve Dickson
0 siblings, 0 replies; only message in thread
From: Steve Dickson @ 2007-10-02 14:38 UTC (permalink / raw)
To: nfs
To activate referral mounts, the local directory (on the
server) has to be --bind mounted (i.e. mount --bind . .),
which means when the local directory is accessed (by the client)
a mount point is being crossed. If the 'nohide' is not
set on the export (or crossmnt on the parent export) the
referral *silently* fails since the mount point can not be
crossed.
This silent failure makes it almost impossible to figure
out why referral mounts fail, since there is no error message
or network traffic. So by setting the nohide option automatically
this silent failure is eliminated.
This patch is relative to the Fedora nfs-utils git tree:
git://git.infradead.org/~steved/nfs-utils.fedora
but does apply to Neil's git tree.
steved.
commit 34038ab17a5fa157bfee103eb3fe58bb999b40a4
Author: Steve Dickson <steved@dickson.boston.devel.redhat.com>
Date: Tue Oct 2 09:56:42 2007 -0400
This patch turns on the 'nohide' export option automatically
for all FS location exports due to the fact this option
is need to for referral mount to work.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index 5fc3e4a..40012c3 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -508,6 +508,12 @@ bad_option:
while (isblank(*cp))
cp++;
}
+ /*
+ * Turn on nohide which will allow this export to cross over
+ * the 'mount --bind' mount point.
+ */
+ if (ep->e_fslocdata)
+ ep->e_flags |= NFSEXP_NOHIDE;
ep->e_squids = squids;
ep->e_sqgids = sqgids;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-02 14:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-02 14:38 [PATCH] nfs-utils: exportfs: automatically set 'nohide' on referral exports Steve Dickson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.