Commit

Yauhen Kharuzhy committed be5e252

btrfs: Use hot spare autoreplacement for missing devices too

Auto-replace missing drives in degraded RAID after mounting using
existing 'global hotspare' functionality.

Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>

Comments (0)

Files changed (1)

File fs/btrfs/disk-io.c Modified

View file
  • Ignore whitespace
  • Hide word diff
 	mutex_lock(&fs_devices->device_list_mutex);
 	rcu_read_lock();
 	list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) {
-		if (device->failed) {
+		if (device->failed || device->missing) {
 			found = 1;
 			break;
 		}