Lines Matching refs:test_bit
155 test_bit(STRIPE_BIOFILL_RUN, &sh->state) || in stripe_operations_active()
156 test_bit(STRIPE_COMPUTE_RUN, &sh->state); in stripe_operations_active()
161 return (test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) || in stripe_is_lowprio()
162 test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state)) && in stripe_is_lowprio()
163 !test_bit(STRIPE_R5C_CACHING, &sh->state); in stripe_is_lowprio()
223 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in do_release_stripe()
232 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) || in do_release_stripe()
234 !test_bit(STRIPE_HANDLE, &sh->state) && injournal != 0)) { in do_release_stripe()
235 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in do_release_stripe()
240 if (test_bit(STRIPE_HANDLE, &sh->state)) { in do_release_stripe()
241 if (test_bit(STRIPE_DELAYED, &sh->state) && in do_release_stripe()
242 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in do_release_stripe()
244 else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && in do_release_stripe()
270 if (!test_bit(STRIPE_EXPANDING, &sh->state)) { in do_release_stripe()
274 WARN_ON(test_bit(R5_InJournal, &sh->dev[sh->pd_idx].flags)); in do_release_stripe()
571 BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); in init_stripe()
589 test_bit(R5_LOCKED, &dev->flags)) { in init_stripe()
593 test_bit(R5_LOCKED, &dev->flags)); in init_stripe()
642 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
644 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
646 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
668 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
670 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
672 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
720 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { in raid5_get_active_stripe()
722 if (!sh && !test_bit(R5_DID_ALLOC, in raid5_get_active_stripe()
740 || !test_bit(R5_INACTIVE_BLOCKED, in raid5_get_active_stripe()
752 if (!test_bit(STRIPE_HANDLE, &sh->state)) in raid5_get_active_stripe()
755 !test_bit(STRIPE_EXPANDING, &sh->state)); in raid5_get_active_stripe()
810 return test_bit(STRIPE_BATCH_READY, &sh->state) && in stripe_can_batch()
811 !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && in stripe_can_batch()
836 if (!test_bit(STRIPE_HANDLE, &head->state)) in stripe_add_to_batch_list()
839 !test_bit(STRIPE_EXPANDING, &head->state)); in stripe_add_to_batch_list()
913 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1083 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1115 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1120 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1124 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1135 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1193 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1196 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1197 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1200 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1260 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1261 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1421 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1451 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1514 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1570 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1571 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1574 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1575 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1621 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1676 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1677 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1812 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1819 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
1940 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
1941 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
1942 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
1949 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
1951 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
1997 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2020 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2090 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2222 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2227 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2237 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2241 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2248 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2251 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2256 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2263 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2684 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2700 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2713 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2716 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2733 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2746 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2756 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2766 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2767 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2772 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2781 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2850 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
2882 if (test_bit(In_sync, &rdev->flags) && in raid5_error()
3280 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3281 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3284 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3319 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3343 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3344 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3346 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3347 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3355 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3356 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3361 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3392 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3393 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3394 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3560 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3564 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3565 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3609 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3626 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3628 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3629 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3683 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3691 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3692 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3698 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3699 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3720 && !test_bit(Faulty, &rdev->flags) in want_replace()
3721 && !test_bit(In_sync, &rdev->flags) in want_replace()
3739 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3740 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3747 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3776 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3777 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3787 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3788 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3800 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3822 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3823 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3846 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3847 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3890 if (!test_bit(R5_UPTODATE, in fetch_block()
3907 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3932 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3943 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
3975 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
3976 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
3977 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
3978 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
3985 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4002 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
4015 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4022 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4050 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4073 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4074 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4075 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4108 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4109 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4111 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4112 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4118 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4120 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4121 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4122 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4123 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4141 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4143 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4173 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4174 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4176 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4177 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4178 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4196 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4198 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4199 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4200 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4202 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4203 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4218 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4222 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4235 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4237 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4269 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4273 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4305 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4398 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4429 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4470 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4538 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4539 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4557 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4594 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4595 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4618 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4619 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4623 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4625 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4627 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4632 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4638 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4647 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4653 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4660 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4666 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4680 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4681 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4688 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4693 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4694 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4701 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4708 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4714 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4719 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4725 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4728 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4734 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4739 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4741 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4745 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4750 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4755 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4757 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4760 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4771 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4908 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4914 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4915 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4916 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4934 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4938 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4954 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
4994 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
4995 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
4997 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4998 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
5001 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5003 dev->written || test_bit(R5_InJournal, in handle_stripe()
5011 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5034 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5035 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5036 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5037 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5038 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5039 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5040 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5041 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5095 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5112 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5113 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5121 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5122 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5125 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5126 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5136 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5137 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5150 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5151 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5152 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5154 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5169 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5193 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5207 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5420 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5425 if (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5426 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5524 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5559 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5716 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5904 if (test_bit(STRIPE_EXPANDING, &sh->state) || in raid5_make_request()
6076 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6085 !test_bit(Journal, &rdev->flags) && in reshape_request()
6086 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6094 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6095 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6183 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6192 !test_bit(Journal, &rdev->flags) && in reshape_request()
6193 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6200 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6201 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6202 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6227 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6245 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6259 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6264 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6293 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6449 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6723 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7242 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7312 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7316 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7326 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7463 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7481 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7575 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7576 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7591 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7624 if (test_bit(In_sync, &rdev->flags)) { in raid5_run()
7674 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
7808 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
7833 i, !test_bit(Faulty, &tmp->rdev->flags), in print_raid5_conf()
7850 && !test_bit(Faulty, &tmp->replacement->flags) in raid5_spare_active()
7868 && !test_bit(Faulty, &tmp->rdev->flags) in raid5_spare_active()
7890 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
7916 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
7924 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
7933 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
7975 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8029 if (test_bit(WantReplacement, &p->rdev->flags) && in raid5_add_disk()
8155 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8165 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8166 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8226 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8238 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8292 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8303 !test_bit(Journal, &rdev->flags) && in end_reshape()
8304 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8321 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8652 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8658 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()