diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-09-04 18:08:08 +0000 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-09-09 03:26:36 +0000 |
| commit | 44749759d5e61479f747f2f5471b161861172aaf (patch) | |
| tree | dfdb3b04ec92921f8b3dec273a27444daec38cad | |
| parent | c872b6279cd26762339ff02513e2a3f16149a6f1 (diff) | |
f2fs: merge FUA command with the existing writes
FUA writes can be merged to the existing write IOs.
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/data.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 7961e0ddfca3..30cb2f230690 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -733,9 +733,11 @@ static bool page_is_mergeable(struct f2fs_sb_info *sbi, struct bio *bio, static bool io_type_is_mergeable(struct f2fs_bio_info *io, struct f2fs_io_info *fio) { + blk_opf_t mask = ~(REQ_PREFLUSH | REQ_FUA); + if (io->fio.op != fio->op) return false; - return io->fio.op_flags == fio->op_flags; + return (io->fio.op_flags & mask) == (fio->op_flags & mask); } static bool io_is_mergeable(struct f2fs_sb_info *sbi, struct bio *bio, |
