ext4: don't run ext4lazyinit for read-only filesystems
authorJosh Triplett <josh@joshtriplett.org>
Mon, 1 Aug 2022 03:24:53 +0000 (20:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:35:01 +0000 (12:35 +0200)
commitbbf64eb1027309ed58080bc30fd37116da7c36cc
tree00ce73660f738940826adc9c5657d536f1e0899d
parent7a00a23207526c79bfaaf3b06411c4e3b1742902
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@joshtriplett.org>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Link: https://lore.kernel.org/r/48b41da1498fcac3287e2e06b660680646c1c050.1659323972.git.josh@joshtriplett.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/super.c