From: Qu Wenruo <wqu@suse.com>
To: hch <hch@lst.de>, Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
Johannes Thumshirn <jth@kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
Boris Burkov <boris@bur.io>, David Sterba <dsterba@suse.com>,
Josef Bacik <josef@toxicpanda.com>
Subject: Re: [PATCH v2 0/5] btrfs: use the super_block as bdev holder
Date: Fri, 13 Jun 2025 17:31:19 +0930 [thread overview]
Message-ID: <862c5dbb-b8ad-4f79-9d0d-901bbedac977@suse.com> (raw)
In-Reply-To: <20250613055920.GA9176@lst.de>
在 2025/6/13 15:29, hch 写道:
> On Fri, Jun 13, 2025 at 07:51:25AM +0930, Qu Wenruo wrote:
>>> - if (fs_info->fs_devices) {
>>> + if (fs_info && fs_info->fs_devices) {
>>> + ASSERT(fs_info->fs_devices->is_open);
>>> btrfs_close_devices(fs_info->fs_devices);
>>> fs_info->fs_devices = NULL;
>>> }
>>>
>>> So if we end up in btrfs_reconfigure_for_mount() and fs_info and
>>> fs_info->fs_devices are set, I see the is_open flag being set as
>>> well. But the fstests run isn't 100% finished yet (and it's only
>>> been a -g quick run anyways).
>>
>> Since I'm also working on cleaning up the mount process, I'm getting a
>> little familiar with this part, but if HCH can comment on this, it will be
>> a great help.
>
> I wish I could. A lot of this mount stuff has been entirely paged out
> of my memory, I'm sorry. Note that Christian did some fairly big rework
> in this area, and now the new mount API came in as well. So things
> around it looks pretty different.
That's totally fine.
And since I'm already working on the surrounding code, I'll definitely
make the involved code easier to read.
>
> I think the parts of the series that are valueable as is are the
> "open read-only for scanning" and split the inuse counter bits,
> which are pretty obvious. Everything else might need a more or less
> big redo with all the surrounding changes.
>
And the "open block devices after super block creation" patch.
It's the existing code making the sb creation way harder to grasp.
With that improved, the benefit of delaying device open should be very
obvious.
If Johannes is fine, I can integrate those patches into my upcoming
get_tree cleanup.
Thanks,
Qu
next prev parent reply other threads:[~2025-06-13 8:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 10:02 [PATCH v2 0/5] btrfs: use the super_block as bdev holder Johannes Thumshirn
2025-06-11 10:02 ` [PATCH v2 1/5] btrfs: always open the device read-only in btrfs_scan_one_device Johannes Thumshirn
2025-06-11 21:28 ` Qu Wenruo
2025-06-11 10:03 ` [PATCH v2 2/5] btrfs: call btrfs_close_devices from ->kill_sb Johannes Thumshirn
2025-06-11 21:37 ` Qu Wenruo
2025-06-11 10:03 ` [PATCH v2 3/5] btrfs: split btrfs_fs_devices.opened Johannes Thumshirn
2025-06-11 21:44 ` Qu Wenruo
2025-06-16 10:26 ` Qu Wenruo
2025-06-16 22:37 ` Qu Wenruo
2025-06-11 10:03 ` [PATCH v2 4/5] btrfs: open block devices after superblock creation Johannes Thumshirn
2025-06-11 10:03 ` [PATCH v2 5/5] btrfs: use the super_block as holder when mounting file systems Johannes Thumshirn
2025-06-11 21:49 ` [PATCH v2 0/5] btrfs: use the super_block as bdev holder Qu Wenruo
2025-06-11 22:06 ` Qu Wenruo
2025-06-12 12:15 ` Johannes Thumshirn
2025-06-12 22:21 ` Qu Wenruo
2025-06-13 5:59 ` hch
2025-06-13 8:01 ` Qu Wenruo [this message]
2025-06-13 8:14 ` Johannes Thumshirn
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=862c5dbb-b8ad-4f79-9d0d-901bbedac977@suse.com \
--to=wqu@suse.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=boris@bur.io \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=jth@kernel.org \
--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