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()
809 while (dd_idx == sh->pd_idx || dd_idx == sh->qd_idx) in stripe_add_to_batch_list()
1356 if (i == sh->qd_idx || i == sh->pd_idx || in set_syndrome_sources()
1375 int qd_idx = sh->qd_idx; in ops_run_compute6_1() local
1401 if (target == qd_idx) { in ops_run_compute6_1()
1413 if (i == target || i == qd_idx) in ops_run_compute6_1()
1488 int qd_idx = sh->qd_idx; in ops_run_compute6_2() local
1491 if (target == qd_idx) in ops_run_compute6_2()
1498 if (i == data_target || i == qd_idx) in ops_run_compute6_2()
1661 int qd_idx = sh->qd_idx; in ops_complete_reconstruct() local
1677 if (dev->written || i == pd_idx || i == qd_idx) { in ops_complete_reconstruct()
1801 if (sh->pd_idx == i || sh->qd_idx == i) in ops_run_reconstruct6()
1809 set_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in ops_run_reconstruct6()
1862 int qd_idx = sh->qd_idx; in ops_run_check_p() local
1878 if (i == pd_idx || i == qd_idx) in ops_run_check_p()
2541 int pd_idx, qd_idx; in raid5_compute_sector() local
2569 pd_idx = qd_idx = -1; in raid5_compute_sector()
2610 qd_idx = pd_idx + 1; in raid5_compute_sector()
2613 qd_idx = 0; in raid5_compute_sector()
2619 qd_idx = pd_idx + 1; in raid5_compute_sector()
2622 qd_idx = 0; in raid5_compute_sector()
2628 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
2633 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
2639 qd_idx = 1; in raid5_compute_sector()
2644 qd_idx = data_disks + 1; in raid5_compute_sector()
2652 qd_idx = pd_idx + 1; in raid5_compute_sector()
2655 qd_idx = 0; in raid5_compute_sector()
2668 qd_idx = pd_idx + 1; in raid5_compute_sector()
2671 qd_idx = 0; in raid5_compute_sector()
2680 qd_idx = (pd_idx + raid_disks - 1) % raid_disks; in raid5_compute_sector()
2690 qd_idx = raid_disks - 1; in raid5_compute_sector()
2697 qd_idx = raid_disks - 1; in raid5_compute_sector()
2703 qd_idx = raid_disks - 1; in raid5_compute_sector()
2709 qd_idx = raid_disks - 1; in raid5_compute_sector()
2715 qd_idx = raid_disks - 1; in raid5_compute_sector()
2726 sh->qd_idx = qd_idx; in raid5_compute_sector()
2783 if (i == sh->qd_idx) in raid5_compute_blocknr()
2848 || sh2.qd_idx != sh->qd_idx) { in raid5_compute_blocknr()
2860 int i, pd_idx = sh->pd_idx, qd_idx = sh->qd_idx, disks = sh->disks; in schedule_reconstruction() local
2899 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
2900 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
2904 if (i == pd_idx || i == qd_idx) in schedule_reconstruction()
2933 int qd_idx = sh->qd_idx; in schedule_reconstruction() local
2934 struct r5dev *dev = &sh->dev[qd_idx]; in schedule_reconstruction()
3342 s->failed_num[i] != sh->qd_idx && in need_this_block()
3518 if (sh->qd_idx >= 0) { in handle_stripe_clean_event()
3519 clear_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
3520 clear_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
3583 if ((dev->towrite || i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe_dirtying()
3594 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
3615 if ((dev->towrite || i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe_dirtying()
3641 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
3780 int qd_idx = sh->qd_idx; in handle_parity_checks6() local
3864 dev = &sh->dev[qd_idx]; in handle_parity_checks6()
3922 &sh->dev[qd_idx].flags); in handle_parity_checks6()
3923 *target = qd_idx; in handle_parity_checks6()
3950 if (i != sh->pd_idx && i != sh->qd_idx) { in handle_stripe_expansion()
3982 j != sh2->qd_idx && in handle_stripe_expansion()
4332 atomic_read(&sh->count), sh->pd_idx, sh->qd_idx, in handle_stripe()
4393 BUG_ON(sh->qd_idx >= 0 && in handle_stripe()
4394 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4395 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
4399 (i == sh->pd_idx || i == sh->qd_idx || in handle_stripe()
4408 ((i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe()
4424 qdev = &sh->dev[sh->qd_idx]; in handle_stripe()
4425 s.q_failed = (s.failed >= 1 && s.failed_num[0] == sh->qd_idx) in handle_stripe()
4426 || (s.failed >= 2 && s.failed_num[1] == sh->qd_idx) in handle_stripe()
5095 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
5109 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
5496 j == sh->qd_idx) in reshape_request()