Lines Matching refs:qd_idx
194 if (sh->qd_idx == sh->disks - 1) in raid6_d0()
197 return sh->qd_idx + 1; in raid6_d0()
219 if (idx == sh->qd_idx) in raid6_idx_to_slot()
807 while (dd_idx == sh->pd_idx || dd_idx == sh->qd_idx) in stripe_add_to_batch_list()
1354 if (i == sh->qd_idx || i == sh->pd_idx || in set_syndrome_sources()
1373 int qd_idx = sh->qd_idx; in ops_run_compute6_1() local
1399 if (target == qd_idx) { in ops_run_compute6_1()
1411 if (i == target || i == qd_idx) in ops_run_compute6_1()
1486 int qd_idx = sh->qd_idx; in ops_run_compute6_2() local
1489 if (target == qd_idx) in ops_run_compute6_2()
1496 if (i == data_target || i == qd_idx) in ops_run_compute6_2()
1659 int qd_idx = sh->qd_idx; in ops_complete_reconstruct() local
1675 if (dev->written || i == pd_idx || i == qd_idx) { in ops_complete_reconstruct()
1799 if (sh->pd_idx == i || sh->qd_idx == i) in ops_run_reconstruct6()
1807 set_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in ops_run_reconstruct6()
1860 int qd_idx = sh->qd_idx; in ops_run_check_p() local
1876 if (i == pd_idx || i == qd_idx) in ops_run_check_p()
2543 int pd_idx, qd_idx; in raid5_compute_sector() local
2571 pd_idx = qd_idx = -1; in raid5_compute_sector()
2612 qd_idx = pd_idx + 1; in raid5_compute_sector()
2615 qd_idx = 0; in raid5_compute_sector()
2621 qd_idx = pd_idx + 1; in raid5_compute_sector()
2624 qd_idx = 0; in raid5_compute_sector()
2630 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
2635 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
2641 qd_idx = 1; in raid5_compute_sector()
2646 qd_idx = data_disks + 1; in raid5_compute_sector()
2654 qd_idx = pd_idx + 1; in raid5_compute_sector()
2657 qd_idx = 0; in raid5_compute_sector()
2670 qd_idx = pd_idx + 1; in raid5_compute_sector()
2673 qd_idx = 0; in raid5_compute_sector()
2682 qd_idx = (pd_idx + raid_disks - 1) % raid_disks; in raid5_compute_sector()
2692 qd_idx = raid_disks - 1; in raid5_compute_sector()
2699 qd_idx = raid_disks - 1; in raid5_compute_sector()
2705 qd_idx = raid_disks - 1; in raid5_compute_sector()
2711 qd_idx = raid_disks - 1; in raid5_compute_sector()
2717 qd_idx = raid_disks - 1; in raid5_compute_sector()
2728 sh->qd_idx = qd_idx; in raid5_compute_sector()
2785 if (i == sh->qd_idx) in compute_blocknr()
2850 || sh2.qd_idx != sh->qd_idx) { in compute_blocknr()
2862 int i, pd_idx = sh->pd_idx, qd_idx = sh->qd_idx, disks = sh->disks; in schedule_reconstruction() local
2901 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
2902 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
2906 if (i == pd_idx || i == qd_idx) in schedule_reconstruction()
2935 int qd_idx = sh->qd_idx; in schedule_reconstruction() local
2936 struct r5dev *dev = &sh->dev[qd_idx]; in schedule_reconstruction()
3338 s->failed_num[i] != sh->qd_idx && in need_this_block()
3512 if (sh->qd_idx >= 0) { in handle_stripe_clean_event()
3513 clear_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
3514 clear_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
3577 if ((dev->towrite || i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe_dirtying()
3588 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
3609 if ((dev->towrite || i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe_dirtying()
3635 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
3774 int qd_idx = sh->qd_idx; in handle_parity_checks6() local
3858 dev = &sh->dev[qd_idx]; in handle_parity_checks6()
3916 &sh->dev[qd_idx].flags); in handle_parity_checks6()
3917 *target = qd_idx; in handle_parity_checks6()
3944 if (i != sh->pd_idx && i != sh->qd_idx) { in handle_stripe_expansion()
3976 j != sh2->qd_idx && in handle_stripe_expansion()
4323 atomic_read(&sh->count), sh->pd_idx, sh->qd_idx, in handle_stripe()
4381 BUG_ON(sh->qd_idx >= 0 && in handle_stripe()
4382 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4383 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
4387 (i == sh->pd_idx || i == sh->qd_idx || in handle_stripe()
4396 ((i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe()
4412 qdev = &sh->dev[sh->qd_idx]; in handle_stripe()
4413 s.q_failed = (s.failed >= 1 && s.failed_num[0] == sh->qd_idx) in handle_stripe()
4414 || (s.failed >= 2 && s.failed_num[1] == sh->qd_idx) in handle_stripe()
5100 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
5114 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
5483 j == sh->qd_idx) in reshape_request()