2010-05-12 05:31:36

by Zhang Jingwang

[permalink] [raw]
Subject: [PATCH] pnfs: set pnfs_blksize before calling set_pnfs_layoutdriver

For block/volume layout driver, set_pnfs_layoutdriver will call
initialize_mountpoint() which will check the value of pnfs_blksize.

Signed-off-by: Zhang Jingwang <[email protected]>
---
fs/nfs/client.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index dddc75c..94a9be9 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -880,9 +880,9 @@ static void nfs4_init_pnfs(struct nfs_server *server, struct nfs_fh *mntfh, stru

if (nfs4_has_session(clp) &&
(clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) {
+ server->pnfs_blksize = fsinfo->blksize;
set_pnfs_layoutdriver(server, mntfh, fsinfo->layouttype);
pnfs_set_ds_iosize(server);
- server->pnfs_blksize = fsinfo->blksize;
}
#endif /* CONFIG_NFS_V4_1 */
}
--
1.6.2.5



2010-05-12 06:55:24

by Benny Halevy

[permalink] [raw]
Subject: Re: [PATCH] pnfs: set pnfs_blksize before calling set_pnfs_layoutdriver

On 2010-05-12 08:30, Zhang Jingwang wrote:
> For block/volume layout driver, set_pnfs_layoutdriver will call
> initialize_mountpoint() which will check the value of pnfs_blksize.

Looks good.

Thanks!

Benny

>
> Signed-off-by: Zhang Jingwang <[email protected]>
> ---
> fs/nfs/client.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index dddc75c..94a9be9 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -880,9 +880,9 @@ static void nfs4_init_pnfs(struct nfs_server *server, struct nfs_fh *mntfh, stru
>
> if (nfs4_has_session(clp) &&
> (clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) {
> + server->pnfs_blksize = fsinfo->blksize;
> set_pnfs_layoutdriver(server, mntfh, fsinfo->layouttype);
> pnfs_set_ds_iosize(server);
> - server->pnfs_blksize = fsinfo->blksize;
> }
> #endif /* CONFIG_NFS_V4_1 */
> }