Lines Matching refs:qd_idx
118 if (sh->qd_idx == sh->disks - 1) in raid6_d0()
121 return sh->qd_idx + 1; in raid6_d0()
143 if (idx == sh->qd_idx) in raid6_idx_to_slot()
870 while (dd_idx == sh->pd_idx || dd_idx == sh->qd_idx) in stripe_add_to_batch_list()
1566 if (i == sh->qd_idx || i == sh->pd_idx || in set_syndrome_sources()
1598 int qd_idx = sh->qd_idx; in ops_run_compute6_1() local
1626 if (target == qd_idx) { in ops_run_compute6_1()
1639 if (i == target || i == qd_idx) in ops_run_compute6_1()
1722 int qd_idx = sh->qd_idx; in ops_run_compute6_2() local
1725 if (target == qd_idx) in ops_run_compute6_2()
1732 if (i == data_target || i == qd_idx) in ops_run_compute6_2()
1931 int qd_idx = sh->qd_idx; in ops_complete_reconstruct() local
1947 if (dev->written || i == pd_idx || i == qd_idx) { in ops_complete_reconstruct()
2087 if (sh->pd_idx == i || sh->qd_idx == i) in ops_run_reconstruct6()
2095 set_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in ops_run_reconstruct6()
2150 int qd_idx = sh->qd_idx; in ops_run_check_p() local
2170 if (i == pd_idx || i == qd_idx) in ops_run_check_p()
2769 if (sh->qd_idx >= 0 && sh->pd_idx == i) in raid5_end_read_request()
2921 int pd_idx, qd_idx; in raid5_compute_sector() local
2949 pd_idx = qd_idx = -1; in raid5_compute_sector()
2990 qd_idx = pd_idx + 1; in raid5_compute_sector()
2993 qd_idx = 0; in raid5_compute_sector()
2999 qd_idx = pd_idx + 1; in raid5_compute_sector()
3002 qd_idx = 0; in raid5_compute_sector()
3008 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
3013 qd_idx = (pd_idx + 1) % raid_disks; in raid5_compute_sector()
3019 qd_idx = 1; in raid5_compute_sector()
3024 qd_idx = data_disks + 1; in raid5_compute_sector()
3032 qd_idx = pd_idx + 1; in raid5_compute_sector()
3035 qd_idx = 0; in raid5_compute_sector()
3048 qd_idx = pd_idx + 1; in raid5_compute_sector()
3051 qd_idx = 0; in raid5_compute_sector()
3060 qd_idx = (pd_idx + raid_disks - 1) % raid_disks; in raid5_compute_sector()
3070 qd_idx = raid_disks - 1; in raid5_compute_sector()
3077 qd_idx = raid_disks - 1; in raid5_compute_sector()
3083 qd_idx = raid_disks - 1; in raid5_compute_sector()
3089 qd_idx = raid_disks - 1; in raid5_compute_sector()
3095 qd_idx = raid_disks - 1; in raid5_compute_sector()
3106 sh->qd_idx = qd_idx; in raid5_compute_sector()
3163 if (i == sh->qd_idx) in raid5_compute_blocknr()
3228 || sh2.qd_idx != sh->qd_idx) { in raid5_compute_blocknr()
3296 int i, pd_idx = sh->pd_idx, qd_idx = sh->qd_idx, disks = sh->disks; in schedule_reconstruction() local
3345 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3346 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3350 if (i == pd_idx || i == qd_idx) in schedule_reconstruction()
3382 int qd_idx = sh->qd_idx; in schedule_reconstruction() local
3383 struct r5dev *dev = &sh->dev[qd_idx]; in schedule_reconstruction()
3798 s->failed_num[i] == sh->qd_idx) && in need_this_block()
3820 s->failed_num[i] != sh->qd_idx && in need_this_block()
3859 ((sh->qd_idx >= 0 && sh->pd_idx == disk_idx) || in fetch_block()
4025 if (sh->qd_idx >= 0) { in handle_stripe_clean_event()
4026 clear_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
4027 clear_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags); in handle_stripe_clean_event()
4106 i == sh->pd_idx || i == sh->qd_idx || in handle_stripe_dirtying()
4118 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
4171 i == sh->pd_idx || i == sh->qd_idx || in handle_stripe_dirtying()
4196 i != sh->pd_idx && i != sh->qd_idx && in handle_stripe_dirtying()
4339 int qd_idx = sh->qd_idx; in handle_parity_checks6() local
4423 dev = &sh->dev[qd_idx]; in handle_parity_checks6()
4494 &sh->dev[qd_idx].flags); in handle_parity_checks6()
4495 *target = qd_idx; in handle_parity_checks6()
4522 if (i != sh->pd_idx && i != sh->qd_idx) { in handle_stripe_expansion()
4555 j != sh2->qd_idx && in handle_stripe_expansion()
4928 atomic_read(&sh->count), sh->pd_idx, sh->qd_idx, in handle_stripe()
4995 BUG_ON(sh->qd_idx >= 0 && in handle_stripe()
4996 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4997 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
5001 (i == sh->pd_idx || i == sh->qd_idx || in handle_stripe()
5011 ((i == sh->pd_idx || i == sh->qd_idx) && in handle_stripe()
5027 qdev = &sh->dev[sh->qd_idx]; in handle_stripe()
5028 s.q_failed = (s.failed >= 1 && s.failed_num[0] == sh->qd_idx) in handle_stripe()
5029 || (s.failed >= 2 && s.failed_num[1] == sh->qd_idx) in handle_stripe()
5721 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
5735 if (d == sh->pd_idx || d == sh->qd_idx) in make_discard_request()
6115 j == sh->qd_idx) in reshape_request()