NFS: Fix for xfstests generic/208
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 19 Jan 2023 21:33:34 +0000 (16:33 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 14 Feb 2023 19:22:32 +0000 (14:22 -0500)
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 <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/pagelist.c

index 16be6dae524f99c946a277aedde9c8d42f9332d8..369e4553399a057b6d4d12963c838f300c41c8ff 100644 (file)
@@ -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)