All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: nfs@lists.sourceforge.net
Subject: [PATCH] nfs-utils: exportfs: automatically set 'nohide' on referral exports.
Date: Tue, 02 Oct 2007 10:38:08 -0400	[thread overview]
Message-ID: <470257D0.7000306@RedHat.com> (raw)

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

                 reply	other threads:[~2007-10-02 14:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=470257D0.7000306@RedHat.com \
    --to=steved@redhat.com \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.