From: Jeff Layton <jlayton@redhat.com>
To: Anna.Schumaker@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: Don't print a pNFS error if we aren't using pNFS
Date: Fri, 04 Nov 2016 11:00:05 -0400 [thread overview]
Message-ID: <1478271605.28785.6.camel@redhat.com> (raw)
In-Reply-To: <20161104130841.17150-1-Anna.Schumaker@Netapp.com>
On Fri, 2016-11-04 at 09:08 -0400, Anna.Schumaker@netapp.com wrote:
> From: Anna Schumaker <Anna.Schumaker@Netapp.com>
>
> We used to check for a valid layout type id before verifying pNFS flags
> as an indicator for if we are using pNFS. This changed in 3132e49ece
> with the introduction of multiple layout types, since now we are passing
> an array of ids instead of just one. Since then, users have been seeing
> a KERN_ERR printk show up whenever mounting NFS v4 without pNFS. This
> patch restores the original behavior of exiting set_pnfs_layoutdriver()
> early if we aren't using pNFS.
>
> Fixes 3132e49ece ("pnfs: track multiple layout types in fsinfo
> structure")
> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
> ---
> fs/nfs/pnfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index 56b2d96..259ef85 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -146,6 +146,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh,
> u32 id;
> int i;
>
> + if (fsinfo->nlayouttypes == 0)
> + goto out_no_driver;
> if (!(server->nfs_client->cl_exchange_flags &
> (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) {
> printk(KERN_ERR "NFS: %s: cl_exchange_flags 0x%x\n",
Good catch!
Reviewed-by: Jeff Layton <jlayton@redhat.com>
prev parent reply other threads:[~2016-11-04 15:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 13:08 [PATCH] NFS: Don't print a pNFS error if we aren't using pNFS Anna.Schumaker
2016-11-04 15:00 ` 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=1478271605.28785.6.camel@redhat.com \
--to=jlayton@redhat.com \
--cc=Anna.Schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/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