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()
1082 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1114 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1119 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1123 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1134 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1192 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1195 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1196 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1199 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1259 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1260 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1420 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1450 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1513 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1569 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1570 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1573 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1574 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1620 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1675 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1676 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1811 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1818 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
1939 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
1940 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
1941 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
1948 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
1950 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
1996 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2019 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2089 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2221 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2226 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2236 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2240 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2247 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2250 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2255 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2262 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2683 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2699 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2712 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2715 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2732 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2745 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2755 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2765 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2766 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2771 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2780 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2849 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
2881 if (test_bit(In_sync, &rdev->flags) && in raid5_error()
3279 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3280 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3283 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3318 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3342 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3343 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
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()
3354 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3355 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3360 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3391 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3392 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3393 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3559 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3563 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3564 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3608 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3625 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3627 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3628 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3682 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3690 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3691 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3697 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3698 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3719 && !test_bit(Faulty, &rdev->flags) in want_replace()
3720 && !test_bit(In_sync, &rdev->flags) in want_replace()
3738 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3739 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3746 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3775 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3776 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3786 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3787 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3799 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3821 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3822 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3845 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3846 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3889 if (!test_bit(R5_UPTODATE, in fetch_block()
3906 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3931 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3942 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
3974 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
3975 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
3976 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
3977 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
3984 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4001 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
4014 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4021 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4049 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4072 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4073 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4074 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4107 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4108 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4110 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4111 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4117 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4119 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4120 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4121 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4122 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4140 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4142 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4172 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4173 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4175 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4176 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4177 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4195 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4197 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4198 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4199 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4201 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4202 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4217 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4221 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4234 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4236 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4268 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4272 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4304 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4397 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4428 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4469 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4537 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4538 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4556 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4593 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4594 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4617 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4618 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4622 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4624 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4626 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4631 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4637 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4646 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4652 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4659 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4665 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4679 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4680 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4687 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4692 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4693 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4700 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4707 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4713 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4718 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4724 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4727 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4733 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4738 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4740 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4744 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4749 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4754 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4756 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4759 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4770 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4907 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4913 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4914 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4915 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4933 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4937 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4953 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
4993 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
4994 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); 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()
5000 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5002 dev->written || test_bit(R5_InJournal, in handle_stripe()
5010 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5033 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5034 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5035 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5036 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5037 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5038 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5039 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5040 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5094 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5111 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5112 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5120 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5121 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5124 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5125 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5135 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5136 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5149 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5150 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5151 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5153 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5168 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5192 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5206 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5427 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5431 (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5432 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5521 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5556 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5713 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5900 if (test_bit(STRIPE_EXPANDING, &sh->state) || in raid5_make_request()
6072 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6081 !test_bit(Journal, &rdev->flags) && in reshape_request()
6082 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6090 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6091 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6179 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6188 !test_bit(Journal, &rdev->flags) && in reshape_request()
6189 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6196 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6197 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6198 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6223 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6241 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6255 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6260 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6289 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6445 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6719 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7238 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7308 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7312 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7322 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7459 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7477 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7571 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7572 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7587 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7620 if (test_bit(In_sync, &rdev->flags)) { in raid5_run()
7670 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
7807 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
7832 i, !test_bit(Faulty, &tmp->rdev->flags), in print_raid5_conf()
7849 && !test_bit(Faulty, &tmp->replacement->flags) in raid5_spare_active()
7867 && !test_bit(Faulty, &tmp->rdev->flags) in raid5_spare_active()
7889 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
7915 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
7923 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
7932 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
7974 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8028 if (test_bit(WantReplacement, &p->rdev->flags) && in raid5_add_disk()
8154 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8164 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8165 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8225 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8237 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8291 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8302 !test_bit(Journal, &rdev->flags) && in end_reshape()
8303 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8320 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8648 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8654 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()