Skip to content

Commit 4474975

Browse files
author
Jaegeuk Kim
committed
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>
1 parent c872b62 commit 4474975

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/f2fs/data.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,11 @@ static bool page_is_mergeable(struct f2fs_sb_info *sbi, struct bio *bio,
733733
static bool io_type_is_mergeable(struct f2fs_bio_info *io,
734734
struct f2fs_io_info *fio)
735735
{
736+
blk_opf_t mask = ~(REQ_PREFLUSH | REQ_FUA);
737+
736738
if (io->fio.op != fio->op)
737739
return false;
738-
return io->fio.op_flags == fio->op_flags;
740+
return (io->fio.op_flags & mask) == (fio->op_flags & mask);
739741
}
740742

741743
static bool io_is_mergeable(struct f2fs_sb_info *sbi, struct bio *bio,

0 commit comments

Comments
 (0)