btrfs-progs: allow duplicate fsid for single device filesystems
For single device btrfs filesystem, allow duplicate fsid to be created. This should be used with caution as more devices with the same uuid could be confused with each other. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
93e8b661f6
commit
ff4c4a3a00
1 changed files with 2 additions and 1 deletions
|
@ -1265,7 +1265,8 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
|
|||
error("could not parse UUID: %s", fs_uuid);
|
||||
goto error;
|
||||
}
|
||||
if (!test_uuid_unique(fs_uuid)) {
|
||||
/* We allow non-unique fsid for single device btrfs filesystem. */
|
||||
if (device_count != 1 && !test_uuid_unique(fs_uuid)) {
|
||||
error("non-unique UUID: %s", fs_uuid);
|
||||
goto error;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue