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()
908 return test_bit(STRIPE_BATCH_READY, &sh->state) && in stripe_can_batch()
909 !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && in stripe_can_batch()
995 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1167 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1200 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1205 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1209 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1220 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1277 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1280 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1281 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1284 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1340 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1341 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1499 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1529 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1592 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1648 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1649 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1652 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1653 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1699 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1754 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1755 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1890 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1897 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
2018 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
2019 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
2020 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
2027 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
2029 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
2075 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2098 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2168 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2299 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2304 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2314 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2318 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2325 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2328 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2333 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2340 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2775 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2791 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2804 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2807 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2823 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2836 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2846 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2856 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2857 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2862 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2871 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2939 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3365 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3366 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3369 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3404 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3428 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3429 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3431 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3432 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3440 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3441 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3446 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3477 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3478 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3479 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3669 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3673 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3674 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3718 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3735 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3737 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3738 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3792 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { 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()
3807 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3808 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3829 && !test_bit(Faulty, &rdev->flags) in want_replace()
3830 && !test_bit(In_sync, &rdev->flags) in want_replace()
3848 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3849 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3856 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3885 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3886 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3896 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3897 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3909 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3931 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3932 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3955 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3956 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3999 if (!test_bit(R5_UPTODATE, in fetch_block()
4016 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
4041 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
4052 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
4084 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
4085 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
4086 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
4087 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
4094 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4111 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
4124 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4131 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4159 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4182 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4183 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4184 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4217 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4218 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4220 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4221 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4227 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4229 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4230 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4231 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4232 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4250 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4252 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4282 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4283 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4285 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4286 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4287 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4305 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4307 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4308 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4309 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4311 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4312 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4327 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4331 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4344 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4346 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4378 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4382 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4414 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4507 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4538 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4579 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4648 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4649 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4667 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4704 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4705 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4728 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4729 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4733 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4735 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4737 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4742 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4748 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4757 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4763 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4770 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4776 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4790 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4791 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4798 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4803 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4804 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4811 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4818 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4824 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4829 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4835 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4838 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4844 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4849 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4851 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4855 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4860 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4865 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4867 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4870 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4881 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
5018 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
5024 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
5025 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
5026 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
5044 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
5048 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
5064 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
5104 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
5105 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
5107 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
5108 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
5111 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5113 dev->written || test_bit(R5_InJournal, in handle_stripe()
5121 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5144 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5145 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5146 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5147 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5148 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5149 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5150 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5151 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5205 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5222 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5223 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5231 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5232 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5235 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5236 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5246 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5247 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5260 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5261 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5262 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5264 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5281 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5305 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5319 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5523 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5528 if (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5529 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5624 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5659 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5820 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5965 return test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) && in reshape_inprogress()
5966 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) && in reshape_inprogress()
5967 !test_bit(MD_RECOVERY_DONE, &mddev->recovery) && in reshape_inprogress()
5968 !test_bit(MD_RECOVERY_INTR, &mddev->recovery); in reshape_inprogress()
6050 if (test_bit(STRIPE_EXPANDING, &sh->state) || in make_stripe_request()
6392 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6401 !test_bit(Journal, &rdev->flags) && in reshape_request()
6402 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6410 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6411 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6501 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6510 !test_bit(Journal, &rdev->flags) && in reshape_request()
6511 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6518 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6519 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6520 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6545 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6563 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6577 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6582 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6612 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6767 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6856 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5d()
7052 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7573 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7647 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7651 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7661 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7798 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7816 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7910 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7911 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7926 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7960 if (test_bit(In_sync, &rdev->flags)) in raid5_run()
8008 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
8144 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
8169 i, !test_bit(Faulty, &rdev->flags), in print_raid5_conf()
8189 && !test_bit(Faulty, &replacement->flags) in raid5_spare_active()
8207 && !test_bit(Faulty, &rdev->flags) in raid5_spare_active()
8230 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
8259 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
8267 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
8277 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
8323 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8378 if (test_bit(WantReplacement, &tmp->flags) && in raid5_add_disk()
8506 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8523 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8524 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8584 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8596 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8650 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8661 !test_bit(Journal, &rdev->flags) && in end_reshape()
8662 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8680 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
9016 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
9022 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()