Lines Matching refs:qd_idx
127 if (sh->qd_idx == sh->disks - 1) in raid6_d0()
130 return sh->qd_idx + 1; in raid6_d0()
152 if (idx == sh->qd_idx) in raid6_idx_to_slot()
798 while (dd_idx == sh->pd_idx || dd_idx == sh->qd_idx) in stripe_add_to_batch_list()
1478 if (i == sh->qd_idx || i == sh->pd_idx || in set_syndrome_sources()
1503 int qd_idx = sh->qd_idx; in ops_run_compute6_1() local
1529 if (target == qd_idx) { in ops_run_compute6_1()
1541 if (i == target || i == qd_idx) in ops_run_compute6_1()
1616 int qd_idx = sh->qd_idx; in ops_run_compute6_2() local
1619 if (target == qd_idx) in ops_run_compute6_2()
1626 if (i == data_target || i == qd_idx) in ops_run_compute6_2()
1806 int qd_idx = sh->qd_idx; in ops_complete_reconstruct() local
1822 if (dev->written || i == pd_idx || i == qd_idx) { in ops_complete_reconstruct()
1950 if (sh->pd_idx == i || sh->qd_idx == i) in ops_run_reconstruct6()
1958 set_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in ops_run_reconstruct6()
2011 int qd_idx = sh->qd_idx; in ops_run_check_p() local
2027 if (i == pd_idx || i == qd_idx) in ops_run_check_p()
2713 int pd_idx, qd_idx; in raid5_compute_sector() local
2741 pd_idx = qd_idx = -1; in raid5_compute_sector()
2782 qd_idx = pd_idx + 1; in raid5_compute_sector()
2785 qd_idx = 0; in raid5_compute_sector()
2791 qd_idx = pd_idx + 1; in raid5_compute_sector()
2794 qd_idx = 0; in raid5_compute_sector()
2800 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
2805 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
2811 qd_idx = 1; in raid5_compute_sector()
2816 qd_idx = data_disks + 1; in raid5_compute_sector()
2824 qd_idx = pd_idx + 1; in raid5_compute_sector()
2827 qd_idx = 0; in raid5_compute_sector()
2840 qd_idx = pd_idx + 1; in raid5_compute_sector()
2843 qd_idx = 0; in raid5_compute_sector()
2852 qd_idx = (pd_idx + raid_disks - 1) % raid_disks; in raid5_compute_sector()
2862 qd_idx = raid_disks - 1; in raid5_compute_sector()
2869 qd_idx = raid_disks - 1; in raid5_compute_sector()
2875 qd_idx = raid_disks - 1; in raid5_compute_sector()
2881 qd_idx = raid_disks - 1; in raid5_compute_sector()
2887 qd_idx = raid_disks - 1; in raid5_compute_sector()
2898 sh->qd_idx = qd_idx; in raid5_compute_sector()
2955 if (i == sh->qd_idx) in raid5_compute_blocknr()
3020 || sh2.qd_idx != sh->qd_idx) { in raid5_compute_blocknr()
3088 int i, pd_idx = sh->pd_idx, qd_idx = sh->qd_idx, disks = sh->disks; in schedule_reconstruction() local
3137 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3138 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3142 if (i == pd_idx || i == qd_idx) in schedule_reconstruction()
3174 int qd_idx = sh->qd_idx; in schedule_reconstruction() local
3175 struct r5dev *dev = &sh->dev[qd_idx]; in schedule_reconstruction()
3601 s->failed_num[i] != sh->qd_idx && in need_this_block()
3640 ((sh->qd_idx >= 0 && sh->pd_idx == disk_idx) || in fetch_block()
3806 if (sh->qd_idx >= 0) { in handle_stripe_clean_event()
3807 clear_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
3808 clear_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
3887 i == sh->pd_idx || i == sh->qd_idx || in handle_stripe_dirtying()
3899 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
3952 i == sh->pd_idx || i == sh->qd_idx || in handle_stripe_dirtying()
3979 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
4124 int qd_idx = sh->qd_idx; in handle_parity_checks6() local
4208 dev = &sh->dev[qd_idx]; in handle_parity_checks6()
4271 &sh->dev[qd_idx].flags); in handle_parity_checks6()
4272 *target = qd_idx; in handle_parity_checks6()
4299 if (i != sh->pd_idx && i != sh->qd_idx) { in handle_stripe_expansion()
4331 j != sh2->qd_idx && in handle_stripe_expansion()
4700 atomic_read(&sh->count), sh->pd_idx, sh->qd_idx, in handle_stripe()
4767 BUG_ON(sh->qd_idx >= 0 && in handle_stripe()
4768 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4769 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
4773 (i == sh->pd_idx || i == sh->qd_idx || in handle_stripe()
4783 ((i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe()
4799 qdev = &sh->dev[sh->qd_idx]; in handle_stripe()
4800 s.q_failed = (s.failed >= 1 && s.failed_num[0] == sh->qd_idx) in handle_stripe()
4801 || (s.failed >= 2 && s.failed_num[1] == sh->qd_idx) in handle_stripe()
5519 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
5533 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
5913 j == sh->qd_idx) in reshape_request()