From: Jeff Layton <jlayton@redhat.com>
To: Scott Mayhew <smayhew@redhat.com>
Cc: linux-nfs@vger.kernel.org, trond.myklebust@netapp.com
Subject: Re: [PATCH] NFSv4: Fix the sync mount option for nfs4 mounts
Date: Wed, 31 Jul 2013 10:21:11 -0400 [thread overview]
Message-ID: <20130731102111.51bfc07d@tlielax.poochiereds.net> (raw)
In-Reply-To: <1375279301-48950-1-git-send-email-smayhew@redhat.com>
On Wed, 31 Jul 2013 10:01:41 -0400
Scott Mayhew <smayhew@redhat.com> wrote:
> The sync mount option stopped working for NFSv4 mounts after commit
> c02d7adf8c5429727a98bad1d039bccad4c61c50 (NFSv4: Replace nfs4_path_walk() with
> FS path lookup in a private namespace). If MS_SYNCHRONOUS is set in the
> super_block that we're cloning from, then it should be set in the new
> super_block as well.
>
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
> fs/nfs/super.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 71fdc0d..f6db66d 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -2478,6 +2478,10 @@ struct dentry *nfs_fs_mount_common(struct nfs_server *server,
> if (server->flags & NFS_MOUNT_NOAC)
> sb_mntdata.mntflags |= MS_SYNCHRONOUS;
>
> + if (mount_info->cloned != NULL && mount_info->cloned->sb != NULL)
> + if (mount_info->cloned->sb->s_flags & MS_SYNCHRONOUS)
> + sb_mntdata.mntflags |= MS_SYNCHRONOUS;
> +
> /* Get a superblock - note that we may end up sharing one that already exists */
> s = sget(nfs_mod->nfs_fs, compare_super, nfs_set_super, flags, &sb_mntdata);
> if (IS_ERR(s)) {
Might also consider this for stable, since it's a regression, though it
is a relatively minor bug...
Reviewed-and-Tested-by: Jeff Layton <jlayton@redhat.com>
prev parent reply other threads:[~2013-07-31 14:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-31 14:01 [PATCH] NFSv4: Fix the sync mount option for nfs4 mounts Scott Mayhew
2013-07-31 14:21 ` Jeff Layton [this message]
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=20130731102111.51bfc07d@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=smayhew@redhat.com \
--cc=trond.myklebust@netapp.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