Linux NFS development
 help / color / mirror / Atom feed
From: Bryan Schumaker <bjschuma@netapp.com>
To: Peng Tao <bergwolf@gmail.com>
Cc: Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFS41: fix error of setting blocklayoutdriver
Date: Wed, 08 Aug 2012 08:49:33 -0400	[thread overview]
Message-ID: <5022605D.6060901@netapp.com> (raw)
In-Reply-To: <1344390577-1602-2-git-send-email-bergwolf@gmail.com>

On 08/07/2012 09:49 PM, Peng Tao wrote:
> After commit e38eb650 (NFS: set_pnfs_layoutdriver() from
> nfs4_proc_fsinfo()), set_pnfs_layoutdriver() is called inside
> nfs4_proc_fsinfo(), but pnfs_blksize is not set. It causes setting
> blocklayoutdriver failure and pnfsblock mount failure.
> 
> Cc: Bryan Schumaker <bjschuma@netapp.com>
> Signed-off-by: Peng Tao <bergwolf@gmail.com>
> ---
>  fs/nfs/nfs4proc.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 78b2163..299c311 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -3362,8 +3362,11 @@ static int nfs4_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, s
>  
>  	nfs_fattr_init(fsinfo->fattr);
>  	error = nfs4_do_fsinfo(server, fhandle, fsinfo);
> -	if (error == 0)
> +	if (error == 0) {
> +		/* block layout checks this! */
> +		server->pnfs_blksize = fsinfo->blksize;

fs/nfs/client.c:nfs_server_set_fsinfo() also sets this field, so I'm surprised there was a problem.  You should remove the same line from nfs_server_set_fsinfo() if you're going to set it here.

- Bryan

>  		set_pnfs_layoutdriver(server, fhandle, fsinfo->layouttype);
> +	}
>  
>  	return error;
>  }
> 


  reply	other threads:[~2012-08-08 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08  1:49 [PATCH 1/2] NFSv41: fix DIO write_io calculation Peng Tao
2012-08-08  1:49 ` [PATCH 2/2] NFS41: fix error of setting blocklayoutdriver Peng Tao
2012-08-08 12:49   ` Bryan Schumaker [this message]
2012-08-08 14:48     ` Peng Tao
2012-08-08 19:03 ` [PATCH 1/2] NFSv41: fix DIO write_io calculation Myklebust, Trond
2012-08-09  2:36   ` Peng Tao
2012-08-09 14:25     ` Myklebust, Trond
2012-08-09 14:31       ` Peng Tao

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=5022605D.6060901@netapp.com \
    --to=bjschuma@netapp.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bergwolf@gmail.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