From: "Theodore Ts'o" <tytso@mit.edu>
To: Krister Johansen <kjlx@templeofstupid.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [e2fsprogs PATCH] resize2fs: use directio when reading superblock
Date: Fri, 9 Jun 2023 00:22:39 -0400 [thread overview]
Message-ID: <20230609042239.GA1436857@mit.edu> (raw)
In-Reply-To: <20230607185041.GA2023@templeofstupid.com>
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) {
next prev parent reply other threads:[~2023-06-09 4:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 22:52 [e2fsprogs PATCH] resize2fs: use directio when reading superblock Krister Johansen
2023-06-07 13:39 ` Theodore Ts'o
2023-06-07 18:50 ` Krister Johansen
2023-06-09 4:22 ` Theodore Ts'o [this message]
2023-06-10 2:11 ` Krister Johansen
2023-06-28 23:02 ` Krister Johansen
2023-08-17 0:37 ` Krister Johansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230609042239.GA1436857@mit.edu \
--to=tytso@mit.edu \
--cc=kjlx@templeofstupid.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.