Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965012Ab2JSDGj (ORCPT ); Thu, 18 Oct 2012 23:06:39 -0400 Received: from mail.kernel.org ([198.145.19.201]:51932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932713Ab2JSCs3 (ORCPT ); Thu, 18 Oct 2012 22:48:29 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , alan@lxorguk.ukuu.org.uk, Peng Tao , Trond Myklebust Subject: [ 03/76] NFS41: fix error of setting blocklayoutdriver Date: Thu, 18 Oct 2012 19:46:27 -0700 Message-Id: <20121019024350.627636854@linuxfoundation.org> X-Mailer: git-send-email 1.8.0.rc0.18.gf84667d In-Reply-To: <20121019024350.087156547@linuxfoundation.org> References: <20121019024350.087156547@linuxfoundation.org> User-Agent: quilt/0.60-2.1.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1737 Lines: 54 3.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peng Tao commit dc182549d439f60c332bf74d7f220a1bccf37da6 upstream. 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. Signed-off-by: Peng Tao Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/client.c | 1 - fs/nfs/nfs4proc.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -855,7 +855,6 @@ static void nfs_server_set_fsinfo(struct 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); --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3362,8 +3362,11 @@ static int nfs4_proc_fsinfo(struct nfs_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; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/