All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Tao <bergwolf@gmail.com>
To: Bryan Schumaker <bjschuma@netapp.com>
Cc: Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFS41: fix error of setting blocklayoutdriver
Date: Wed, 8 Aug 2012 22:48:59 +0800	[thread overview]
Message-ID: <CA+a=Yy6HYkLRSr+qB+cK8xrf7Wy8BKc3RyYbzhrkGjAyvWkHAg@mail.gmail.com> (raw)
In-Reply-To: <5022605D.6060901@netapp.com>

On Wed, Aug 8, 2012 at 8:49 PM, Bryan Schumaker <bjschuma@netapp.com> wrote:
> 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.
Before commit e38eb650, nfs_server_set_fsinfo() is called before
setting layoutdriver. And now it is called after. And block layout
driver checks pnfs_blksize so it gets broken.

I will remove the line in nfs_server_set_fsinfo() and resend the patch.

-- 
Thanks,
Tao

  reply	other threads:[~2012-08-08 14: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
2012-08-08 14:48     ` Peng Tao [this message]
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='CA+a=Yy6HYkLRSr+qB+cK8xrf7Wy8BKc3RyYbzhrkGjAyvWkHAg@mail.gmail.com' \
    --to=bergwolf@gmail.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bjschuma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.