|
|
Subscribe / Log in / New account

fuse: use iomap for buffered reads + readahead

From:  Joanne Koong <joannelkoong-AT-gmail.com>
To:  brauner-AT-kernel.org, miklos-AT-szeredi.hu
Subject:  [PATCH v1 00/16] fuse: use iomap for buffered reads + readahead
Date:  Fri, 29 Aug 2025 16:56:11 -0700
Message-ID:  <20250829235627.4053234-1-joannelkoong@gmail.com>
Cc:  hch-AT-infradead.org, djwong-AT-kernel.org, linux-fsdevel-AT-vger.kernel.org, kernel-team-AT-meta.com, linux-xfs-AT-vger.kernel.org, linux-doc-AT-vger.kernel.org
Archive-link:  Article

This series adds fuse iomap support for buffered reads and readahead.
This is needed so that granular uptodate tracking can be used in fuse when
large folios are enabled so that only the needed portions of the folio need to
be read in instead of having to read in the entire folio. It also is needed in
order to turn on large folios for servers that use the writeback cache since
otherwise there is a race condition that may lead to data corruption if there
is a partial write, then a read and the read happens before the write has
undergone writeback, since otherwise the folio will not be marked uptodate
from the partial write so the read will read in the entire folio from disk,
which will overwrite the partial write.

Part of this work is modifying the iomap interface to support non-bio
reads and to work on environments that do not have CONFIG_BLOCK enabled,
which is what patchsets 1 to 6 do.

This is on top of commit 4f702205 ("Merge branch 'vfs-6.18.rust' into
vfs.all") in Christian's vfs tree.

This series was run through fstests on fuse passthrough_hp with an
out-of kernel patch enabling fuse large folios.

This patchset does not enable large folios on fuse yet. That will be part
of a different patchset.

Thanks,
Joanne

Joanne Koong (16):
  iomap: move async bio read logic into helper function
  iomap: rename cur_folio_in_bio to folio_unlocked
  iomap: refactor read/readahead completion
  iomap: use iomap_iter->private for stashing read/readahead bio
  iomap: propagate iomap_read_folio() error to caller
  iomap: move read/readahead logic out of CONFIG_BLOCK guard
  iomap: iterate through entire folio in iomap_readpage_iter()
  iomap: rename iomap_readpage_iter() to iomap_readfolio_iter()
  iomap: rename iomap_readpage_ctx struct to iomap_readfolio_ctx
  iomap: add iomap_start_folio_read() helper
  iomap: make start folio read and finish folio read public APIs
  iomap: add iomap_read_ops for read and readahead
  iomap: add a private arg for read and readahead
  fuse: use iomap for read_folio
  fuse: use iomap for readahead
  fuse: remove fuse_readpages_end() null mapping check

 .../filesystems/iomap/operations.rst          |  19 ++
 block/fops.c                                  |   4 +-
 fs/erofs/data.c                               |   4 +-
 fs/fuse/file.c                                | 298 +++++++++-------
 fs/gfs2/aops.c                                |   4 +-
 fs/iomap/buffered-io.c                        | 321 +++++++++++-------
 fs/xfs/xfs_aops.c                             |   4 +-
 fs/zonefs/file.c                              |   4 +-
 include/linux/iomap.h                         |  24 +-
 9 files changed, 412 insertions(+), 270 deletions(-)

-- 
2.47.3




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds