Skip to content

Initial conversion of NFS basic I/O to use folios

[email protected] linux-nfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest18 patches 4 repliesIn review
  2. v117 patches 1 replySuperseded

Changes in v2 from the cover letter

- Fix a bisectability issue reported by Anna
- Remove an unnecessary NULL pointer check in nfs_read_folio()

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18NFS: Fix for xfstests generic/208fs/nfs/pagelist.c+3 -00 replies
2/18NFS: Add basic functionality for tracking folios in struct nfs_pagefs/nfs/pagelist.c include/linux/nfs_page.h+40 -30 replies
3/18NFS: Support folios in nfs_generic_pgio()fs/nfs/internal.h fs/nfs/pagelist.c+60 -150 replies
4/18NFS: Fix nfs_coalesce_size() to work with foliosfs/nfs/pagelist.c include/linux/nfs_page.h+34 -90 replies
5/18NFS: Add a helper to convert a struct nfs_page into an inodefs/nfs/pagelist.c fs/nfs/write.c include/linux/nfs_page.h+17 -50 replies
6/18NFS: Convert the remaining pagelist helper functions to support foliosfs/nfs/pagelist.c+50 -220 replies
7/18NFS: Add a helper nfs_wb_folio()fs/nfs/file.c fs/nfs/write.c include/linux/nfs_fs.h+15 -10 replies
8/18NFS: Convert buffered reads to use foliosfs/nfs/internal.h fs/nfs/nfstrace.h fs/nfs/pagelist.c +2 more+100 -500 replies
9/18NFS: Convert the function nfs_wb_page() to use foliosfs/nfs/write.c+16 -190 replies
10/18NFS: Convert buffered writes to use foliosfs/nfs/file.c fs/nfs/internal.h fs/nfs/pnfs.h +3 more+210 -2000 replies
11/18NFS: Remove unused function nfs_wb_page()fs/nfs/write.c include/linux/nfs_fs.h+0 -60 replies
12/18NFS: Convert nfs_write_begin/end to use foliosfs/nfs/file.c+41 -340 replies
13/18NFS: Fix up nfs_vm_page_mkwrite() for foliosfs/nfs/file.c+10 -110 replies
14/18NFS: Clean up O_DIRECT request allocationfs/nfs/direct.c fs/nfs/pagelist.c include/linux/nfs_page.h+18 -180 replies
15/18NFS: fix up nfs_release_folio() to try to release the pagefs/nfs/file.c+7 -20 replies
16/18NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio()fs/nfs/file.c fs/nfs/nfstrace.h+42 -80 replies
17/18NFS: Improve tracing of nfs_wb_folio()fs/nfs/nfstrace.h fs/nfs/write.c+5 -40 replies
18/18NFS: Remove unnecessary check in nfs_read_folio()fs/nfs/read.c+1 -72 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/18] Initial conversion of NFS basic I/O to use folios

From: Trond Myklebust <[email protected]>

This set of patches represents an initial effort to convert the page cache I/O in the NFS client to use native folio functionality. It should allow the nfs_page structs and their helpers to carry folios (including folios of order > 0) and to pass their data contents through to the RPC layer.
Note that because O_DIRECT uses pages, we still need to support the traditional page based I/O, and so the new struct nfs_page will carry both types.
I did not touch the fscache code, but I expect that to be able to continue to work with order 0 folios.

The plan is to merge this functionality with order 0 folios first, in order to catch any regressions in existing functionality. Then we can enable order n > 0 once we're happy about the stability (at least for the non-fscache case).

At this point, the xfstests are all passing without any regressions on my setup, so I'm throwing the patches over the fence to allow for wider testing.
Please make sure, in particular to test pNFS if your server supports it. I didn't have to make any changes to the pNFS code, and I don't expect any trouble, but it would be good to have validation of that assumption.

---
v2:
- Fix a bisectability issue reported by Anna
- Remove an unnecessary NULL pointer check in nfs_read_folio()

Trond Myklebust (18):
NFS: Fix for xfstests generic/208
NFS: Add basic functionality for tracking folios in struct nfs_page
NFS: Support folios in nfs_generic_pgio()
NFS: Fix nfs_coalesce_size() to work with folios
NFS: Add a helper to convert a struct nfs_page into an inode
NFS: Convert the remaining pagelist helper functions to support folios
NFS: Add a helper nfs_wb_folio()
NFS: Convert buffered reads to use folios
NFS: Convert the function nfs_wb_page() to use folios
NFS: Convert buffered writes to use folios
NFS: Remove unused function nfs_wb_page()
NFS: Convert nfs_write_begin/end to use folios
NFS: Fix up nfs_vm_page_mkwrite() for folios
NFS: Clean up O_DIRECT request allocation
NFS: fix up nfs_release_folio() to try to release the page
NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio()
NFS: Improve tracing of nfs_wb_folio()
NFS: Remove unnecessary check in nfs_read_folio()

 fs/nfs/direct.c          |  12 +-
 fs/nfs/file.c            | 124 +++++++------
 fs/nfs/internal.h        |  38 ++--
 fs/nfs/nfstrace.h        |  58 ++++--
 fs/nfs/pagelist.c        | 217 +++++++++++++++++-----
 fs/nfs/pnfs.h            |  10 +-
 fs/nfs/pnfs_nfs.c        |  18 +-
 fs/nfs/read.c            |  94 +++++-----
 fs/nfs/write.c           | 380 ++++++++++++++++++++-------------------
 include/linux/nfs_fs.h   |   7 +-
 include/linux/nfs_page.h |  79 +++++++-
 11 files changed, 646 insertions(+), 391 deletions(-)
Signature · 1 line
2.39.0