Lines Matching refs:sh2
782 static void lock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2) in lock_two_stripes() argument
784 __acquires(&sh2->stripe_lock) in lock_two_stripes()
786 if (sh1 > sh2) { in lock_two_stripes()
787 spin_lock_irq(&sh2->stripe_lock); in lock_two_stripes()
791 spin_lock_nested(&sh2->stripe_lock, 1); in lock_two_stripes()
795 static void unlock_two_stripes(struct stripe_head *sh1, struct stripe_head *sh2) in unlock_two_stripes() argument
797 __releases(&sh2->stripe_lock) in unlock_two_stripes()
800 spin_unlock_irq(&sh2->stripe_lock); in unlock_two_stripes()
3132 struct stripe_head sh2; in raid5_compute_blocknr() local
3227 previous, &dummy1, &sh2); in raid5_compute_blocknr()
3228 if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx in raid5_compute_blocknr()
3229 || sh2.qd_idx != sh->qd_idx) { in raid5_compute_blocknr()
4525 struct stripe_head *sh2; in handle_stripe_expansion() local
4531 sh2 = raid5_get_active_stripe(conf, s, 0, 1, 1); in handle_stripe_expansion()
4532 if (sh2 == NULL) in handle_stripe_expansion()
4538 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4539 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4541 raid5_release_stripe(sh2); in handle_stripe_expansion()
4547 tx = async_memcpy(sh2->dev[dd_idx].page, in handle_stripe_expansion()
4548 sh->dev[i].page, sh2->dev[dd_idx].offset, in handle_stripe_expansion()
4552 set_bit(R5_Expanded, &sh2->dev[dd_idx].flags); in handle_stripe_expansion()
4553 set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags); in handle_stripe_expansion()
4555 if (j != sh2->pd_idx && in handle_stripe_expansion()
4556 j != sh2->qd_idx && in handle_stripe_expansion()
4557 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4560 set_bit(STRIPE_EXPAND_READY, &sh2->state); in handle_stripe_expansion()
4561 set_bit(STRIPE_HANDLE, &sh2->state); in handle_stripe_expansion()
4563 raid5_release_stripe(sh2); in handle_stripe_expansion()