Lines Matching refs:test_bit
156 test_bit(STRIPE_BIOFILL_RUN, &sh->state) || in stripe_operations_active()
157 test_bit(STRIPE_COMPUTE_RUN, &sh->state); in stripe_operations_active()
162 return (test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) || in stripe_is_lowprio()
163 test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state)) && in stripe_is_lowprio()
164 !test_bit(STRIPE_R5C_CACHING, &sh->state); in stripe_is_lowprio()
224 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in do_release_stripe()
233 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) || in do_release_stripe()
235 !test_bit(STRIPE_HANDLE, &sh->state) && injournal != 0)) { in do_release_stripe()
236 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in do_release_stripe()
241 if (test_bit(STRIPE_HANDLE, &sh->state)) { in do_release_stripe()
242 if (test_bit(STRIPE_DELAYED, &sh->state) && in do_release_stripe()
243 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in do_release_stripe()
245 else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && in do_release_stripe()
271 if (!test_bit(STRIPE_EXPANDING, &sh->state)) { in do_release_stripe()
275 WARN_ON(test_bit(R5_InJournal, &sh->dev[sh->pd_idx].flags)); in do_release_stripe()
572 BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); in init_stripe()
590 test_bit(R5_LOCKED, &dev->flags)) { in init_stripe()
594 test_bit(R5_LOCKED, &dev->flags)); in init_stripe()
643 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
645 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
647 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
669 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
671 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
673 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
694 if (test_bit(MD_BROKEN, &conf->mddev->flags)) in has_failed()
721 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { in raid5_get_active_stripe()
723 if (!sh && !test_bit(R5_DID_ALLOC, in raid5_get_active_stripe()
741 || !test_bit(R5_INACTIVE_BLOCKED, in raid5_get_active_stripe()
753 if (!test_bit(STRIPE_HANDLE, &sh->state)) in raid5_get_active_stripe()
756 !test_bit(STRIPE_EXPANDING, &sh->state)); in raid5_get_active_stripe()
811 return test_bit(STRIPE_BATCH_READY, &sh->state) && in stripe_can_batch()
812 !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && in stripe_can_batch()
837 if (!test_bit(STRIPE_HANDLE, &head->state)) in stripe_add_to_batch_list()
840 !test_bit(STRIPE_EXPANDING, &head->state)); in stripe_add_to_batch_list()
914 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1084 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1116 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1121 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1125 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1136 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1194 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1197 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1198 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1201 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1261 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1262 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1422 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1452 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1515 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1571 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1572 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1575 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1576 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1622 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1677 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1678 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1813 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1820 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
1941 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
1942 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
1943 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
1950 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
1952 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
1998 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2021 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2091 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2223 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2228 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2238 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2242 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2249 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2252 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2257 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2264 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2685 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2701 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2714 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2717 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2734 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2747 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2757 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2767 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2768 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2773 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2782 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2851 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3278 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3279 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3282 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3317 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3341 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3342 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3344 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3345 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3353 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3354 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3359 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3390 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3391 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3392 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3558 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3562 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3563 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3607 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3624 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3626 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3627 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3681 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3689 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3690 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3696 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3697 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3718 && !test_bit(Faulty, &rdev->flags) in want_replace()
3719 && !test_bit(In_sync, &rdev->flags) in want_replace()
3737 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3738 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3745 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3774 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3775 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3785 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3786 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3798 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3820 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3821 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3844 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3845 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3888 if (!test_bit(R5_UPTODATE, in fetch_block()
3905 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3930 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3941 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
3973 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
3974 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
3975 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
3976 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
3983 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4000 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
4013 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4020 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4048 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4071 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4072 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4073 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4106 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4107 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4109 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4110 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4116 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4118 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4119 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4120 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4121 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4139 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4141 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4171 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4172 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4174 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4175 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4176 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4194 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4196 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4197 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4198 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4200 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4201 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4216 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4220 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4233 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4235 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4267 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4271 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4303 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4396 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4427 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4468 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4536 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4537 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4555 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4592 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4593 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4616 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4617 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4621 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4623 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4625 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4630 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4636 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4645 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4651 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4658 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4664 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4678 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4679 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4686 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4691 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4692 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4699 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4706 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4712 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4717 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4723 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4726 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4732 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4737 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4739 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4743 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4748 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4753 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4755 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4758 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4769 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4906 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4912 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4913 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4914 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4932 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4936 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4952 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
4992 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
4993 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
4995 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4996 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
4999 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5001 dev->written || test_bit(R5_InJournal, in handle_stripe()
5009 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5032 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5033 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5034 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5035 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5036 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5037 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5038 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5039 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5093 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5110 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5111 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5119 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5120 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5123 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5124 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5134 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5135 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5148 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5149 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5150 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5152 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5167 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5191 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5205 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5426 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5430 (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5431 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5520 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5555 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5712 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5899 if (test_bit(STRIPE_EXPANDING, &sh->state) || in raid5_make_request()
6071 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6080 !test_bit(Journal, &rdev->flags) && in reshape_request()
6081 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6089 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6090 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6178 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6187 !test_bit(Journal, &rdev->flags) && in reshape_request()
6188 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6195 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6196 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6197 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6222 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6240 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6254 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6259 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6288 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6444 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6533 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5d()
6729 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7248 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7318 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7322 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7332 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7469 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7487 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7581 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7582 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7597 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7630 if (test_bit(In_sync, &rdev->flags)) { in raid5_run()
7680 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
7817 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
7842 i, !test_bit(Faulty, &tmp->rdev->flags), in print_raid5_conf()
7859 && !test_bit(Faulty, &tmp->replacement->flags) in raid5_spare_active()
7877 && !test_bit(Faulty, &tmp->rdev->flags) in raid5_spare_active()
7899 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
7925 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
7933 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
7942 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
7984 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8039 if (test_bit(WantReplacement, &p->rdev->flags) && in raid5_add_disk()
8165 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8175 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8176 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8236 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8248 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8302 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8313 !test_bit(Journal, &rdev->flags) && in end_reshape()
8314 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8331 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8659 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8665 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()