From patchwork Tue Jun 7 17:28:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Rees X-Patchwork-Id: 858182 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p57HShV8019126 for ; Tue, 7 Jun 2011 17:29:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755760Ab1FGR3C (ORCPT ); Tue, 7 Jun 2011 13:29:02 -0400 Received: from int-mailstore01.merit.edu ([207.75.116.232]:53566 "EHLO int-mailstore01.merit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755510Ab1FGR3B (ORCPT ); Tue, 7 Jun 2011 13:29:01 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by int-mailstore01.merit.edu (Postfix) with ESMTP id B58D1305CF58; Tue, 7 Jun 2011 13:29:00 -0400 (EDT) X-Virus-Scanned: amavisd-new at int-mailstore01.merit.edu Received: from int-mailstore01.merit.edu ([127.0.0.1]) by localhost (int-mailstore01.merit.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9jIzofr6Ga0x; Tue, 7 Jun 2011 13:29:00 -0400 (EDT) Received: from merit.edu (host-17.subnet-17.med.umich.edu [141.214.17.17]) by int-mailstore01.merit.edu (Postfix) with ESMTPSA id 2AE913055B74; Tue, 7 Jun 2011 13:29:00 -0400 (EDT) Date: Tue, 7 Jun 2011 13:28:59 -0400 From: Jim Rees To: Benny Halevy Cc: linux-nfs@vger.kernel.org, peter honeyman Subject: [PATCH 26/88] pnfsblock: allow use of PG_owner_priv_1 flag Message-ID: <000c46737b1da856c36c79afdd515f1a2e13f6ad.1307464382.git.rees@umich.edu> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Jun 2011 17:29:03 +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 8b06c93..493d4d3 100644 --- a/fs/nfs/blocklayout/blocklayout.h +++ b/fs/nfs/blocklayout/blocklayout.h @@ -37,6 +37,11 @@ #include #include /* Needed for struct dm_ioctl*/ +#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) + extern struct class shost_class; /* exported from drivers/scsi/hosts.c */ extern int dm_dev_create(struct dm_ioctl *param); /* from dm-ioctl.c */ extern int dm_dev_remove(struct dm_ioctl *param); /* from dm-ioctl.c */