[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230609042239.GA1436857@mit.edu>
Date: Fri, 9 Jun 2023 00:22:39 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Krister Johansen <kjlx@...pleofstupid.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [e2fsprogs PATCH] resize2fs: use directio when reading superblock
On Wed, Jun 07, 2023 at 11:50:41AM -0700, Krister Johansen wrote:
> The growpart / resize2fs in the reproducer are essentially verbatim from
> our system provisioning scripts. Unless those modify the UUID, we're
> not taking any explicit action to do so.
Ah, OK. OK, I'm guessing that your system provisioning scripts are
attempting mess with the file system a lot (creating, deleting, etc.)
files while trying to run resize2fs in parallel, then?
As far as your patch is concerned, resize2fs can do both off-line
(unmounted) and on-line (mounted) resizes. And turning direct I/O
unconditionally isn't a great idea for off-line resizes --- it will
really trash the performance of the resize. Does this patch work for
you instead?
- Ted
diff --git a/resize/main.c b/resize/main.c
index 94f5ec6d..f914c050 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -409,6 +409,8 @@ int main (int argc, char ** argv)
if (!(mount_flags & EXT2_MF_MOUNTED) && !print_min_size)
io_flags = EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE;
+ if (mount_flags & EXT2_MF_MOUNTED)
+ io_flags |= EXT2_FLAG_DIRECT_IO;
io_flags |= EXT2_FLAG_64BITS | EXT2_FLAG_THREADS;
if (undo_file) {
Powered by blists - more mailing lists