From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
Anand Jain <anand.jain@oracle.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] btrfs-progs: mkfs: optimize file descriptor usage in mkfs.btrfs
Date: Thu, 1 Feb 2024 20:07:12 +0100 [thread overview]
Message-ID: <20240201190712.GW31555@twin.jikos.cz> (raw)
In-Reply-To: <04a9a9cf-0c77-4f1e-b9f3-12cceeb7ef57@gmx.com>
On Thu, Feb 01, 2024 at 07:19:15PM +1030, Qu Wenruo wrote:
> The problem is, even if we change the sequence, it doesn't make much
> difference.
>
> There are several things involved, and most of them are out of our control:
>
> - The udev scan is triggered on writable fd close().
> - The udev scan is always executed on the parent block device
> Not the partition device.
> - The udev scan the whole disk, not just the partition
>
> With those involved, changing the nested behavior would not change anything.
>
> The write in another partition of the same parent block device can still
> triggered a scan meanwhile we're making fs on our partition.
So this means that creating ext4 on /dev/sda1 and btrfs on /dev/sda2 can
trigger the udev events? And when both mkfs utilities would lock the
device then running them concurrently will fail, right? This could
happen in installation tools that can create different filesystems at
the same time.
I wonder if we should add options to assert, skip locking or wait until
it's free.
next prev parent reply other threads:[~2024-02-01 19:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 15:49 [PATCH RFC] btrfs-progs: mkfs: optimize file descriptor usage in mkfs.btrfs Anand Jain
2024-01-31 20:48 ` Josef Bacik
2024-02-01 8:49 ` Qu Wenruo
2024-02-01 19:07 ` David Sterba [this message]
2024-02-01 20:50 ` Qu Wenruo
2024-02-01 19:18 ` David Sterba
2024-02-02 1:52 ` Anand Jain
2024-02-01 21:59 ` Qu Wenruo
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=20240201190712.GW31555@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=anand.jain@oracle.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox