Patch "ext4: don't run ext4lazyinit for read-only filesystems" 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

    ext4: don't run ext4lazyinit for read-only filesystems

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:
     ext4-don-t-run-ext4lazyinit-for-read-only-filesystem.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.



commit 4d73901a7589cf662b6a771fd2746713c4cef252
Author: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
Date:   Sun Jul 31 20:24:53 2022 -0700

    ext4: don't run ext4lazyinit for read-only filesystems
    
    [ Upstream commit 426d15ad11419066f7042ffa8fbf1b5c21a1ecbe ]
    
    On a read-only filesystem, we won't invoke the block allocator, so we
    don't need to prefetch the block bitmaps.
    
    This avoids starting and running the ext4lazyinit thread at all on a
    system with no read-write ext4 filesystems (for instance, a container VM
    with read-only filesystems underneath an overlayfs).
    
    Fixes: 21175ca434c5 ("ext4: make prefetch_block_bitmaps default")
    Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
    Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/48b41da1498fcac3287e2e06b660680646c1c050.1659323972.git.josh@xxxxxxxxxxxxxxxx
    Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 323dbcfd285c..091db733834e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3962,9 +3962,9 @@ int ext4_register_li_request(struct super_block *sb,
 		goto out;
 	}
 
-	if (test_opt(sb, NO_PREFETCH_BLOCK_BITMAPS) &&
-	    (first_not_zeroed == ngroups || sb_rdonly(sb) ||
-	     !test_opt(sb, INIT_INODE_TABLE)))
+	if (sb_rdonly(sb) ||
+	    (test_opt(sb, NO_PREFETCH_BLOCK_BITMAPS) &&
+	     (first_not_zeroed == ngroups || !test_opt(sb, INIT_INODE_TABLE))))
 		goto out;
 
 	elr = ext4_li_request_new(sb, first_not_zeroed);



[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