Lines Matching refs:head_sh

889 	struct stripe_head *head_sh = sh;  in ops_run_io()  local
901 sh = head_sh; in ops_run_io()
939 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1010 if (sh != head_sh) in ops_run_io()
1011 atomic_inc(&head_sh->count); in ops_run_io()
1018 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1062 if (sh != head_sh) in ops_run_io()
1063 atomic_inc(&head_sh->count); in ops_run_io()
1098 if (!head_sh->batch_head) in ops_run_io()
1102 if (sh != head_sh) in ops_run_io()
1598 struct stripe_head *head_sh = sh; in ops_run_biodrain() local
1607 sh = head_sh; in ops_run_biodrain()
1608 if (test_and_clear_bit(R5_Wantdrain, &head_sh->dev[i].flags)) { in ops_run_biodrain()
1642 if (head_sh->batch_head) { in ops_run_biodrain()
1646 if (sh == head_sh) in ops_run_biodrain()
1712 struct stripe_head *head_sh = sh; in ops_run_reconstruct5() local
1736 if (head_sh->reconstruct_state == reconstruct_state_prexor_drain_run) { in ops_run_reconstruct5()
1741 if (head_sh->dev[i].written) in ops_run_reconstruct5()
1758 last_stripe = !head_sh->batch_head || in ops_run_reconstruct5()
1760 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct5()
1765 atomic_inc(&head_sh->count); in ops_run_reconstruct5()
1766 init_async_submit(&submit, flags, tx, ops_complete_reconstruct, head_sh, in ops_run_reconstruct5()
1793 struct stripe_head *head_sh = sh; in ops_run_reconstruct6() local
1826 last_stripe = !head_sh->batch_head || in ops_run_reconstruct6()
1828 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct6()
1831 atomic_inc(&head_sh->count); in ops_run_reconstruct6()
1833 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
3444 static void break_stripe_batch_list(struct stripe_head *head_sh,
3457 struct stripe_head *head_sh = sh; in handle_stripe_clean_event() local
3494 if (head_sh->batch_head) { in handle_stripe_clean_event()
3498 if (sh != head_sh) { in handle_stripe_clean_event()
3503 sh = head_sh; in handle_stripe_clean_event()
3534 if (head_sh->batch_head) { in handle_stripe_clean_event()
3537 if (sh != head_sh) in handle_stripe_clean_event()
3540 sh = head_sh; in handle_stripe_clean_event()
3551 if (head_sh->batch_head && do_endio) in handle_stripe_clean_event()
3552 break_stripe_batch_list(head_sh, STRIPE_EXPAND_SYNC_FLAGS); in handle_stripe_clean_event()
4230 static void break_stripe_batch_list(struct stripe_head *head_sh, in break_stripe_batch_list() argument
4237 list_for_each_entry_safe(sh, next, &head_sh->batch_list, batch_list) { in break_stripe_batch_list()
4254 WARN_ON_ONCE(head_sh->state & ((1 << STRIPE_DISCARD) | in break_stripe_batch_list()
4260 head_sh->state & (1 << STRIPE_INSYNC)); in break_stripe_batch_list()
4262 sh->check_state = head_sh->check_state; in break_stripe_batch_list()
4263 sh->reconstruct_state = head_sh->reconstruct_state; in break_stripe_batch_list()
4267 sh->dev[i].flags = head_sh->dev[i].flags & in break_stripe_batch_list()
4278 spin_lock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4279 head_sh->batch_head = NULL; in break_stripe_batch_list()
4280 spin_unlock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4281 for (i = 0; i < head_sh->disks; i++) in break_stripe_batch_list()
4282 if (test_and_clear_bit(R5_Overlap, &head_sh->dev[i].flags)) in break_stripe_batch_list()
4284 if (head_sh->state & handle_flags) in break_stripe_batch_list()
4285 set_bit(STRIPE_HANDLE, &head_sh->state); in break_stripe_batch_list()
4288 wake_up(&head_sh->raid_conf->wait_for_overlap); in break_stripe_batch_list()