Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2406169pxb; Fri, 8 Oct 2021 07:12:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy9IHMSXaeDMJawxahvMPX+WiWDrSlY/dpHVk48rhgtpbcmSx/Ar3g8A78/nOmRNIz60DO X-Received: by 2002:a63:7405:: with SMTP id p5mr4827536pgc.426.1633702353841; Fri, 08 Oct 2021 07:12:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1633702353; cv=pass; d=google.com; s=arc-20160816; b=apVfREluYEvbCVcdXW2+k2Mqil/HYYTmSKjc/kWMNSAue8fqHrBM6npxyg9EaShRaU p1sj3d/efCR88IvFRy/YykrCXgBW71XyQpMi+yDY76sJzcMjE290DIUMtC1mZL0gBkme 1H4Bg+pKtmQJfKaQ06pnxkBg3CSFowpKbD0La23oeDxvaQJ3zq/2+NLNYJr/RQdk63Gy NVh9gmdFEN7+/13sGbnp9px+a+Dv2MpS17tMUwRNn4dzgSskSIvx6S6JCI5gOLcZVN8S TY+XFg8rySSBxMII21r3vYN+qYqwA84SAgC8VGsPzXMF8rtln4B9hXHhwebBkRCs6tE9 ilnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=TGBeFY+eHX34cOOt8EaWxMse2NB/lQGBi4o7vHznXUQ=; b=r8hH5HhVuRwfRxHZ4118XM9ozcRapm9WPWs9nbqcUoNe9ROo1H0A/8dShwTMWme4CU UyNdsFxe3CRNGCLd4EZyMBVlArAW83s7Gz9gxgfey6hSlaZcZwcrWrC3mAWOHeS+Lvo0 mXloS/G/TKCbO21StEOayPBWiJG1oNrsGdxQvSrY9vkkK+dUr+EiUU+L5A6Zr1FUxmnA zEgKf9cH/O1YHNQvkNEx/vWwXFKXP5d+4zCEzNnX0xkOan+WV+kwdfOSvmUzkeGFSldA 2yFVdjTts8kKjKDJZvT1wFa//JvgO+IbSX9ePhdZX+FTqm6GSBbnLYn6Y5K73ALe1pk6 s3ng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=t4PmtcIB; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="i//uJ3jm"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y189si18575277pfg.310.2021.10.08.07.12.09; Fri, 08 Oct 2021 07:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=t4PmtcIB; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="i//uJ3jm"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240788AbhJHOMD (ORCPT + 99 others); Fri, 8 Oct 2021 10:12:03 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:35828 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbhJHOMC (ORCPT ); Fri, 8 Oct 2021 10:12:02 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 198DIfaq001319; Fri, 8 Oct 2021 14:09:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=TGBeFY+eHX34cOOt8EaWxMse2NB/lQGBi4o7vHznXUQ=; b=t4PmtcIBJ5cZGwgm6Az5joW1J7DDghZncSSACbxFnlW24Nan5bRvN8RB2YHVwJ5N0TS0 92vEw4fICN0MUOtYtFmEAzqETrxJgUV3pNu6y25ZrYHXcjkT8C4RiAUHQPqOy35z++Og xRjSo73WNt6JDmzMZWNHGDCO89Du+zRKtQpawYLWSvuAAjrazpx4SmF9HtuJBrszKa3G vDp8UcBRG138FFPgX3mTwAqmWaDt7PmhBeuWM4v+EHhIM3oyH3cT4ABczlD2zeDFD5pY uLs544gn1IuYQgl2vOMLh+GPol9tZcucA+daYEi7g9guWTB2+yjQJGyMimg8rnMhchAg YA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bj1ecqxn6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Oct 2021 14:09:44 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 198E4tHs108042; Fri, 8 Oct 2021 14:09:43 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by userp3020.oracle.com with ESMTP id 3bf16yfbdg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Oct 2021 14:09:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jVRWLNoZ3EucPusp3W1eWE1keaOMxrqUC+Y/7RZacI79F70cn2GnAGoE672Ec21g14TBkOnV4mFXcWOc0A+z1gH8XA665WKCwEm1S+3SPrWwmR0DddwgC3YnRHLM+6gdw/7/Y84sTze5ZfTtbJl4mBB+ukzSwv5bJ2rpBmRV1jdYraon3lWOIFlQvZavD4L6P+Vcf3xzXnJEGTE7Aaf0ZVba7Ryq0YTW+UYEjxzLma8Hqz9FAKj7d1Zeo1Odi+9+kynGXZVbaFPGj7NZGnNq1BQoBtzLQTQbRWapBxRR4iaUCAFo/SKBtKJeRfYprXJAPvpwXjjoaDuepeXOks9mWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TGBeFY+eHX34cOOt8EaWxMse2NB/lQGBi4o7vHznXUQ=; b=NBBBVK8UpH75tTXO0sOaPjelWEXRWxv67aTorvCuo3IcgOxIE0PHzfyo+jzZxmcTafTPL4tPaLivdwyUYuvzV48M4dtSdiVSviTRexo6Bx/3O1vjqidEh3waaT1wI64MZU20LbKDNuFklIxPlw4OluDd6F52aDNOh9/WMdxbrFcxj+30puhfXvFsoOzVOpZk11STsYvozwWbRkD/kzr9+v8HewdzusYWy8oT/sw5xEb9UeP0WxUaeFdfpGfgwNOoIk7i1oiklAXzD96mivk6EOnEIvj4u+TqDVenstgCpNNFhMZvdXa91M1IzTlvvxN9fseq0e+IRmwoGu1PSiz+PQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TGBeFY+eHX34cOOt8EaWxMse2NB/lQGBi4o7vHznXUQ=; b=i//uJ3jm1QRehqq+n9gWikr1GyqOHPWc6+5f9l9JD8qyrsu4F99VXJJRgOKhYHv7Y/ROsmyYKWxphk1mfIXu7WRVv6sg8KPtfqWhR5D5+8PXhWtTStuGGpa8eMeZx1dwsbBD8x6kmZ33f1jikcv8CfbwFPbXvAHfshpwltvtu3A= Received: from SJ0PR10MB4688.namprd10.prod.outlook.com (2603:10b6:a03:2db::24) by BY5PR10MB4147.namprd10.prod.outlook.com (2603:10b6:a03:20e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Fri, 8 Oct 2021 14:09:40 +0000 Received: from SJ0PR10MB4688.namprd10.prod.outlook.com ([fe80::f4fe:5b4:6bd9:4c5b]) by SJ0PR10MB4688.namprd10.prod.outlook.com ([fe80::f4fe:5b4:6bd9:4c5b%6]) with mapi id 15.20.4587.022; Fri, 8 Oct 2021 14:09:40 +0000 From: Chuck Lever III To: Dave Wysochanski CC: Trond Myklebust , Anna Schumaker , Matthew Wilcox , David Howells , "linux-cachefs@redhat.com" , Linux NFS Mailing List Subject: Re: [PATCH 1/1] NFS: Convert from readpages() to readahead() Thread-Topic: [PATCH 1/1] NFS: Convert from readpages() to readahead() Thread-Index: AQHXu9PCTxWz7e0uNku4Se2Jl0pkd6vJJJuA Date: Fri, 8 Oct 2021 14:09:40 +0000 Message-ID: <3F1E7B93-EB8D-4744-8143-D44654CA6451@oracle.com> References: <1633649528-1321-1-git-send-email-dwysocha@redhat.com> <1633649528-1321-2-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633649528-1321-2-git-send-email-dwysocha@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3654.120.0.1.13) authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c95f3064-3907-4150-a026-08d98a654557 x-ms-traffictypediagnostic: BY5PR10MB4147: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ACGEUW9wdMI1VpDgKZwAn41b7mQ9/Q8kCLrsWBrQBjwQ63bi8BkyZkF5PYbLzb8OrZCWOdbUUnDQAIxn56xWsPTgJqP/xVs/mu9DxIse43JIoSsf/aHODv10rH8Bne1Pq2l1VAJKrHkVSn4ZXVTaXe68+80+AYCTuTe8AZjh1zWv0Wof0mLW0ERgsU66CbY8wQQW37g7AuKW/T5BlLA5pBPVYMd0nh1ZnP2MgqcQXhx08GzGNQVsPvWqK/aGVmxZIHjOT3hKXvqubRoMzlsCT6xyBPeo+fpCEYwDoIW1/7AftERjaVeILfFywPyhEKkoWw6orUmPEqnzUJI6lhTpkr3onCQE5NKii3VnegOZ8lP8tkupr4yF5uCcPOuFgkPtHjekObZzmw/9iIGEFGJiMMUUfY6Q4f6G8O2K9Fw5/iXpVbTWPiYssfJVRhni4iaPaJI+ysX1U2ZedQ2USvNaXwt9PKZgUDeDennXje/n+SESsTPSNTA0FDp9y0b1iZLoYqPtNOGPPU38ufityuEqSKXIO9hWMl7Tn49C2vJrmSAn0nPzeoZ1JzQfEbzluBD7vkWIAX0ztQ4Q1ZF/14lOYjOyHJ3HNNnd8ozIE2yYkInioCVW7jI3enN7vnjuoeThx/6X6M7h6hsMUVLCzMWz/dOtQUDQVloiMP71FSAPr6mZxPMvlxEHMCwQ4WDET6tuu37xwwFVJuDc8TT1fly8joAkyoKUTBfIXJaUCb1B0s2BnkmvtoQrwrgY3845V2aZ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB4688.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(4326008)(38100700002)(6506007)(122000001)(8676002)(33656002)(186003)(38070700005)(26005)(2616005)(53546011)(86362001)(8936002)(71200400001)(36756003)(6512007)(6916009)(66556008)(66446008)(91956017)(2906002)(66946007)(66476007)(64756008)(76116006)(6486002)(83380400001)(5660300002)(316002)(54906003)(508600001)(45980500001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U7CYwaRphin7MIP1gGG0fT5dSxc8OF9AcNj6hGXLKMWaUfPACeMOGUQLdnun?= =?us-ascii?Q?phR1+uPLr3duMa+yBDvoOxfsCQ0e1QDPrd4ZuQz56M8qJ7/r1i8ZAySsNDO0?= =?us-ascii?Q?FYxhg+l70cYZYjwzYtjX69BYiL8u0q/i0mj9IkgbalcajRsOIM0TojTzBilv?= =?us-ascii?Q?D4KXI+66Bn3iVwzO8GhAVesd7EBqmY+eB0nctXVLtGgVsQ6IPX0XFutF4UMc?= =?us-ascii?Q?L51BuWMGS1ko1DydVkM1+02PwB1FPmZhF5xPJnW6+jP/7PpmpeTz2pt4BYAz?= =?us-ascii?Q?gh2oD9Ke9Ald/FNU4C2vhIxidivgo9oz4GCnuHRKK7aRQPZjuocyYUlU0gLD?= =?us-ascii?Q?oPSfQD/c9zUFDchZf9zXQbxqLl0uhb/CDBXTm3hkDWnjgl4qBduNsB+X2n//?= =?us-ascii?Q?GLMT0KV+p0jQyy6+eKtfvBHVLAbCyIHuhiJcwFt+fhgLwvSKEZYlZVdgBs9a?= =?us-ascii?Q?0vUvtcxKHalAzl5FOPmVrIH2j4UMexAgZYu2sPFATSc0T59vUIxCrqBRcIxq?= =?us-ascii?Q?X7+zDGAxuUJGkbKVlYqZBL4donzGfJ8TXT8D4e+bHIDhJ568RITqw3p+mDqH?= =?us-ascii?Q?Qf6dh4IbI3BhXg5DUbEfDlOCTUwcpYynwKb4pX1GCvrbKuXXNS0fcAsg1mXO?= =?us-ascii?Q?HI+FtdGulNtISPN2ouvm3KKTWVzRx95ecwBryUth+ifiL2inwffQ+6bTaWtT?= =?us-ascii?Q?qWMeMRrkdEbVmjJw0PQ5DGNZ6phVg2P+82irgS9uj72AhwQ3BIHoDP0tsp6M?= =?us-ascii?Q?GUl0mT4fAgoIbe0nWDAs0zk/6z0NseRMgRO6MGRK20jCMy0s1UByqxIs0QLk?= =?us-ascii?Q?BhA8OOnN7eUUFVHkdPoRQb+a244gmV0wWPGq/cZU+Hk75LxSZt9Fla29prYd?= =?us-ascii?Q?lZuRD8v1DW+uNb6zyzjJTwsRV5md6eXcgCiOg7zebVogbxg0XyRGeP7/PIEh?= =?us-ascii?Q?n+OQqDRaafETQxViumtP2umq54Wv6d3SJcnedJdKRz/45z5jxsssErs58RKz?= =?us-ascii?Q?7dXivuPJg3JvNaNujImgujJ/f5gZtmBSbdRZfU5VqJZPd87YTVXdWtMbqwbA?= =?us-ascii?Q?CeSzk69uCXUdchGuO4LqKwFSPVEE3ubJdk6kwnaRiPMDpTaqi/39mL8A8R/b?= =?us-ascii?Q?A0+HOuC/aAoYRguOvRhCyrq7uK79Q2x804JskU/zd7Y9TgDA6JeghbP7FjHU?= =?us-ascii?Q?pHK73zU8cKB3cfSSlZ9PMcppYbsV2qtK2zHpY8RlIu+Z9DPhs+XLgLUVroVD?= =?us-ascii?Q?V/0cRWpgPi5Fct/oDo9yI5tp18HZVKuVHAwwTrSdmj3Z7k2u2XdWBrYivzyj?= =?us-ascii?Q?KiJ7HR743gzuJ3nzFE/SxTLd?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: <76B9179E6D11D244AAFF5891AB08D910@namprd10.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4688.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c95f3064-3907-4150-a026-08d98a654557 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2021 14:09:40.8579 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: gq3bdS1t/n5Xfi4VVL3HQsrrs06w6IjBBiqtOsz8qtKm7p1ixcC/aYS/DBezWynNh0VlfyWvi6oAYNk/L+U9wg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4147 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110080085 X-Proofpoint-GUID: yC7vW5EJfEGDGEbFjHSa4whIBVoA-awy X-Proofpoint-ORIG-GUID: yC7vW5EJfEGDGEbFjHSa4whIBVoA-awy Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org > On Oct 7, 2021, at 7:32 PM, Dave Wysochanski wrote: >=20 > Convert to the new VM readahead() API which is the preferred API > to read multiple pages, and rename the NFSIOS_* counters and the > tracepoint as needed. >=20 > Signed-off-by: Dave Wysochanski > --- > fs/nfs/file.c | 2 +- > fs/nfs/nfstrace.h | 2 +- > fs/nfs/read.c | 21 +++++++++++++++------ > include/linux/nfs_fs.h | 3 +-- > include/linux/nfs_iostat.h | 6 +++--- > 5 files changed, 21 insertions(+), 13 deletions(-) >=20 > diff --git a/fs/nfs/file.c b/fs/nfs/file.c > index 209dac208477..cc76d17fa97f 100644 > --- a/fs/nfs/file.c > +++ b/fs/nfs/file.c > @@ -519,7 +519,7 @@ static void nfs_swap_deactivate(struct file *file) >=20 > const struct address_space_operations nfs_file_aops =3D { > .readpage =3D nfs_readpage, > - .readpages =3D nfs_readpages, > + .readahead =3D nfs_readahead, > .set_page_dirty =3D __set_page_dirty_nobuffers, > .writepage =3D nfs_writepage, > .writepages =3D nfs_writepages, > diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h > index 78b0f649dd09..d2b2080765a6 100644 > --- a/fs/nfs/nfstrace.h > +++ b/fs/nfs/nfstrace.h > @@ -915,7 +915,7 @@ > ) > ); >=20 > -TRACE_EVENT(nfs_aops_readpages, > +TRACE_EVENT(nfs_aops_readahead, In v2 and v3 of my patch, this tracepoint has already been renamed to nfs_aop_readahead. > TP_PROTO( > const struct inode *inode, > unsigned int nr_pages > diff --git a/fs/nfs/read.c b/fs/nfs/read.c > index 927504605e0f..5c2aab47cf1d 100644 > --- a/fs/nfs/read.c > +++ b/fs/nfs/read.c > @@ -395,15 +395,19 @@ int nfs_readpage(struct file *file, struct page *pa= ge) > return ret; > } >=20 > -int nfs_readpages(struct file *file, struct address_space *mapping, > - struct list_head *pages, unsigned nr_pages) > +void nfs_readahead(struct readahead_control *ractl) > { > + struct file *file =3D ractl->file; > + struct address_space *mapping =3D ractl->mapping; > + struct page *page; > + unsigned int nr_pages =3D readahead_count(ractl); > + > struct nfs_readdesc desc; > struct inode *inode =3D mapping->host; > int ret; >=20 > - trace_nfs_aops_readpages(inode, nr_pages); > - nfs_inc_stats(inode, NFSIOS_VFSREADPAGES); > + trace_nfs_aops_readahead(inode, nr_pages); > + nfs_inc_stats(inode, NFSIOS_VFSREADAHEAD); >=20 > ret =3D -ESTALE; > if (NFS_STALE(inode)) > @@ -420,13 +424,18 @@ int nfs_readpages(struct file *file, struct address= _space *mapping, > nfs_pageio_init_read(&desc.pgio, inode, false, > &nfs_async_read_completion_ops); >=20 > - ret =3D read_cache_pages(mapping, pages, readpage_async_filler, &desc); > + ret =3D 0; > + while (!ret && (page =3D readahead_page(ractl))) { > + prefetchw(&page->flags); > + ret =3D readpage_async_filler(&desc, page); > + put_page(page); > + } >=20 > nfs_pageio_complete_read(&desc.pgio); >=20 > put_nfs_open_context(desc.ctx); > out: > - return ret; > + return; > } >=20 > int __init nfs_init_readpagecache(void) > diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h > index b9a8b925db43..6cbe3f2c5669 100644 > --- a/include/linux/nfs_fs.h > +++ b/include/linux/nfs_fs.h > @@ -580,8 +580,7 @@ extern int nfs_access_get_cached(struct inode *inode,= const struct cred *cred, s > * linux/fs/nfs/read.c > */ > extern int nfs_readpage(struct file *, struct page *); > -extern int nfs_readpages(struct file *, struct address_space *, > - struct list_head *, unsigned); > +extern void nfs_readahead(struct readahead_control *); >=20 > /* > * inline functions > diff --git a/include/linux/nfs_iostat.h b/include/linux/nfs_iostat.h > index 027874c36c88..418145f23700 100644 > --- a/include/linux/nfs_iostat.h > +++ b/include/linux/nfs_iostat.h > @@ -22,7 +22,7 @@ > #ifndef _LINUX_NFS_IOSTAT > #define _LINUX_NFS_IOSTAT >=20 > -#define NFS_IOSTAT_VERS "1.1" > +#define NFS_IOSTAT_VERS "1.2" >=20 > /* > * NFS byte counters > @@ -53,7 +53,7 @@ > * NFS page counters > * > * These count the number of pages read or written via nfs_readpage(), > - * nfs_readpages(), or their write equivalents. > + * nfs_readahead(), or their write equivalents. > * > * NB: When adding new byte counters, please include the measured > * units in the name of each byte counter to help users of this > @@ -98,7 +98,7 @@ enum nfs_stat_eventcounters { > NFSIOS_VFSACCESS, > NFSIOS_VFSUPDATEPAGE, > NFSIOS_VFSREADPAGE, > - NFSIOS_VFSREADPAGES, > + NFSIOS_VFSREADAHEAD, I'm wondering if you should add NFSIOS_VFSREADAHEAD but leave NFSIOS_VFSREADPAGES? I don't remember exactly how the mountstats API versioning is supposed to work. > NFSIOS_VFSWRITEPAGE, > NFSIOS_VFSWRITEPAGES, > NFSIOS_VFSGETDENTS, > --=20 > 1.8.3.1 >=20 -- Chuck Lever