diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index f5f4aa0a58e5..f2af1f3d4aa8 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c @@ -762,6 +762,7 @@ static void __reada_start_machine(struct btrfs_fs_info *fs_info) u64 total = 0; int i; +again: do { enqueued = 0; mutex_lock(&fs_devices->device_list_mutex); @@ -774,6 +775,10 @@ static void __reada_start_machine(struct btrfs_fs_info *fs_info) mutex_unlock(&fs_devices->device_list_mutex); total += enqueued; } while (enqueued && total < 10000); + if (fs_devices->seed) { + fs_devices = fs_devices->seed; + goto again; + } if (enqueued == 0) return;