Lines Matching refs:head_sh

1143 	struct stripe_head *head_sh = sh;  in ops_run_io()  local
1162 sh = head_sh; in ops_run_io()
1194 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1260 if (sh != head_sh) in ops_run_io()
1261 atomic_inc(&head_sh->count); in ops_run_io()
1268 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1320 if (sh != head_sh) in ops_run_io()
1321 atomic_inc(&head_sh->count); in ops_run_io()
1356 if (!head_sh->batch_head) in ops_run_io()
1360 if (sh != head_sh) in ops_run_io()
1365 defer_issue_bios(conf, head_sh->sector, &pending_bios); in ops_run_io()
1924 struct stripe_head *head_sh = sh; in ops_run_biodrain() local
1933 sh = head_sh; in ops_run_biodrain()
1934 if (test_and_clear_bit(R5_Wantdrain, &head_sh->dev[i].flags)) { in ops_run_biodrain()
1976 if (head_sh->batch_head) { in ops_run_biodrain()
1980 if (sh == head_sh) in ops_run_biodrain()
2051 struct stripe_head *head_sh = sh; in ops_run_reconstruct5() local
2076 if (head_sh->reconstruct_state == reconstruct_state_prexor_drain_run) { in ops_run_reconstruct5()
2082 if (head_sh->dev[i].written || in ops_run_reconstruct5()
2083 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2105 last_stripe = !head_sh->batch_head || in ops_run_reconstruct5()
2107 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct5()
2112 atomic_inc(&head_sh->count); in ops_run_reconstruct5()
2113 init_async_submit(&submit, flags, tx, ops_complete_reconstruct, head_sh, in ops_run_reconstruct5()
2143 struct stripe_head *head_sh = sh; in ops_run_reconstruct6() local
2177 last_stripe = !head_sh->batch_head || in ops_run_reconstruct6()
2179 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct6()
2182 atomic_inc(&head_sh->count); in ops_run_reconstruct6()
2184 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
4020 static void break_stripe_batch_list(struct stripe_head *head_sh,
4033 struct stripe_head *head_sh = sh; in handle_stripe_clean_event() local
4068 if (head_sh->batch_head) { in handle_stripe_clean_event()
4072 if (sh != head_sh) { in handle_stripe_clean_event()
4077 sh = head_sh; in handle_stripe_clean_event()
4106 if (head_sh->batch_head) { in handle_stripe_clean_event()
4109 if (sh != head_sh) in handle_stripe_clean_event()
4112 sh = head_sh; in handle_stripe_clean_event()
4123 if (head_sh->batch_head && do_endio) in handle_stripe_clean_event()
4124 break_stripe_batch_list(head_sh, STRIPE_EXPAND_SYNC_FLAGS); in handle_stripe_clean_event()
4875 static void break_stripe_batch_list(struct stripe_head *head_sh, in break_stripe_batch_list() argument
4881 list_for_each_entry_safe(sh, next, &head_sh->batch_list, batch_list) { in break_stripe_batch_list()
4898 WARN_ONCE(head_sh->state & ((1 << STRIPE_DISCARD) | in break_stripe_batch_list()
4900 "head stripe state: %lx\n", head_sh->state); in break_stripe_batch_list()
4906 head_sh->state & (1 << STRIPE_INSYNC)); in break_stripe_batch_list()
4908 sh->check_state = head_sh->check_state; in break_stripe_batch_list()
4909 sh->reconstruct_state = head_sh->reconstruct_state; in break_stripe_batch_list()
4916 sh->dev[i].flags = head_sh->dev[i].flags & in break_stripe_batch_list()
4924 spin_lock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4925 head_sh->batch_head = NULL; in break_stripe_batch_list()
4926 spin_unlock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4927 for (i = 0; i < head_sh->disks; i++) in break_stripe_batch_list()
4928 if (test_and_clear_bit(R5_Overlap, &head_sh->dev[i].flags)) in break_stripe_batch_list()
4929 wake_up_bit(&head_sh->dev[i].flags, R5_Overlap); in break_stripe_batch_list()
4930 if (head_sh->state & handle_flags) in break_stripe_batch_list()
4931 set_bit(STRIPE_HANDLE, &head_sh->state); in break_stripe_batch_list()