Re: [PATCH 02/17] btrfs: always open the device read-only in btrfs_scan_one_device
- 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 02/17] btrfs: always open the device read-only in btrfs_scan_one_device
- From: Christian Brauner <brauner@kernel.org>
- Date: Fri, 11 Aug 2023 14:00:33 +0200
- Message-id: <[🔎] 20230811-ereignen-mitangeklagt-84cf0f213549@brauner>
- In-reply-to: <[🔎] 20230811100828.1897174-3-hch@lst.de>
- References: <[🔎] 20230811100828.1897174-1-hch@lst.de> <[🔎] 20230811100828.1897174-3-hch@lst.de>
On Fri, Aug 11, 2023 at 12:08:13PM +0200, Christoph Hellwig wrote:
> btrfs_scan_one_device opens the block device only to read the super
> block. Instead of passing a blk_mode_t argument to sometimes open
> it for writing, just hard code BLK_OPEN_READ as it will never write
> to the device or hand the block_device out to someone else.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Looks good to me,
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reply to: