Lines Matching refs:head_sh
1142 struct stripe_head *head_sh = sh; in ops_run_io() local
1161 sh = head_sh; in ops_run_io()
1193 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1259 if (sh != head_sh) in ops_run_io()
1260 atomic_inc(&head_sh->count); in ops_run_io()
1267 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1319 if (sh != head_sh) in ops_run_io()
1320 atomic_inc(&head_sh->count); in ops_run_io()
1353 if (!head_sh->batch_head) in ops_run_io()
1357 if (sh != head_sh) in ops_run_io()
1362 defer_issue_bios(conf, head_sh->sector, &pending_bios); in ops_run_io()
1921 struct stripe_head *head_sh = sh; in ops_run_biodrain() local
1930 sh = head_sh; in ops_run_biodrain()
1931 if (test_and_clear_bit(R5_Wantdrain, &head_sh->dev[i].flags)) { in ops_run_biodrain()
1973 if (head_sh->batch_head) { in ops_run_biodrain()
1977 if (sh == head_sh) in ops_run_biodrain()
2048 struct stripe_head *head_sh = sh; in ops_run_reconstruct5() local
2073 if (head_sh->reconstruct_state == reconstruct_state_prexor_drain_run) { in ops_run_reconstruct5()
2079 if (head_sh->dev[i].written || in ops_run_reconstruct5()
2080 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2102 last_stripe = !head_sh->batch_head || in ops_run_reconstruct5()
2104 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct5()
2109 atomic_inc(&head_sh->count); in ops_run_reconstruct5()
2110 init_async_submit(&submit, flags, tx, ops_complete_reconstruct, head_sh, in ops_run_reconstruct5()
2140 struct stripe_head *head_sh = sh; in ops_run_reconstruct6() local
2174 last_stripe = !head_sh->batch_head || in ops_run_reconstruct6()
2176 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct6()
2179 atomic_inc(&head_sh->count); in ops_run_reconstruct6()
2181 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
3983 static void break_stripe_batch_list(struct stripe_head *head_sh,
3996 struct stripe_head *head_sh = sh; in handle_stripe_clean_event() local
4028 if (head_sh->batch_head) { in handle_stripe_clean_event()
4032 if (sh != head_sh) { in handle_stripe_clean_event()
4037 sh = head_sh; in handle_stripe_clean_event()
4066 if (head_sh->batch_head) { in handle_stripe_clean_event()
4069 if (sh != head_sh) in handle_stripe_clean_event()
4072 sh = head_sh; in handle_stripe_clean_event()
4083 if (head_sh->batch_head && do_endio) in handle_stripe_clean_event()
4084 break_stripe_batch_list(head_sh, STRIPE_EXPAND_SYNC_FLAGS); in handle_stripe_clean_event()
4832 static void break_stripe_batch_list(struct stripe_head *head_sh, in break_stripe_batch_list() argument
4838 list_for_each_entry_safe(sh, next, &head_sh->batch_list, batch_list) { in break_stripe_batch_list()
4854 WARN_ONCE(head_sh->state & ((1 << STRIPE_DISCARD) | in break_stripe_batch_list()
4856 "head stripe state: %lx\n", head_sh->state); in break_stripe_batch_list()
4861 head_sh->state & (1 << STRIPE_INSYNC)); in break_stripe_batch_list()
4863 sh->check_state = head_sh->check_state; in break_stripe_batch_list()
4864 sh->reconstruct_state = head_sh->reconstruct_state; in break_stripe_batch_list()
4871 sh->dev[i].flags = head_sh->dev[i].flags & in break_stripe_batch_list()
4879 spin_lock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4880 head_sh->batch_head = NULL; in break_stripe_batch_list()
4881 spin_unlock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4882 for (i = 0; i < head_sh->disks; i++) in break_stripe_batch_list()
4883 if (test_and_clear_bit(R5_Overlap, &head_sh->dev[i].flags)) in break_stripe_batch_list()
4884 wake_up_bit(&head_sh->dev[i].flags, R5_Overlap); in break_stripe_batch_list()
4885 if (head_sh->state & handle_flags) in break_stripe_batch_list()
4886 set_bit(STRIPE_HANDLE, &head_sh->state); in break_stripe_batch_list()