Lines Matching refs:sh2
880 static void lock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2)
882 __acquires(&sh2->stripe_lock)
884 if (sh1 > sh2) {
885 spin_lock_irq(&sh2->stripe_lock);
889 spin_lock_nested(&sh2->stripe_lock, 1);
893 static void unlock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2)
895 __releases(&sh2->stripe_lock)
898 spin_unlock_irq(&sh2->stripe_lock);
3217 struct stripe_head sh2;
3312 previous, &dummy1, &sh2);
3313 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx
3314 || sh2.qd_idx != sh->qd_idx) {
4634 struct stripe_head *sh2;
4640 sh2 = raid5_get_active_stripe(conf, NULL, s,
4642 if (sh2 == NULL)
4648 if (!test_bit(STRIPE_EXPANDING, &sh2->state) ||
4649 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) {
4651 raid5_release_stripe(sh2);
4657 tx = async_memcpy(sh2->dev[dd_idx].page,
4658 sh->dev[i].page, sh2->dev[dd_idx].offset,
4662 set_bit(R5_Expanded, &sh2->dev[dd_idx].flags);
4663 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags);
4665 if (j != sh2->pd_idx &&
4666 j != sh2->qd_idx &&
4667 !test_bit(R5_Expanded, &sh2->dev[j].flags))
4670 set_bit(STRIPE_EXPAND_READY, &sh2->state);
4671 set_bit(STRIPE_HANDLE, &sh2->state);
4673 raid5_release_stripe(sh2);