Lines Matching refs:sh2
881 static void lock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2)
883 __acquires(&sh2->stripe_lock)
885 if (sh1 > sh2) {
886 spin_lock_irq(&sh2->stripe_lock);
890 spin_lock_nested(&sh2->stripe_lock, 1);
894 static void unlock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2)
896 __releases(&sh2->stripe_lock)
899 spin_unlock_irq(&sh2->stripe_lock);
3175 struct stripe_head sh2;
3270 previous, &dummy1, &sh2);
3271 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx
3272 || sh2.qd_idx != sh->qd_idx) {
4588 struct stripe_head *sh2;
4594 sh2 = raid5_get_active_stripe(conf, NULL, s,
4596 if (sh2 == NULL)
4602 if (!test_bit(STRIPE_EXPANDING, &sh2->state) ||
4603 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) {
4605 raid5_release_stripe(sh2);
4611 tx = async_memcpy(sh2->dev[dd_idx].page,
4612 sh->dev[i].page, sh2->dev[dd_idx].offset,
4616 set_bit(R5_Expanded, &sh2->dev[dd_idx].flags);
4617 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags);
4619 if (j != sh2->pd_idx &&
4620 j != sh2->qd_idx &&
4621 !test_bit(R5_Expanded, &sh2->dev[j].flags))
4624 set_bit(STRIPE_EXPAND_READY, &sh2->state);
4625 set_bit(STRIPE_HANDLE, &sh2->state);
4627 raid5_release_stripe(sh2);