diff options
| author | Christoph Hellwig <hch@lst.de> | 2025-07-10 15:33:37 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-07-14 10:51:33 +0200 |
| commit | c5690dd0197809bc5305f474a71b2e71e7eac0ff (patch) | |
| tree | 42f77dbe9978cb2047dca9dc3c2f982a54a8b9cf /Documentation/filesystems/iomap | |
| parent | e6caf01d3f57687777d0e15400ffdd3917ce7f72 (diff) | |
iomap: add read_folio_range() handler for buffered writes
Add a read_folio_range() handler for buffered writes that filesystems
may pass in if they wish to provide a custom handler for synchronously
reading in the contents of a folio.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
[hch: renamed to read_folio_range, pass less arguments]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/20250710133343.399917-14-hch@lst.de
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'Documentation/filesystems/iomap')
| -rw-r--r-- | Documentation/filesystems/iomap/operations.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/filesystems/iomap/operations.rst b/Documentation/filesystems/iomap/operations.rst index a9b48ce4af92..067ed8e14ef3 100644 --- a/Documentation/filesystems/iomap/operations.rst +++ b/Documentation/filesystems/iomap/operations.rst @@ -68,6 +68,8 @@ The following address space operations can be wrapped easily: void (*put_folio)(struct inode *inode, loff_t pos, unsigned copied, struct folio *folio); bool (*iomap_valid)(struct inode *inode, const struct iomap *iomap); + int (*read_folio_range)(const struct iomap_iter *iter, + struct folio *folio, loff_t pos, size_t len); }; iomap calls these functions: @@ -123,6 +125,10 @@ iomap calls these functions: ``->iomap_valid``, then the iomap should considered stale and the validation failed. + - ``read_folio_range``: Called to synchronously read in the range that will + be written to. If this function is not provided, iomap will default to + submitting a bio read request. + These ``struct kiocb`` flags are significant for buffered I/O with iomap: * ``IOCB_NOWAIT``: Turns on ``IOMAP_NOWAIT``. |
