Lines Matching refs:head_sh
1142 struct stripe_head *head_sh = sh;
1161 sh = head_sh;
1193 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev)
1255 if (sh != head_sh)
1256 atomic_inc(&head_sh->count);
1263 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags))
1311 if (sh != head_sh)
1312 atomic_inc(&head_sh->count);
1345 if (!head_sh->batch_head)
1349 if (sh != head_sh)
1354 defer_issue_bios(conf, head_sh->sector, &pending_bios);
1913 struct stripe_head *head_sh = sh;
1922 sh = head_sh;
1923 if (test_and_clear_bit(R5_Wantdrain, &head_sh->dev[i].flags)) {
1965 if (head_sh->batch_head) {
1969 if (sh == head_sh)
2040 struct stripe_head *head_sh = sh;
2065 if (head_sh->reconstruct_state == reconstruct_state_prexor_drain_run) {
2071 if (head_sh->dev[i].written ||
2072 test_bit(R5_InJournal, &head_sh->dev[i].flags)) {
2094 last_stripe = !head_sh->batch_head ||
2096 struct stripe_head, batch_list) == head_sh;
2101 atomic_inc(&head_sh->count);
2102 init_async_submit(&submit, flags, tx, ops_complete_reconstruct, head_sh,
2132 struct stripe_head *head_sh = sh;
2166 last_stripe = !head_sh->batch_head ||
2168 struct stripe_head, batch_list) == head_sh;
2171 atomic_inc(&head_sh->count);
2173 head_sh, to_addr_conv(sh, percpu, j));
3975 static void break_stripe_batch_list(struct stripe_head *head_sh,
3988 struct stripe_head *head_sh = sh;
4020 if (head_sh->batch_head) {
4024 if (sh != head_sh) {
4029 sh = head_sh;
4058 if (head_sh->batch_head) {
4061 if (sh != head_sh)
4064 sh = head_sh;
4075 if (head_sh->batch_head && do_endio)
4076 break_stripe_batch_list(head_sh, STRIPE_EXPAND_SYNC_FLAGS);
4824 static void break_stripe_batch_list(struct stripe_head *head_sh,
4830 list_for_each_entry_safe(sh, next, &head_sh->batch_list, batch_list) {
4846 WARN_ONCE(head_sh->state & ((1 << STRIPE_DISCARD) |
4848 "head stripe state: %lx\n", head_sh->state);
4853 head_sh->state & (1 << STRIPE_INSYNC));
4855 sh->check_state = head_sh->check_state;
4856 sh->reconstruct_state = head_sh->reconstruct_state;
4863 sh->dev[i].flags = head_sh->dev[i].flags &
4871 spin_lock_irq(&head_sh->stripe_lock);
4872 head_sh->batch_head = NULL;
4873 spin_unlock_irq(&head_sh->stripe_lock);
4874 for (i = 0; i < head_sh->disks; i++)
4875 if (test_and_clear_bit(R5_Overlap, &head_sh->dev[i].flags))
4876 wake_up_bit(&head_sh->dev[i].flags, R5_Overlap);
4877 if (head_sh->state & handle_flags)
4878 set_bit(STRIPE_HANDLE, &head_sh->state);