From patchwork Tue Jun 14 02:32:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Rees X-Patchwork-Id: 877492 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 p5E2W3Mr029514 for ; Tue, 14 Jun 2011 02:32:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754159Ab1FNCcs (ORCPT ); Mon, 13 Jun 2011 22:32:48 -0400 Received: from merit-proxy01.merit.edu ([207.75.116.193]:48135 "EHLO merit-proxy01.merit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754073Ab1FNCcs (ORCPT ); Mon, 13 Jun 2011 22:32:48 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by merit-proxy01.merit.edu (Postfix) with ESMTP id C43652039D49; Mon, 13 Jun 2011 22:32:47 -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 CPlmUEhGAa0Y; Mon, 13 Jun 2011 22:32:47 -0400 (EDT) Received: from merit.edu (74-126-0-171.static.123.net [74.126.0.171]) by merit-proxy01.merit.edu (Postfix) with ESMTPSA id 2B3022039CE1; Mon, 13 Jun 2011 22:32:47 -0400 (EDT) X-Mailbox-Line: From 41abe6e718f2626cd4622c534bb9a0d7e9abfe93 Mon Sep 17 00:00:00 2001 Message-Id: <41abe6e718f2626cd4622c534bb9a0d7e9abfe93.1308017749.git.rees@umich.edu> In-Reply-To: References: Subject: [PATCH 18/33] pnfsblock: allow use of PG_owner_priv_1 flag To: Benny Halevy Cc: linux-nfs@vger.kernel.org, peter honeyman Date: Mon, 13 Jun 2011 22:32:46 -0400 From: Jim Rees 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]); Tue, 14 Jun 2011 02:32:49 +0000 (UTC) From: Fred Isaman There is currently no good way for pnfs to communicate problems. For example - the linux read code first tries to do readahead through nfs_readpages. Failure there is ignored, and it will later call nfs_readpage. Failure there is also ignored, except that the lack of PG_uptodate is communicated back via -EIO. With pnfs, it would be useful to be able to communicate to nfs_readpage that direct disk IO failed on readahead, and that it should failover to using the MDS. Making the page flag PG_owner_priv_1 available as PG_pnfserr is one way to do so. (An alternative would be to embed this in the layout, but then pg_test can't easily access the info.) This may be better as generic pnfs code, in which case it should be put in pnfs.h, or even page-flags.h Signed-off-by: Fred Isaman Signed-off-by: Benny Halevy --- fs/nfs/blocklayout/blocklayout.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h index a596e75..0a54feb 100644 --- a/fs/nfs/blocklayout/blocklayout.h +++ b/fs/nfs/blocklayout/blocklayout.h @@ -35,6 +35,11 @@ #include #include "../pnfs.h" +#define PG_pnfserr PG_owner_priv_1 +#define PagePnfsErr(page) test_bit(PG_pnfserr, &(page)->flags) +#define SetPagePnfsErr(page) set_bit(PG_pnfserr, &(page)->flags) +#define ClearPagePnfsErr(page) clear_bit(PG_pnfserr, &(page)->flags) + struct block_mount_id { spinlock_t bm_lock; /* protects list */ struct list_head bm_devlist; /* holds pnfs_block_dev */