* [PATCH] NFS: Don't print a pNFS error if we aren't using pNFS
@ 2016-11-04 13:08 Anna.Schumaker
2016-11-04 15:00 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: Anna.Schumaker @ 2016-11-04 13:08 UTC (permalink / raw)
To: linux-nfs; +Cc: Anna.Schumaker, jlayton
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",
--
2.10.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFS: Don't print a pNFS error if we aren't using pNFS
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
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2016-11-04 15:00 UTC (permalink / raw)
To: Anna.Schumaker, linux-nfs
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-04 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox