The device addition operation will transform the cloned temp-fsid mounted
device into a multi-device filesystem. Therefore, it is marked as
unsupported.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
                return -EINVAL;
        }
 
+       if (fs_info->fs_devices->temp_fsid) {
+               btrfs_err(fs_info,
+                         "device add not supported on cloned temp-fsid mount");
+               return -EINVAL;
+       }
+
        if (!btrfs_exclop_start(fs_info, BTRFS_EXCLOP_DEV_ADD)) {
                if (!btrfs_exclop_start_try_lock(fs_info, BTRFS_EXCLOP_DEV_ADD))
                        return BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS;