Lines Matching refs:sh2
873 static void lock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2) in lock_two_stripes() argument
875 __acquires(&sh2->stripe_lock) in lock_two_stripes()
877 if (sh1 > sh2) { in lock_two_stripes()
878 spin_lock_irq(&sh2->stripe_lock); in lock_two_stripes()
882 spin_lock_nested(&sh2->stripe_lock, 1); in lock_two_stripes()
886 static void unlock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2) in unlock_two_stripes() argument
888 __releases(&sh2->stripe_lock) in unlock_two_stripes()
891 spin_unlock_irq(&sh2->stripe_lock); in unlock_two_stripes()
3210 struct stripe_head sh2; in raid5_compute_blocknr() local
3305 previous, &dummy1, &sh2); in raid5_compute_blocknr()
3306 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx in raid5_compute_blocknr()
3307 || sh2.qd_idx != sh->qd_idx) { in raid5_compute_blocknr()
4627 struct stripe_head *sh2; in handle_stripe_expansion() local
4633 sh2 = raid5_get_active_stripe(conf, NULL, s, in handle_stripe_expansion()
4635 if (sh2 == NULL) in handle_stripe_expansion()
4641 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4642 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4644 raid5_release_stripe(sh2); in handle_stripe_expansion()
4650 tx = async_memcpy(sh2->dev[dd_idx].page, in handle_stripe_expansion()
4651 sh->dev[i].page, sh2->dev[dd_idx].offset, in handle_stripe_expansion()
4655 set_bit(R5_Expanded, &sh2->dev[dd_idx].flags); in handle_stripe_expansion()
4656 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags); in handle_stripe_expansion()
4658 if (j != sh2->pd_idx && in handle_stripe_expansion()
4659 j != sh2->qd_idx && in handle_stripe_expansion()
4660 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4663 set_bit(STRIPE_EXPAND_READY, &sh2->state); in handle_stripe_expansion()
4664 set_bit(STRIPE_HANDLE, &sh2->state); in handle_stripe_expansion()
4666 raid5_release_stripe(sh2); in handle_stripe_expansion()