From patchwork Thu Jan 19 21:33:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 13109158 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12C6CC46467 for ; Fri, 20 Jan 2023 05:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229528AbjATFKr (ORCPT ); Fri, 20 Jan 2023 00:10:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbjATFJm (ORCPT ); Fri, 20 Jan 2023 00:09:42 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08EB6AD02 for ; Thu, 19 Jan 2023 20:57:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3C6C5B82745 for ; Thu, 19 Jan 2023 21:40:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87D93C433F0; Thu, 19 Jan 2023 21:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674164417; bh=DQlO/1BB5dJCEHvIRqz0h/0FLGl9QaRIdYVSKIm5FDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LjqnzWvAgvYzmw3Jf81e8dkGus6p2KGF+npoFrIug1Ier3FB5+BpBmfPtjvk5QTnz yFzaPqx5hEa5sZwIsBSrwIYA7M6DgOyqeowyQ1xiZatHIKiDtAIMMcyn4IYh/mOyZO LYuvu3X7S5cNtT4nrpqx8vlp/MFcHB6l5bAiDmwE15pqT6jw35BxpdiX5xh1ozp2SD 06+lgAS0DQq4eRITJDCDLnH17IF0wTWdODFrvHdqB3b1nw6r538pJJqskvDVMD65+a UmDZQmUzF35wgduszxOhzosmFPgpedpgbzzO7SWsvL7vGCiy5cdjsPOyDyBou3X3zq a36xaSfwvBibw== From: trondmy@kernel.org To: Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 01/18] NFS: Fix for xfstests generic/208 Date: Thu, 19 Jan 2023 16:33:34 -0500 Message-Id: <20230119213351.443388-2-trondmy@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119213351.443388-1-trondmy@kernel.org> References: <20230119213351.443388-1-trondmy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust If the same page and data is being used for multiple requests, then ignore that when the request indicates we're reading from the start of the page. Signed-off-by: Trond Myklebust --- fs/nfs/pagelist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 16be6dae524f..369e4553399a 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -920,6 +920,9 @@ int nfs_generic_pgio(struct nfs_pageio_descriptor *desc, req = nfs_list_entry(head->next); nfs_list_move_request(req, &hdr->pages); + if (req->wb_pgbase == 0) + last_page = NULL; + if (!last_page || last_page != req->wb_page) { pageused++; if (pageused > pagecount)