Lines Matching refs:test_bit

164 	       test_bit(STRIPE_BIOFILL_RUN, &sh->state) ||  in stripe_operations_active()
165 test_bit(STRIPE_COMPUTE_RUN, &sh->state); in stripe_operations_active()
170 return (test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) || in stripe_is_lowprio()
171 test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state)) && in stripe_is_lowprio()
172 !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()
503 BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); in init_stripe()
521 test_bit(R5_LOCKED, &dev->flags)) { in init_stripe()
525 test_bit(R5_LOCKED, &dev->flags)); in init_stripe()
574 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
576 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
578 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
600 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
602 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
604 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
652 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { in raid5_get_active_stripe()
654 if (!sh && !test_bit(R5_DID_ALLOC, in raid5_get_active_stripe()
672 || !test_bit(R5_INACTIVE_BLOCKED, in raid5_get_active_stripe()
684 if (!test_bit(STRIPE_HANDLE, &sh->state)) in raid5_get_active_stripe()
687 !test_bit(STRIPE_EXPANDING, &sh->state)); in raid5_get_active_stripe()
738 return test_bit(STRIPE_BATCH_READY, &sh->state) && in stripe_can_batch()
739 !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && in stripe_can_batch()
764 if (!test_bit(STRIPE_HANDLE, &head->state)) in stripe_add_to_batch_list()
767 !test_bit(STRIPE_EXPANDING, &head->state)); in stripe_add_to_batch_list()
841 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1010 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1042 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1047 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1051 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1062 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1120 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1123 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1124 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1127 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1187 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1188 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1345 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1374 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1432 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1481 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1482 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1485 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1486 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1524 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1574 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1575 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1697 if (test_bit(R5_InJournal, &dev->flags)) in ops_run_prexor5()
1699 else if (test_bit(R5_Wantdrain, &dev->flags)) in ops_run_prexor5()
1814 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
1815 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
1816 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
1823 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
1825 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
1869 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
1890 test_bit(R5_InJournal, &head_sh->dev[i].flags)) in ops_run_reconstruct5()
1952 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2074 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2079 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2089 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2093 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2100 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2103 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2108 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2115 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2496 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2512 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2525 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2528 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2544 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2557 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2571 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2572 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2575 if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2584 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2653 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3071 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3072 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3075 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3110 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3134 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3135 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3137 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3138 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3146 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3147 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3152 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3183 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3184 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3185 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3351 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3355 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3356 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3400 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3417 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3419 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3420 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3474 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3482 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3483 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3489 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3490 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3511 && !test_bit(Faulty, &rdev->flags) in want_replace()
3512 && !test_bit(In_sync, &rdev->flags) in want_replace()
3529 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3530 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3537 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3566 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3567 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3577 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3578 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3602 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3603 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3626 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3627 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3670 if (!test_bit(R5_UPTODATE, in fetch_block()
3687 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3712 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3723 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
3755 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
3756 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
3757 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
3758 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
3765 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
3782 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
3795 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
3802 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
3830 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
3853 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
3854 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
3855 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
3888 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
3889 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3891 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
3892 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
3898 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
3900 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3901 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
3902 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
3903 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
3921 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
3923 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
3953 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
3954 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3956 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
3957 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
3958 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
3978 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
3980 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3981 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
3982 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
3984 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
3985 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4002 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4006 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4019 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4021 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4053 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4057 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4089 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4182 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4246 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4314 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4315 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4332 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4369 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4370 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4393 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4394 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4398 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4400 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4402 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4407 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4413 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4422 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4428 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4435 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4441 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4455 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4456 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4463 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4468 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4469 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4476 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4483 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4489 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4494 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4500 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4503 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4509 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4514 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4516 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4520 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4525 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4530 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4532 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4535 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4546 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4679 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4685 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4686 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4687 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4705 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4709 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4725 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
4765 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
4766 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
4768 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4769 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
4772 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
4774 dev->written || test_bit(R5_InJournal, in handle_stripe()
4782 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
4805 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
4806 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
4807 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
4808 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
4809 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
4810 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
4811 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
4812 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
4866 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
4883 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
4884 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
4892 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
4893 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
4896 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
4897 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
4907 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
4908 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
4921 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
4922 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
4923 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
4925 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
4943 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
4967 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
4981 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5089 if (test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) in raid5_congested()
5093 if (test_bit(R5C_LOG_TIGHT, &conf->cache_state)) in raid5_congested()
5224 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5228 (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5229 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5319 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5354 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5511 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5698 if (test_bit(STRIPE_EXPANDING, &sh->state) || in raid5_make_request()
5870 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
5879 !test_bit(Journal, &rdev->flags) && in reshape_request()
5880 !test_bit(In_sync, &rdev->flags) && in reshape_request()
5888 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
5889 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
5977 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
5986 !test_bit(Journal, &rdev->flags) && in reshape_request()
5987 !test_bit(In_sync, &rdev->flags) && in reshape_request()
5994 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
5995 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
5996 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6021 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6039 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6053 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6058 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6086 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6240 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6934 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7004 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7008 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7018 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7149 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7167 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7261 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7262 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7277 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7310 if (test_bit(In_sync, &rdev->flags)) { in raid5_run()
7360 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
7498 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
7523 i, !test_bit(Faulty, &tmp->rdev->flags), in print_raid5_conf()
7540 && !test_bit(Faulty, &tmp->replacement->flags) in raid5_spare_active()
7558 && !test_bit(Faulty, &tmp->rdev->flags) in raid5_spare_active()
7580 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
7606 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
7614 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
7623 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
7665 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
7712 if (test_bit(WantReplacement, &p->rdev->flags) && in raid5_add_disk()
7838 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
7848 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
7849 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
7909 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
7921 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
7975 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
7986 !test_bit(Journal, &rdev->flags) && in end_reshape()
7987 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8012 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8340 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8346 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()