summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/volumes.c b/volumes.c
index 009ce785..b47bce6b 100644
--- a/volumes.c
+++ b/volumes.c
@@ -1672,8 +1672,15 @@ static int open_seed_devices(struct btrfs_root *root, u8 *fsid)
fs_devices = find_fsid(fsid);
if (!fs_devices) {
- ret = -ENOENT;
- goto out;
+ /* missing all seed devices */
+ fs_devices = kzalloc(sizeof(*fs_devices), GFP_NOFS);
+ if (!fs_devices) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ INIT_LIST_HEAD(&fs_devices->devices);
+ list_add(&fs_devices->list, &fs_uuids);
+ memcpy(fs_devices->fsid, fsid, BTRFS_FSID_SIZE);
}
ret = btrfs_open_devices(fs_devices, O_RDONLY);