]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Revert "f2fs: use flush command instead of FUA for zoned device"
authorWenjie Cheng <cwjhust@gmail.com>
Fri, 14 Jun 2024 00:48:41 +0000 (00:48 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 15 Aug 2024 15:26:40 +0000 (15:26 +0000)
This reverts commit c550e25bca660ed2554cbb48d32b82d0bb98e4b1.

Commit c550e25bca660ed2554cbb48d32b82d0bb98e4b1 ("f2fs: use flush
command instead of FUA for zoned device") used additional flush
command to keep write order.

Since Commit dd291d77cc90eb6a86e9860ba8e6e38eebd57d12 ("block:
Introduce zone write plugging") has enabled the block layer to
handle this order issue, there is no need to use flush command.

Signed-off-by: Wenjie Cheng <cwjhust@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
fs/f2fs/node.c

index a458eb080198e1d1a776eb5400d90271b618a9d3..a7a3e6ac7f681825691a835b6dd8d61c447859a0 100644 (file)
@@ -375,8 +375,7 @@ sync_nodes:
        f2fs_remove_ino_entry(sbi, ino, APPEND_INO);
        clear_inode_flag(inode, FI_APPEND_WRITE);
 flush_out:
-       if ((!atomic && F2FS_OPTION(sbi).fsync_mode != FSYNC_MODE_NOBARRIER) ||
-           (atomic && !test_opt(sbi, NOBARRIER) && f2fs_sb_has_blkzoned(sbi)))
+       if (!atomic && F2FS_OPTION(sbi).fsync_mode != FSYNC_MODE_NOBARRIER)
                ret = f2fs_issue_flush(sbi, inode->i_ino);
        if (!ret) {
                f2fs_remove_ino_entry(sbi, ino, UPDATE_INO);
index 58721a55f1734c6cb41f774c73ad0ec11514a500..2fe182f7359954a174d7d0b619029616cf53c2bf 100644 (file)
@@ -1674,7 +1674,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
                goto redirty_out;
        }
 
-       if (atomic && !test_opt(sbi, NOBARRIER) && !f2fs_sb_has_blkzoned(sbi))
+       if (atomic && !test_opt(sbi, NOBARRIER))
                fio.op_flags |= REQ_PREFLUSH | REQ_FUA;
 
        /* should add to global list before clearing PAGECACHE status */