Re: [PATCH 04/17] btrfs: split btrfs_fs_devices.opened
- To: Christoph Hellwig <hch@lst.de>
- Cc: Al Viro <viro@zeniv.linux.org.uk>, Jens Axboe <axboe@kernel.dk>, Denis Efremov <efremov@linux.com>, Josef Bacik <josef@toxicpanda.com>, Stefan Haberland <sth@linux.ibm.com>, Jan Hoeppner <hoeppner@linux.ibm.com>, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Alexander Gordeev <agordeev@linux.ibm.com>, "Darrick J . Wong" <djwong@kernel.org>, Chris Mason <clm@fb.com>, David Sterba <dsterba@suse.com>, linux-block@vger.kernel.org, nbd@other.debian.org, linux-s390@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
- Subject: Re: [PATCH 04/17] btrfs: split btrfs_fs_devices.opened
- From: Christian Brauner <brauner@kernel.org>
- Date: Fri, 11 Aug 2023 14:40:45 +0200
- Message-id: <[🔎] 20230811-wildtier-fortbestand-f6ec45e09f4e@brauner>
- In-reply-to: <[🔎] 20230811100828.1897174-5-hch@lst.de>
- References: <[🔎] 20230811100828.1897174-1-hch@lst.de> <[🔎] 20230811100828.1897174-5-hch@lst.de>
On Fri, Aug 11, 2023 at 12:08:15PM +0200, Christoph Hellwig wrote:
> The btrfs_fs_devices.opened member mixes an in use counter for the
> fs_devices structure that prevents it from being garbage collected with
> a flag if the underlying devices were actually opened. This not only
> makes the code hard to follow, but also prevents btrfs from switching
> to opening the block device only after super block creation. Split it
> into an in_use counter and an is_open boolean flag instead.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
That looks like it will fix the issue we've seen with the first version.
So Acked-by: Christian Brauner <brauner@kernel.org>
but it'd be excellent to hear from btrfs maintainers.
Reply to: