Patch "f2fs: allow direct read for zoned device" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    f2fs: allow direct read for zoned device

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     f2fs-allow-direct-read-for-zoned-device.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 689fe57e7ecefd2eeba76c32aa569bb3e1e790d9 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
Date: Fri, 30 Sep 2022 15:48:24 -0700
Subject: f2fs: allow direct read for zoned device

From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>

commit 689fe57e7ecefd2eeba76c32aa569bb3e1e790d9 upstream.

This reverts dbf8e63f48af ("f2fs: remove device type check for direct IO"),
and apply the below first version, since it contributed out-of-order DIO writes.

For zoned devices, f2fs forbids direct IO and forces buffered IO
to serialize write IOs. However, the constraint does not apply to
read IOs.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: dbf8e63f48af ("f2fs: remove device type check for direct IO")
Signed-off-by: Eunhee Rho <eunhee83.rho@xxxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/f2fs/f2fs.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -4513,7 +4513,12 @@ static inline bool f2fs_force_buffered_i
 	/* disallow direct IO if any of devices has unaligned blksize */
 	if (f2fs_is_multi_device(sbi) && !sbi->aligned_blksize)
 		return true;
-
+	/*
+	 * for blkzoned device, fallback direct IO to buffered IO, so
+	 * all IOs can be serialized by log-structured write.
+	 */
+	if (f2fs_sb_has_blkzoned(sbi) && (rw == WRITE))
+		return true;
 	if (f2fs_lfs_mode(sbi) && (rw == WRITE)) {
 		if (block_unaligned_IO(inode, iocb, iter))
 			return true;


Patches currently in stable-queue which might be from jaegeuk@xxxxxxxxxx are

queue-6.0/f2fs-increase-the-limit-for-reserve_root.patch
queue-6.0/f2fs-fix-to-do-sanity-check-on-destination-blkaddr-during-recovery.patch
queue-6.0/f2fs-allow-direct-read-for-zoned-device.patch
queue-6.0/f2fs-complete-checkpoints-during-remount.patch
queue-6.0/f2fs-flush-pending-checkpoints-when-freezing-super.patch
queue-6.0/f2fs-fix-to-do-sanity-check-on-summary-info.patch
queue-6.0/f2fs-fix-wrong-continue-condition-in-gc.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux