diff options
author | Jan Kara <jack@suse.cz> | 2022-12-07 12:27:05 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-12-08 21:49:25 -0500 |
commit | dff4ac75eeeefc4397fe7cf8ce559425bf46b1f7 (patch) | |
tree | 89aa03b1966de1a8dcb907b1e76ebca61e897d50 /fs/ext4/ext4.h | |
parent | 04e568a3b31cfbd545c04c8bfc35c20e5ccfce0f (diff) |
ext4: move keep_towrite handling to ext4_bio_write_page()
When we are writing back page but we cannot for some reason write all
its buffers (e.g. because we cannot allocate blocks in current context) we
have to keep TOWRITE tag set in the mapping as otherwise racing
WB_SYNC_ALL writeback that could write these buffers can skip the page
and result in data loss. We will need this logic for writeback during
transaction commit so move the logic from ext4_writepage() to
ext4_bio_write_page().
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20221207112722.22220-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 4e739902dc03..0540929630a1 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -3757,8 +3757,7 @@ extern void ext4_end_io_rsv_work(struct work_struct *work); extern void ext4_io_submit(struct ext4_io_submit *io); extern int ext4_bio_write_page(struct ext4_io_submit *io, struct page *page, - int len, - bool keep_towrite); + int len); extern struct ext4_io_end_vec *ext4_alloc_io_end_vec(ext4_io_end_t *io_end); extern struct ext4_io_end_vec *ext4_last_io_end_vec(ext4_io_end_t *io_end); |