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()
1200 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1269 if (sh != head_sh) in ops_run_io()
1270 atomic_inc(&head_sh->count); in ops_run_io()
1277 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1332 if (sh != head_sh) in ops_run_io()
1333 atomic_inc(&head_sh->count); in ops_run_io()
1371 if (!head_sh->batch_head) in ops_run_io()
1375 if (sh != head_sh) in ops_run_io()
1380 defer_issue_bios(conf, head_sh->sector, &pending_bios); in ops_run_io()
1939 struct stripe_head *head_sh = sh; in ops_run_biodrain() local
1948 sh = head_sh; in ops_run_biodrain()
1949 if (test_and_clear_bit(R5_Wantdrain, &head_sh->dev[i].flags)) { in ops_run_biodrain()
1991 if (head_sh->batch_head) { in ops_run_biodrain()
1995 if (sh == head_sh) in ops_run_biodrain()
2066 struct stripe_head *head_sh = sh; in ops_run_reconstruct5() local
2091 if (head_sh->reconstruct_state == reconstruct_state_prexor_drain_run) { in ops_run_reconstruct5()
2097 if (head_sh->dev[i].written || in ops_run_reconstruct5()
2098 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2120 last_stripe = !head_sh->batch_head || in ops_run_reconstruct5()
2122 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct5()
2127 atomic_inc(&head_sh->count); in ops_run_reconstruct5()
2128 init_async_submit(&submit, flags, tx, ops_complete_reconstruct, head_sh, in ops_run_reconstruct5()
2158 struct stripe_head *head_sh = sh; in ops_run_reconstruct6() local
2192 last_stripe = !head_sh->batch_head || in ops_run_reconstruct6()
2194 struct stripe_head, batch_list) == head_sh; in ops_run_reconstruct6()
2197 atomic_inc(&head_sh->count); in ops_run_reconstruct6()
2199 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
4065 static void break_stripe_batch_list(struct stripe_head *head_sh,
4078 struct stripe_head *head_sh = sh; in handle_stripe_clean_event() local
4113 if (head_sh->batch_head) { in handle_stripe_clean_event()
4117 if (sh != head_sh) { in handle_stripe_clean_event()
4122 sh = head_sh; in handle_stripe_clean_event()
4151 if (head_sh->batch_head) { in handle_stripe_clean_event()
4154 if (sh != head_sh) in handle_stripe_clean_event()
4157 sh = head_sh; in handle_stripe_clean_event()
4168 if (head_sh->batch_head && do_endio) in handle_stripe_clean_event()
4169 break_stripe_batch_list(head_sh, STRIPE_EXPAND_SYNC_FLAGS); in handle_stripe_clean_event()
4925 static void break_stripe_batch_list(struct stripe_head *head_sh, in break_stripe_batch_list() argument
4932 list_for_each_entry_safe(sh, next, &head_sh->batch_list, batch_list) { in break_stripe_batch_list()
4949 WARN_ONCE(head_sh->state & ((1 << STRIPE_DISCARD) | in break_stripe_batch_list()
4951 "head stripe state: %lx\n", head_sh->state); in break_stripe_batch_list()
4957 head_sh->state & (1 << STRIPE_INSYNC)); in break_stripe_batch_list()
4959 sh->check_state = head_sh->check_state; in break_stripe_batch_list()
4960 sh->reconstruct_state = head_sh->reconstruct_state; in break_stripe_batch_list()
4967 sh->dev[i].flags = head_sh->dev[i].flags & in break_stripe_batch_list()
4975 spin_lock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4976 head_sh->batch_head = NULL; in break_stripe_batch_list()
4977 spin_unlock_irq(&head_sh->stripe_lock); in break_stripe_batch_list()
4978 for (i = 0; i < head_sh->disks; i++) in break_stripe_batch_list()
4979 if (test_and_clear_bit(R5_Overlap, &head_sh->dev[i].flags)) in break_stripe_batch_list()
4981 if (head_sh->state & handle_flags) in break_stripe_batch_list()
4982 set_bit(STRIPE_HANDLE, &head_sh->state); in break_stripe_batch_list()
4985 wake_up(&head_sh->raid_conf->wait_for_overlap); in break_stripe_batch_list()