From patchwork Thu Jul 21 19:34:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Rees X-Patchwork-Id: 996982 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6LJYV0u015518 for ; Thu, 21 Jul 2011 19:34:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753740Ab1GUTev (ORCPT ); Thu, 21 Jul 2011 15:34:51 -0400 Received: from merit-proxy01.merit.edu ([207.75.116.193]:46774 "EHLO merit-proxy01.merit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753745Ab1GUTev (ORCPT ); Thu, 21 Jul 2011 15:34:51 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by merit-proxy01.merit.edu (Postfix) with ESMTP id A6E312039AE8; Thu, 21 Jul 2011 15:34:50 -0400 (EDT) X-Virus-Scanned: amavisd-new at merit-proxy01.merit.edu Received: from merit-proxy01.merit.edu ([127.0.0.1]) by localhost (merit-proxy01.merit.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G16-k0LNiVtO; Thu, 21 Jul 2011 15:34:50 -0400 (EDT) Received: from merit.edu (castelmezzano.citi.umich.edu [141.212.112.22]) by merit-proxy01.merit.edu (Postfix) with ESMTPSA id 50B422039AE0; Thu, 21 Jul 2011 15:34:50 -0400 (EDT) From: Jim Rees To: Trond Myklebust Cc: linux-nfs@vger.kernel.org, peter honeyman Subject: [PATCH v2 23/25] pnfsblock: use pageio_ops api Date: Thu, 21 Jul 2011 15:34:23 -0400 Message-Id: <1311276865-29484-24-git-send-email-rees@umich.edu> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1311276865-29484-1-git-send-email-rees@umich.edu> References: <1311276865-29484-1-git-send-email-rees@umich.edu> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 21 Jul 2011 19:34:53 +0000 (UTC) From: Benny Halevy [pnfsblock: use pnfs_generic_pg_init_read/write] Signed-off-by: Peng Tao Signed-off-by: Benny Halevy --- fs/nfs/blocklayout/blocklayout.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 16214df..190b61f 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c @@ -767,6 +767,18 @@ bl_clear_layoutdriver(struct nfs_server *server) return 0; } +static const struct nfs_pageio_ops bl_pg_read_ops = { + .pg_init = pnfs_generic_pg_init_read, + .pg_test = pnfs_generic_pg_test, + .pg_doio = pnfs_generic_pg_readpages, +}; + +static const struct nfs_pageio_ops bl_pg_write_ops = { + .pg_init = pnfs_generic_pg_init_write, + .pg_test = pnfs_generic_pg_test, + .pg_doio = pnfs_generic_pg_writepages, +}; + static struct pnfs_layoutdriver_type blocklayout_type = { .id = LAYOUT_BLOCK_VOLUME, .name = "LAYOUT_BLOCK_VOLUME", @@ -780,6 +792,8 @@ static struct pnfs_layoutdriver_type blocklayout_type = { .cleanup_layoutcommit = bl_cleanup_layoutcommit, .set_layoutdriver = bl_set_layoutdriver, .clear_layoutdriver = bl_clear_layoutdriver, + .pg_read_ops = &bl_pg_read_ops, + .pg_write_ops = &bl_pg_write_ops, }; static const struct rpc_pipe_ops bl_upcall_ops = {