Skip to content

Commit c47b02c

Browse files
asjkdave
authored andcommitted
btrfs: disable the seed feature for temp-fsid
A seed device is an integral component of the sprout device, which functions as a multi-device filesystem. Therefore, temp-fsid feature is not supported. Signed-off-by: Anand Jain <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 000331b commit c47b02c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fs/btrfs/volumes.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,14 @@ static struct btrfs_fs_devices *find_fsid_by_device(
571571
if (btrfs_super_num_devices(disk_super) != 1)
572572
return fsid_fs_devices;
573573

574+
/*
575+
* A seed device is an integral component of the sprout device, which
576+
* functions as a multi-device filesystem. So, temp-fsid feature is
577+
* not supported.
578+
*/
579+
if (btrfs_super_flags(disk_super) & BTRFS_SUPER_FLAG_SEEDING)
580+
return fsid_fs_devices;
581+
574582
/* Try to find a fs_devices by matching devt. */
575583
list_for_each_entry(devt_fs_devices, &fs_uuids, fs_list) {
576584
struct btrfs_device *device;

0 commit comments

Comments
 (0)