Lines Matching refs:head_sh

1060 	struct stripe_head *head_sh = sh;  in ops_run_io()  local
1077 sh = head_sh; in ops_run_io()
1114 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1184 if (sh != head_sh) in ops_run_io()
1185 atomic_inc(&head_sh->count); in ops_run_io()
1192 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1251 if (sh != head_sh) in ops_run_io()
1252 atomic_inc(&head_sh->count); in ops_run_io()
1292 if (!head_sh->batch_head) in ops_run_io()
1296 if (sh != head_sh) in ops_run_io()
1301 defer_issue_bios(conf, head_sh->sector, &pending_bios); in ops_run_io()
1860 struct stripe_head *head_sh = sh; in ops_run_biodrain() local
1869 sh = head_sh; in ops_run_biodrain()
1870 if (test_and_clear_bit(R5_Wantdrain, &head_sh->dev[i].flags)) { in ops_run_biodrain()
1912 if (head_sh->batch_head) { in ops_run_biodrain()
1916 if (sh == head_sh) in ops_run_biodrain()
1987 struct stripe_head *head_sh = sh; in ops_run_reconstruct5() local
2012 if (head_sh->reconstruct_state == reconstruct_state_prexor_drain_run) { in ops_run_reconstruct5()
2018 if (head_sh->dev[i].written || in ops_run_reconstruct5()
2019 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2041 last_stripe = !head_sh->batch_head || in ops_run_reconstruct5()
2043 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct5()
2048 atomic_inc(&head_sh->count); in ops_run_reconstruct5()
2049 init_async_submit(&submit, flags, tx, ops_complete_reconstruct, head_sh, in ops_run_reconstruct5()
2079 struct stripe_head *head_sh = sh; in ops_run_reconstruct6() local
2113 last_stripe = !head_sh->batch_head || in ops_run_reconstruct6()
2115 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct6()
2118 atomic_inc(&head_sh->count); in ops_run_reconstruct6()
2120 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
3955 static void break_stripe_batch_list(struct stripe_head *head_sh,
3968 struct stripe_head *head_sh = sh; in handle_stripe_clean_event() local
4003 if (head_sh->batch_head) { in handle_stripe_clean_event()
4007 if (sh != head_sh) { in handle_stripe_clean_event()
4012 sh = head_sh; in handle_stripe_clean_event()
4041 if (head_sh->batch_head) { in handle_stripe_clean_event()
4044 if (sh != head_sh) in handle_stripe_clean_event()
4047 sh = head_sh; in handle_stripe_clean_event()
4058 if (head_sh->batch_head && do_endio) in handle_stripe_clean_event()
4059 break_stripe_batch_list(head_sh, STRIPE_EXPAND_SYNC_FLAGS); in handle_stripe_clean_event()
4814 static void break_stripe_batch_list(struct stripe_head *head_sh, in break_stripe_batch_list() argument
4821 list_for_each_entry_safe(sh, next, &head_sh->batch_list, batch_list) { in break_stripe_batch_list()
4838 WARN_ONCE(head_sh->state & ((1 << STRIPE_DISCARD) | in break_stripe_batch_list()
4840 "head stripe state: %lx\n", head_sh->state); in break_stripe_batch_list()
4846 head_sh->state & (1 << STRIPE_INSYNC)); in break_stripe_batch_list()
4848 sh->check_state = head_sh->check_state; in break_stripe_batch_list()
4849 sh->reconstruct_state = head_sh->reconstruct_state; in break_stripe_batch_list()
4856 sh->dev[i].flags = head_sh->dev[i].flags & in break_stripe_batch_list()
4864 spin_lock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4865 head_sh->batch_head = NULL; in break_stripe_batch_list()
4866 spin_unlock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4867 for (i = 0; i < head_sh->disks; i++) in break_stripe_batch_list()
4868 if (test_and_clear_bit(R5_Overlap, &head_sh->dev[i].flags)) in break_stripe_batch_list()
4870 if (head_sh->state & handle_flags) in break_stripe_batch_list()
4871 set_bit(STRIPE_HANDLE, &head_sh->state); in break_stripe_batch_list()
4874 wake_up(&head_sh->raid_conf->wait_for_overlap); in break_stripe_batch_list()