From: Jan Kara Date: Wed, 1 Nov 2023 17:43:09 +0000 (+0100) Subject: btrfs: Do not restrict writes to btrfs devices X-Git-Tag: v6.8-rc1~214^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ead622674df5a3ae575b964090bee65f6b7f805f;p=thirdparty%2Flinux.git btrfs: Do not restrict writes to btrfs devices Btrfs device probing code needs adaptation so that it works when writes are restricted to its mounted devices. Since btrfs maintainer wants to merge these changes through btrfs tree and there are review bandwidth issues with that, let's not block all other filesystems and just not restrict writes to btrfs devices for now. CC: CC: David Sterba CC: Josef Bacik CC: Chris Mason Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-4-jack@suse.cz Acked-by: David Sterba Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner --- diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index f638dc339693b..fc06aee293fae 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1403,6 +1403,8 @@ static struct dentry *btrfs_mount_root(struct file_system_type *fs_type, return ERR_PTR(error); } + /* No support for restricting writes to btrfs devices yet... */ + mode &= ~BLK_OPEN_RESTRICT_WRITES; /* * Setup a dummy root and fs_info for test/set super. This is because * we don't actually fill this stuff out until open_ctree, but we need