Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
md/bitmap: It is OK to clear bits during recovery.
md: don't give up looking for spares on first failure-to-add
md/raid5: ensure correct assessment of drives during degraded reshape.
md/linear: fix hot-add of devices to linear arrays.

+13 -10
+1 -4
drivers/md/bitmap.c
··· 1393 1393 atomic_read(&bitmap->behind_writes), 1394 1394 bitmap->mddev->bitmap_info.max_write_behind); 1395 1395 } 1396 - if (bitmap->mddev->degraded) 1397 - /* Never clear bits or update events_cleared when degraded */ 1398 - success = 0; 1399 1396 1400 1397 while (sectors) { 1401 1398 sector_t blocks; ··· 1406 1409 return; 1407 1410 } 1408 1411 1409 - if (success && 1412 + if (success && !bitmap->mddev->degraded && 1410 1413 bitmap->events_cleared < bitmap->mddev->events) { 1411 1414 bitmap->events_cleared = bitmap->mddev->events; 1412 1415 bitmap->need_sync = 1;
+1
drivers/md/linear.c
··· 230 230 return -EINVAL; 231 231 232 232 rdev->raid_disk = rdev->saved_raid_disk; 233 + rdev->saved_raid_disk = -1; 233 234 234 235 newconf = linear_conf(mddev,mddev->raid_disks+1); 235 236
+1 -2
drivers/md/md.c
··· 7360 7360 spares++; 7361 7361 md_new_event(mddev); 7362 7362 set_bit(MD_CHANGE_DEVS, &mddev->flags); 7363 - } else 7364 - break; 7363 + } 7365 7364 } 7366 7365 } 7367 7366 }
+10 -4
drivers/md/raid5.c
··· 3065 3065 } 3066 3066 } else if (test_bit(In_sync, &rdev->flags)) 3067 3067 set_bit(R5_Insync, &dev->flags); 3068 - else { 3068 + else if (sh->sector + STRIPE_SECTORS <= rdev->recovery_offset) 3069 3069 /* in sync if before recovery_offset */ 3070 - if (sh->sector + STRIPE_SECTORS <= rdev->recovery_offset) 3071 - set_bit(R5_Insync, &dev->flags); 3072 - } 3070 + set_bit(R5_Insync, &dev->flags); 3071 + else if (test_bit(R5_UPTODATE, &dev->flags) && 3072 + test_bit(R5_Expanded, &dev->flags)) 3073 + /* If we've reshaped into here, we assume it is Insync. 3074 + * We will shortly update recovery_offset to make 3075 + * it official. 3076 + */ 3077 + set_bit(R5_Insync, &dev->flags); 3078 + 3073 3079 if (rdev && test_bit(R5_WriteError, &dev->flags)) { 3074 3080 clear_bit(R5_Insync, &dev->flags); 3075 3081 if (!test_bit(Faulty, &rdev->flags)) {