Lines Matching refs:sh2
782 static void lock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2)
784 __acquires(&sh2->stripe_lock)
786 if (sh1 > sh2) {
787 spin_lock_irq(&sh2->stripe_lock);
791 spin_lock_nested(&sh2->stripe_lock, 1);
795 static void unlock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2)
797 __releases(&sh2->stripe_lock)
800 spin_unlock_irq(&sh2->stripe_lock);
3129 struct stripe_head sh2;
3224 previous, &dummy1, &sh2);
3225 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx
3226 || sh2.qd_idx != sh->qd_idx) {
4522 struct stripe_head *sh2;
4528 sh2 = raid5_get_active_stripe(conf, s, 0, 1, 1);
4529 if (sh2 == NULL)
4535 if (!test_bit(STRIPE_EXPANDING, &sh2->state) ||
4536 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) {
4538 raid5_release_stripe(sh2);
4544 tx = async_memcpy(sh2->dev[dd_idx].page,
4545 sh->dev[i].page, sh2->dev[dd_idx].offset,
4549 set_bit(R5_Expanded, &sh2->dev[dd_idx].flags);
4550 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags);
4552 if (j != sh2->pd_idx &&
4553 j != sh2->qd_idx &&
4554 !test_bit(R5_Expanded, &sh2->dev[j].flags))
4557 set_bit(STRIPE_EXPAND_READY, &sh2->state);
4558 set_bit(STRIPE_HANDLE, &sh2->state);
4560 raid5_release_stripe(sh2);