From: Benjamin Coddington <bcodding@redhat.com>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [RFC PATCH] mount.nfs: skip option validation on remount
Date: Wed, 6 Apr 2016 09:41:36 -0400 [thread overview]
Message-ID: <712798c489f69e39f235077f6ca85a7c133eeb58.1459949813.git.bcodding@redhat.com> (raw)
I'm not exactly sure this is the safest thing to do since you can pass
-oremount on the first mount and skip option validation. Maybe someone with
better insight into the mount paths could comment. Does mount need some
refactoring? Its logic seems arcane.. and I think there is a lot of dead
code.
This is very quick attempt to fix
https://bugzilla.redhat.com/show_bug.cgi?id=1313550
8<-------------------------------------------------------------------------
A remount might fail if name resolution returns a different server address
for the mount. Since we've already validated the options the first time,
skip validation if remounting.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
utils/mount/stropts.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 86829a9..9383bb4 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -1090,15 +1090,15 @@ static const char *nfs_background_opttbl[] = {
static int nfsmount_start(struct nfsmount_info *mi)
{
- if (!nfs_validate_options(mi))
- return EX_FAIL;
-
/*
* Avoid retry and negotiation logic when remounting
*/
if (mi->flags & MS_REMOUNT)
return nfs_remount(mi);
+ if (!nfs_validate_options(mi))
+ return EX_FAIL;
+
if (po_rightmost(mi->options, nfs_background_opttbl) == 0)
return nfsmount_bg(mi);
else
--
1.7.1
next reply other threads:[~2016-04-06 13:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 13:41 Benjamin Coddington [this message]
2016-04-06 15:10 ` [RFC PATCH] mount.nfs: skip option validation on remount Chuck Lever
2016-04-06 15:24 ` Benjamin Coddington
2016-04-06 15:47 ` Chuck Lever
2016-04-06 15:58 ` Benjamin Coddington
2016-04-06 15:59 ` Chuck Lever
2016-04-06 16:07 ` Benjamin Coddington
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=712798c489f69e39f235077f6ca85a7c133eeb58.1459949813.git.bcodding@redhat.com \
--to=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox