Lines Matching refs:test_bit
163 test_bit(STRIPE_BIOFILL_RUN, &sh->state) || in stripe_operations_active()
164 test_bit(STRIPE_COMPUTE_RUN, &sh->state); in stripe_operations_active()
169 return (test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) || in stripe_is_lowprio()
170 test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state)) && in stripe_is_lowprio()
171 !test_bit(STRIPE_R5C_CACHING, &sh->state); in stripe_is_lowprio()
233 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in do_release_stripe()
242 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) || in do_release_stripe()
244 !test_bit(STRIPE_HANDLE, &sh->state) && injournal != 0)) { in do_release_stripe()
245 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in do_release_stripe()
250 if (test_bit(STRIPE_HANDLE, &sh->state)) { in do_release_stripe()
251 if (test_bit(STRIPE_DELAYED, &sh->state) && in do_release_stripe()
252 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in do_release_stripe()
254 else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && in do_release_stripe()
280 if (!test_bit(STRIPE_EXPANDING, &sh->state)) { in do_release_stripe()
284 WARN_ON(test_bit(R5_InJournal, &sh->dev[sh->pd_idx].flags)); in do_release_stripe()
582 BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); in init_stripe()
600 test_bit(R5_LOCKED, &dev->flags)) { in init_stripe()
604 test_bit(R5_LOCKED, &dev->flags)); in init_stripe()
652 if (!test_bit(STRIPE_HANDLE, &sh->state)) in find_get_stripe()
655 !test_bit(STRIPE_EXPANDING, &sh->state)); in find_get_stripe()
700 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
702 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
704 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
725 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
727 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
729 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
749 if (test_bit(MD_BROKEN, &conf->mddev->flags)) in has_failed()
796 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) in is_inactive_blocked()
839 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { in raid5_get_active_stripe()
848 if (!test_bit(R5_DID_ALLOC, &conf->cache_state)) in raid5_get_active_stripe()
908 return test_bit(STRIPE_BATCH_READY, &sh->state) && in stripe_can_batch()
994 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1166 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1193 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1198 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1202 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1212 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1263 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1266 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1267 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1270 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1319 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1320 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1473 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1503 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1566 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1622 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1623 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1626 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1627 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1673 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1728 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1729 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1864 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1871 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
1992 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
1993 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
1994 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
2001 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
2003 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
2049 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2072 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2142 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2273 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2278 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2288 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2292 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2299 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2302 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2307 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2314 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2725 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2741 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2754 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2757 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2773 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2786 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2796 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2806 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2807 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2812 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2821 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2884 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3310 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3311 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3314 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3349 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3373 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3374 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3376 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3377 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3385 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3386 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3391 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3422 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3423 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3424 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3593 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3596 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3597 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3634 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3650 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3652 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3653 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3704 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3712 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3713 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3720 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3721 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3740 && !test_bit(Faulty, &rdev->flags) in want_replace()
3741 && !test_bit(In_sync, &rdev->flags) in want_replace()
3758 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3759 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3766 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3795 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3796 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3806 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3807 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3819 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3841 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3842 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3865 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3866 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3909 if (!test_bit(R5_UPTODATE, in fetch_block()
3926 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3951 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3962 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
3994 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
3995 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
3996 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
3997 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
4004 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4031 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4038 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4066 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4089 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4090 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4091 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4124 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4125 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4127 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4128 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4134 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4136 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4137 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4138 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4139 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4156 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4158 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4188 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4189 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4191 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4192 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4193 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4211 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4213 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4214 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4215 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4217 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4218 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4234 test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4238 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4251 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4253 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4285 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4289 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4320 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4413 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4444 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4484 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4553 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4554 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4572 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4609 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4610 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4630 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4631 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4635 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4637 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4639 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4644 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4650 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4659 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4665 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4672 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4691 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4692 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4699 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4704 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4705 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4712 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4719 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4725 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4730 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4736 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4739 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4745 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4750 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4752 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4756 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4760 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4765 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4767 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4770 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4781 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4911 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4917 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4918 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4919 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4937 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4941 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4957 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
4997 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
4998 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
5000 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
5001 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
5004 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5006 dev->written || test_bit(R5_InJournal, in handle_stripe()
5014 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5037 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5038 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5039 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5040 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5041 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5042 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5043 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5044 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5098 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5115 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5116 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5124 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5125 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5128 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5129 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5139 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5140 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5153 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5154 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5155 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5157 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5174 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5198 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5212 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5415 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5420 if (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5421 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5508 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5543 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5702 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5983 if (test_bit(STRIPE_EXPANDING, &sh->state)) { in make_stripe_request()
6337 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6346 !test_bit(Journal, &rdev->flags) && in reshape_request()
6347 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6355 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6356 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6446 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6455 !test_bit(Journal, &rdev->flags) && in reshape_request()
6456 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6463 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6464 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6465 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6489 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6507 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6521 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6526 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6556 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6711 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6754 if (test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags)) in raid5d()
6987 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7508 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7582 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7586 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7596 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7790 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7808 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7902 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7903 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7918 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7944 if (test_bit(In_sync, &rdev->flags)) in raid5_run()
7992 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
8070 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
8093 i, !test_bit(Faulty, &rdev->flags), in print_raid5_conf()
8111 && !test_bit(Faulty, &replacement->flags) in raid5_spare_active()
8129 && !test_bit(Faulty, &rdev->flags) in raid5_spare_active()
8152 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
8181 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
8189 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
8232 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8287 if (test_bit(WantReplacement, &tmp->flags) && in raid5_add_disk()
8416 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8433 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8434 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8494 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8506 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8539 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8550 !test_bit(Journal, &rdev->flags) && in end_reshape()
8551 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8569 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8898 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8904 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()