Skip to contentSkip to conversation

Revert "f2fs: use flush command instead of FUA for zoned device"

PATCH Applied Wenjie Cheng 4 participants 10 messages Jun 14, 2024 – Aug 5, 2024 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "f2fs: use flush command instead of FUA for zoned device"

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.

---
 fs/f2fs/file.c | 3 +--
 fs/f2fs/node.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +1 -2
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
 	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);
fs/f2fs/node.c +1 -1
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */
Signature · 1 line
2.34.1
maintainer
#1 lore raw

Jaegeuk,

Quoted commit message from commit c550e25bca66 ("f2fs: use flush command instead of FUA for zoned device")
"
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order.
"

It seems mq-deadline use fifo queue and make queue depth of zone device as 1 to IO order, so why FUA'ed write node IOs can be reordered by block layer?

Thanks,

Quoted 43 lines · Wenjie Cheng

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.

---
  fs/f2fs/file.c | 3 +--
  fs/f2fs/node.c | 2 +-
  2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +1 -2
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
  	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);
fs/f2fs/node.c +1 -1
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */
#2 lore raw

RE:(2) [f2fs-dev] [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

Hi Chao,

Quoted 9 lines

Jaegeuk,

Quoted commit message from commit c550e25bca66 ("f2fs: use flush command instead of FUA for zoned device")
"
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order.
"

Quoted 3 lines

It seems mq-deadline use fifo queue and make queue depth of zone device as 1 to IO order, so why FUA'ed write node IOs can be reordered by block layer?

While other writes are aligned by the mq-deadline, write with FUA is not passed to the scheduler but handled at the block layer.

Thanks,
Daejun

Quoted 47 lines

Thanks,

Quoted 43 lines · Wenjie Cheng

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.

---
  fs/f2fs/file.c 3 +--
  fs/f2fs/node.c 2 +-

  2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +0 -0
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
            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);

fs/f2fs/node.c +0 -0
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */

maintainer
#3 lore raw

Re: (2) [f2fs-dev] [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

Quoted 11 lines · Daejun Park

Hi Chao,

Quoted 9 lines

Jaegeuk,

Quoted commit message from commit c550e25bca66 ("f2fs: use flush command instead of FUA for zoned device")
"
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order.
"

Quoted 6 lines
Quoted 3 lines

It seems mq-deadline use fifo queue and make queue depth of zone device as 1 to IO order, so why FUA'ed write node IOs can be reordered by block layer?

While other writes are aligned by the mq-deadline, write with FUA is not passed to the scheduler but handled at the block layer.

Hi Daejun,

IIUC, do you mean write w/ FUA may be handled directly in below path?

- blk_mq_submit_bio
- op_is_flush && blk_insert_flush

Thanks,

Quoted 51 lines

Thanks,
Daejun

Quoted 47 lines

Thanks,

Quoted 43 lines · Wenjie Cheng

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.

---
  fs/f2fs/file.c 3 +--
  fs/f2fs/node.c 2 +-

   2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +1 -2
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
            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);
fs/f2fs/node.c +1 -1
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */
#4 lore raw

RE:(2) (2) [f2fs-dev] [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

Quoted 19 lines · Daejun Park
Quoted 11 lines

Hi Chao,

Quoted 9 lines

Jaegeuk,

Quoted commit message from commit c550e25bca66 ("f2fs: use flush command instead of FUA for zoned device")
"
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order.
"

Quoted 6 lines
Quoted 3 lines

It seems mq-deadline use fifo queue and make queue depth of zone device as 1 to IO order, so why FUA'ed write node IOs can be reordered by block layer?

While other writes are aligned by the mq-deadline, write with FUA is not passed to the scheduler but handled at the block layer.

Quoted 6 lines

Hi Daejun,

IIUC, do you mean write w/ FUA may be handled directly in below path?

- blk_mq_submit_bio
  - op_is_flush && blk_insert_flush

Hi Chao,

Yes, I think the path caused an unaligned write when the zone lock was being applied by mq-deadline.

Quoted 54 lines

Thanks,

Quoted 51 lines

Thanks,
Daejun

Quoted 47 lines

Thanks,

Quoted 43 lines · Wenjie Cheng

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.

---
    fs/f2fs/file.c 3 +--
    fs/f2fs/node.c 2 +-

    2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +0 -0
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
              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);

fs/f2fs/node.c +0 -0
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */

maintainer
#5 lore raw

Re: (2) (2) [f2fs-dev] [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

Quoted 23 lines · Daejun Park
Quoted 23 lines · Daejun Park
Quoted 11 lines

Hi Chao,

Quoted 9 lines

Jaegeuk,

Quoted commit message from commit c550e25bca66 ("f2fs: use flush command instead of FUA for zoned device")
"
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order.
"

Quoted 6 lines
Quoted 3 lines

It seems mq-deadline use fifo queue and make queue depth of zone device as 1 to IO order, so why FUA'ed write node IOs can be reordered by block layer?

While other writes are aligned by the mq-deadline, write with FUA is not passed to the scheduler but handled at the block layer.

Hi Daejun,

IIUC, do you mean write w/ FUA may be handled directly in below path?

Quoted 7 lines
Quoted 2 lines

- blk_mq_submit_bio
  - op_is_flush && blk_insert_flush

Hi Chao,

Yes, I think the path caused an unaligned write when the zone lock was being applied by mq-deadline.

But, blk_insert_flush() may return false due to policy should be REQ_FSEQ_DATA or REQ_FSEQ_DATA | REQ_FSEQ_POSTFLUSH, then blk_mq_insert_request() after blk_insert_flush() will be called?

Thanks,

Quoted 55 lines
Quoted 55 lines

Thanks,

Quoted 51 lines

Thanks,
Daejun

Quoted 47 lines

Thanks,

Quoted 43 lines · Wenjie Cheng

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.

---
    fs/f2fs/file.c 3 +--
    fs/f2fs/node.c 2 +-

     2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +1 -2
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
              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);
fs/f2fs/node.c +1 -1
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */
#6 lore raw

RE:(2) (2) (2) [f2fs-dev] [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

Quoted 27 lines · Daejun Park
Quoted 26 lines
Quoted 25 lines · Daejun Park
Quoted 11 lines

Hi Chao,

Quoted 9 lines

Jaegeuk,

Quoted commit message from commit c550e25bca66 ("f2fs: use flush command instead of FUA for zoned device")
"
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order.
"

Quoted 6 lines
Quoted 3 lines

It seems mq-deadline use fifo queue and make queue depth of zone device as 1 to IO order, so why FUA'ed write node IOs can be reordered by block layer?

While other writes are aligned by the mq-deadline, write with FUA is not passed to the scheduler but handled at the block layer.

Hi Daejun,

IIUC, do you mean write w/ FUA may be handled directly in below path?

- blk_mq_submit_bio
    - op_is_flush && blk_insert_flush

Quoted 9 lines
Quoted 4 lines

Hi Chao,

Yes, I think the path caused an unaligned write when the zone lock was being applied by mq-deadline.

But, blk_insert_flush() may return false due to policy should be REQ_FSEQ_DATA or REQ_FSEQ_DATA REQ_FSEQ_POSTFLUSH, then blk_mq_insert_request() after blk_insert_flush() will be called?

I was just discussing the handling of FUAs in commit c550e25bca66, which is not an issue in the current code as FUAs are handled correctly.

Thanks,

Quoted 57 lines

Thanks,

Quoted 55 lines
Quoted 55 lines

Thanks,

Quoted 51 lines

Thanks,
Daejun

Quoted 47 lines

Thanks,

Quoted 43 lines · Wenjie Cheng

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.

---
      fs/f2fs/file.c 3 +--
      fs/f2fs/node.c 2 +-

      2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +0 -0
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
                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);

fs/f2fs/node.c +0 -0
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */

maintainer
#7 lore raw

Re: (2) (2) (2) [f2fs-dev] [PATCH] Revert "f2fs: use flush command instead of FUA for zoned device"

Quoted 32 lines · Daejun Park
Quoted 32 lines · Daejun Park
Quoted 30 lines
Quoted 19 lines · Daejun Park
Quoted 11 lines

Hi Chao,

Quoted 9 lines

Jaegeuk,

Quoted commit message from commit c550e25bca66 ("f2fs: use flush command instead of FUA for zoned device")
"
The block layer for zoned disk can reorder the FUA'ed IOs. Let's use flush command to keep the write order.
"

Quoted 6 lines
Quoted 3 lines

It seems mq-deadline use fifo queue and make queue depth of zone device as 1 to IO order, so why FUA'ed write node IOs can be reordered by block layer?

While other writes are aligned by the mq-deadline, write with FUA is not passed to the scheduler but handled at the block layer.

Quoted 6 lines

Hi Daejun,

IIUC, do you mean write w/ FUA may be handled directly in below path?

- blk_mq_submit_bio
    - op_is_flush && blk_insert_flush

Hi Chao,

Yes, I think the path caused an unaligned write when the zone lock was being applied by mq-deadline.

Quoted 7 lines
Quoted 4 lines

But, blk_insert_flush() may return false due to policy should be REQ_FSEQ_DATA or REQ_FSEQ_DATA REQ_FSEQ_POSTFLUSH, then blk_mq_insert_request() after blk_insert_flush() will be called?

I was just discussing the handling of FUAs in commit c550e25bca66, which is not an issue in the current code as FUAs are handled correctly.

Yup, I think it needs to be reverted. :)

Thanks,

Quoted 61 lines

Thanks,

Quoted 57 lines

Thanks,

Quoted 55 lines
Quoted 55 lines

Thanks,

Quoted 51 lines

Thanks,
Daejun

Quoted 47 lines

Thanks,

Quoted 43 lines · Wenjie Cheng

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.

---
      fs/f2fs/file.c 3 +--
      fs/f2fs/node.c 2 +-

       2 files changed, 2 insertions(+), 3 deletions(-)
fs/f2fs/file.c +1 -2
index eae2e7908072..f08e6208e183 100644
@@ -372,8 +372,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
                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);
fs/f2fs/node.c +1 -1
index 144f9f966690..c45d341dcf6e 100644
@@ -1631,7 +1631,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 */
maintainer Reviewed-by on v1 1/1
#8 lore raw
In reply to Wenjie Cheng
Quoted 11 lines · Wenjie Cheng

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.

Thanks,

#9 lore raw
In reply to Wenjie Cheng
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 11 lines · On Fri, 14 Jun 2024 00:48:41 +0000 you wrote:

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.

[...]

Here is the summary with links:
- [f2fs-dev] Revert "f2fs: use flush command instead of FUA for zoned device"

    https://git.kernel.org/jaegeuk/f2fs/c/2a331ab343ee

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html