Lines Matching refs:test_bit
162 test_bit(STRIPE_BIOFILL_RUN, &sh->state) || in stripe_operations_active()
163 test_bit(STRIPE_COMPUTE_RUN, &sh->state); in stripe_operations_active()
168 return (test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) || in stripe_is_lowprio()
169 test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state)) && in stripe_is_lowprio()
170 !test_bit(STRIPE_R5C_CACHING, &sh->state); in stripe_is_lowprio()
232 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in do_release_stripe()
241 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) || in do_release_stripe()
243 !test_bit(STRIPE_HANDLE, &sh->state) && injournal != 0)) { in do_release_stripe()
244 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in do_release_stripe()
249 if (test_bit(STRIPE_HANDLE, &sh->state)) { in do_release_stripe()
250 if (test_bit(STRIPE_DELAYED, &sh->state) && in do_release_stripe()
251 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in do_release_stripe()
253 else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && in do_release_stripe()
279 if (!test_bit(STRIPE_EXPANDING, &sh->state)) { in do_release_stripe()
283 WARN_ON(test_bit(R5_InJournal, &sh->dev[sh->pd_idx].flags)); in do_release_stripe()
581 BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); in init_stripe()
599 test_bit(R5_LOCKED, &dev->flags)) { in init_stripe()
603 test_bit(R5_LOCKED, &dev->flags)); in init_stripe()
651 if (!test_bit(STRIPE_HANDLE, &sh->state)) in find_get_stripe()
654 !test_bit(STRIPE_EXPANDING, &sh->state)); in find_get_stripe()
699 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
701 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
703 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()
750 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()
901 return test_bit(STRIPE_BATCH_READY, &sh->state) && in stripe_can_batch()
902 !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && in stripe_can_batch()
988 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1160 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()
1213 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1270 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1273 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1274 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1277 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1333 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1334 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1492 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1522 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1585 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1641 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1642 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1645 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1646 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1692 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1747 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1748 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1883 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1890 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
2011 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
2012 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
2013 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
2020 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
2022 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
2068 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2091 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2161 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2292 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2297 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2307 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2311 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2318 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2321 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2326 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2333 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2768 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2784 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2797 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2800 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2816 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2829 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2839 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2849 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2850 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2855 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2864 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2932 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3358 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3359 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3362 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3397 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3421 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3422 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3424 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3425 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3433 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3434 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3439 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3470 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3471 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3472 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3662 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3666 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3667 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3711 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3728 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3730 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3731 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3785 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3793 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3794 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3800 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3801 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3822 && !test_bit(Faulty, &rdev->flags) in want_replace()
3823 && !test_bit(In_sync, &rdev->flags) in want_replace()
3841 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3842 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3849 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3878 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3879 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3889 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3890 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3902 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3924 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3925 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3948 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3949 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3992 if (!test_bit(R5_UPTODATE, in fetch_block()
4009 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
4034 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
4045 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
4077 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
4078 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
4079 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
4080 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
4087 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4104 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
4117 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4124 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4152 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4175 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4176 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4177 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4210 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4211 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4213 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4214 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4220 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4222 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4223 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4224 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4225 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4243 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4245 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4275 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4276 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4278 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4279 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4280 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4298 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4300 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4301 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4302 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4304 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4305 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4320 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4324 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4337 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4339 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4371 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4375 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4407 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4500 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4531 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4572 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4641 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4642 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4660 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4697 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4698 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4721 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4722 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4726 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4728 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4730 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4735 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4741 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4750 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4756 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4763 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4769 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4783 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4784 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4791 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4796 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4797 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4804 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4811 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4817 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4822 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4828 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4831 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4837 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4842 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4844 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4848 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4853 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4858 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4860 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4863 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4874 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
5011 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
5017 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
5018 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
5019 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
5037 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
5041 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
5057 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
5097 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
5098 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
5100 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
5101 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
5104 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5106 dev->written || test_bit(R5_InJournal, in handle_stripe()
5114 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5137 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5138 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5139 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5140 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5141 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5142 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5143 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5144 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5198 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5215 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5216 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5224 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5225 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5228 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5229 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5239 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5240 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5253 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5254 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5255 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5257 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5274 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5298 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5312 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5526 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5531 if (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5532 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5630 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5665 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5826 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
6042 if (test_bit(STRIPE_EXPANDING, &sh->state) || in make_stripe_request()
6332 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6341 !test_bit(Journal, &rdev->flags) && in reshape_request()
6342 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6350 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6351 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6441 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6450 !test_bit(Journal, &rdev->flags) && in reshape_request()
6451 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6458 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6459 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6460 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6485 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6503 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6517 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6522 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6552 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6707 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6796 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5d()
6992 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7513 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7587 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7591 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7601 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7745 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7763 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7863 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7864 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7881 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7915 if (test_bit(In_sync, &rdev->flags)) { in raid5_run()
7965 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
8105 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
8130 i, !test_bit(Faulty, &rdev->flags), in print_raid5_conf()
8150 && !test_bit(Faulty, &replacement->flags) in raid5_spare_active()
8168 && !test_bit(Faulty, &rdev->flags) in raid5_spare_active()
8191 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
8220 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
8228 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
8238 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
8284 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8339 if (test_bit(WantReplacement, &tmp->flags) && in raid5_add_disk()
8465 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8475 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8476 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8536 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8548 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8602 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8613 !test_bit(Journal, &rdev->flags) && in end_reshape()
8614 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8632 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8968 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8974 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()