Skip to content

Commit 7e6cea5

Browse files
joannekoongbrauner
authored andcommitted
docs: document iomap writeback's iomap_finish_folio_write() requirement
Document that iomap_finish_folio_write() must be called after writeback on the range completes. Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Link: https://patch.msgid.link/20251111193658.3495942-4-joannelkoong@gmail.com Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 9d875e0 commit 7e6cea5

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Documentation/filesystems/iomap/operations.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ The fields are as follows:
361361
delalloc reservations to avoid having delalloc reservations for
362362
clean pagecache.
363363
This function must be supplied by the filesystem.
364+
If this succeeds, iomap_finish_folio_write() must be called once writeback
365+
completes for the range, regardless of whether the writeback succeeded or
366+
failed.
364367

365368
- ``writeback_submit``: Submit the previous built writeback context.
366369
Block based file systems should use the iomap_ioend_writeback_submit

include/linux/iomap.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@ struct iomap_writeback_ops {
435435
* An existing mapping from a previous call to this method can be reused
436436
* by the file system if it is still valid.
437437
*
438+
* If this succeeds, iomap_finish_folio_write() must be called once
439+
* writeback completes for the range, regardless of whether the
440+
* writeback succeeded or failed.
441+
*
438442
* Returns the number of bytes processed or a negative errno.
439443
*/
440444
ssize_t (*writeback_range)(struct iomap_writepage_ctx *wpc,

0 commit comments

Comments
 (0)