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 tag 'md/4.3-rc7-fixes' of git://neil.brown.name/md

Pull md bug fixes from Neil Brown:
"Two more bug fixes for md.

One bugfix for a list corruption in raid5 because of incorrect
locking.

Other for possible data corruption when a recovering device is failed,
removed, and re-added.

Both tagged for -stable"

* tag 'md/4.3-rc7-fixes' of git://neil.brown.name/md:
Revert "md: allow a partially recovered device to be hot-added to an array."
md/raid5: fix locking in handle_stripe_clean_event()

+5 -4
+1 -2
drivers/md/md.c
··· 8040 8040 !test_bit(Bitmap_sync, &rdev->flags))) 8041 8041 continue; 8042 8042 8043 - if (rdev->saved_raid_disk < 0) 8044 - rdev->recovery_offset = 0; 8043 + rdev->recovery_offset = 0; 8045 8044 if (mddev->pers-> 8046 8045 hot_add_disk(mddev, rdev) == 0) { 8047 8046 if (sysfs_link_rdev(mddev, rdev))
+4 -2
drivers/md/raid5.c
··· 3499 3499 } 3500 3500 if (!discard_pending && 3501 3501 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { 3502 + int hash; 3502 3503 clear_bit(R5_Discard, &sh->dev[sh->pd_idx].flags); 3503 3504 clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags); 3504 3505 if (sh->qd_idx >= 0) { ··· 3513 3512 * no updated data, so remove it from hash list and the stripe 3514 3513 * will be reinitialized 3515 3514 */ 3516 - spin_lock_irq(&conf->device_lock); 3517 3515 unhash: 3516 + hash = sh->hash_lock_index; 3517 + spin_lock_irq(conf->hash_locks + hash); 3518 3518 remove_hash(sh); 3519 + spin_unlock_irq(conf->hash_locks + hash); 3519 3520 if (head_sh->batch_head) { 3520 3521 sh = list_first_entry(&sh->batch_list, 3521 3522 struct stripe_head, batch_list); 3522 3523 if (sh != head_sh) 3523 3524 goto unhash; 3524 3525 } 3525 - spin_unlock_irq(&conf->device_lock); 3526 3526 sh = head_sh; 3527 3527 3528 3528 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state))