Re: [PATCH v4 0/5] nfs: modernize direct I/O path

From: Pranjal Shrivastava

Date: Mon Aug 10 2026 - 16:42:13 EST


On Mon, Aug 10, 2026 at 07:50:34PM +0000, Pranjal Shrivastava wrote:
> Modernize the NFS Direct I/O path as a preparatory step to enable PCI
> Peer-to-Peer DMA (P2PDMA) support. Following feedback on the initial
> RFC [1], the modernization and architectural changes are split into
> different series. Additionally, based on the discussion in the v2 [2]
> of this series, the migration of NFS Direct I/O to folios would be
> handled in a separate follow-up series.
>
> Currently, NFS O_DIRECT relies on the legacy iov_iter_get_pages_alloc2()
> API which does not support the pinning requirements for P2P memory.
> The implementation moves NFS to the modern iov_iter_extract_pages() API.
>

[...]

I'm calling out a few typos / non-code mistakes:

1. On the cover letter I missed updating the subject to v5 for this series
(the changelog is noted below).

2. I also accidentally dropped Christoph's Reviewed-by tags on patches
1, 2, and 3 during the rebase (given while reviewing v4 [1]).

Everything else in the series is correct as per the v5 changelog.
Please let me know what the right etiquette is? Shall I resend the series?

Apologies for the noise!

>
> [v5]
> - Fixed an iov_iter_revert oops in nfs_direct_extract_pages().
> - Fixed a refcount underflow in nfs_direct_release_pages() during
> swap-over-NFS by ensuring we do not call put_page() on unpinned memory.
> - Rebased on fs-next
>
> [v4]
> - https://lore.kernel.org/all/20260720150601.2702700-1-praan@xxxxxxxxxx/
> - Dropped superfluous externs in include/linux/nfs_page.h
> - Scoped `req` locally inside the loop in nfs_release_request_list()
> - Wrapped >80 character lines in Patch 1 to adhere to coding style.
> - Fixed typos and capitalization convention in the commit msgs
> - Collected Reviewed-by tags from Christoph and Shivaji
> - Rebased on fs-next
>
> [v3]
> - https://lore.kernel.org/all/20260715143540.3597616-1-praan@xxxxxxxxxx/
> - Dropped patches that added folio support for NFS Direct I/O
> - Folded requested_bytes accounting in patch 5 due to dropped folio support
> - Rebased on fs-next
>
> [v2]
> - https://lore.kernel.org/all/20260616134000.2733403-1-praan@xxxxxxxxxx/
> - Fix data corruption in nfs_direct_extract_pages() by correctly
> calculating intra-page offsets using offset_in_page().
> - Fix requested_bytes accounting in direct read/write paths to only
> increment after successful RPC scheduling.
> - Add missing kernel-doc descriptions for the @pinned parameter in
> nfs_page_create_from_page() and nfs_page_create_from_folio().
> - Rebase on fs-next/
>
> [v1] https://lore.kernel.org/all/20260603053033.3300318-1-praan@xxxxxxxxxx/
>
> Pranjal Shrivastava (5):
> nfs: make nfs_page pin-aware
> nfs: track number of pinned pages in nfs_page
> nfs: introduce nfs_release_request_list helper
> nfs: migrate direct I/O to iov_iter_extract_pages
> nfs: introduce nfs_direct_extract_pages helper
>
> fs/nfs/direct.c | 139 ++++++++++++++++++++-------------------
> fs/nfs/pagelist.c | 62 ++++++++++++++---
> fs/nfs/read.c | 2 +-
> fs/nfs/write.c | 2 +-
> include/linux/nfs_page.h | 8 ++-
> 5 files changed, 130 insertions(+), 83 deletions(-)
>
>
> base-commit: 5b57716ed7ad2f4b1724461c8777015c4e4befb1
> --
> 2.55.0.679.g6767b8d81c-goog
>

Thanks,
Praan

[1] https://lore.kernel.org/all/20260720150601.2702700-1-praan@xxxxxxxxxx/