From: Peng Tao <bergwolf@gmail.com>
To: Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH-resend 2/6] NFS41: fix error of setting blocklayoutdriver
Date: Fri, 24 Aug 2012 00:27:49 +0800 [thread overview]
Message-ID: <1345739273-2241-3-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1345739273-2241-1-git-send-email-bergwolf@gmail.com>
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: stable <stable@vger.kernel.org> [since v3.5]
Signed-off-by: Peng Tao <tao.peng@emc.com>
---
fs/nfs/client.c | 1 -
fs/nfs/nfs4proc.c | 5 ++++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 9969444..0e7cd89 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -855,7 +855,6 @@ static void nfs_server_set_fsinfo(struct nfs_server *server,
if (server->wsize > NFS_MAX_FILE_IO_SIZE)
server->wsize = NFS_MAX_FILE_IO_SIZE;
server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
- server->pnfs_blksize = fsinfo->blksize;
server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 6352741..1653091 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;
set_pnfs_layoutdriver(server, fhandle, fsinfo->layouttype);
+ }
return error;
}
--
1.7.1.262.g5ef3d
next prev parent reply other threads:[~2012-08-23 16:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 16:27 [PATCH-resend 0/6] NFS41 and pnfsblock bugfixes Peng Tao
2012-08-23 16:27 ` [PATCH-resend 1/6] NFSv41: fix DIO write_io calculation Peng Tao
2012-08-23 16:27 ` Peng Tao [this message]
2012-08-23 16:27 ` [PATCH-resend 3/6] Revert "pnfsblock: bail out partial page IO" Peng Tao
2012-08-23 16:27 ` [PATCH-resend 4/6] pnfsblock: fix partial page buffer wirte Peng Tao
2012-08-23 16:27 ` [PATCH-resend 5/6] pnfsblock: fix non-aligned DIO read Peng Tao
2012-08-23 16:27 ` [PATCH-resend 6/6] pnfsblock: fix non-aligned DIO write Peng Tao
2012-09-20 2:20 ` [PATCH-resend 0/6] NFS41 and pnfsblock bugfixes 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=1345739273-2241-3-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=Trond.Myklebust@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;
as well as URLs for NNTP newsgroup(s).