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()
1083 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1115 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1120 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1124 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1135 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1193 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1196 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1197 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1200 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1260 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1261 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1421 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1451 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1514 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1570 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1571 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1574 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1575 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1621 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1676 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1677 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1812 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1819 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
1940 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
1941 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
1942 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
1949 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
1951 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
1997 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2020 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2090 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2222 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2227 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2237 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2241 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2248 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2251 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2256 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2263 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2684 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2700 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2713 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2716 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2733 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2746 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2756 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2766 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2767 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2772 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2781 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2850 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3277 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3278 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3281 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3316 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3340 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3341 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3343 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3344 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3352 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3353 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3358 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3389 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3390 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3391 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3557 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3561 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3562 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3606 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3623 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3625 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3626 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3680 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3688 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3689 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3695 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3696 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3717 && !test_bit(Faulty, &rdev->flags) in want_replace()
3718 && !test_bit(In_sync, &rdev->flags) in want_replace()
3736 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3737 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3744 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3773 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3774 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3784 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3785 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3797 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3819 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3820 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3843 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3844 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3887 if (!test_bit(R5_UPTODATE, in fetch_block()
3904 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3929 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3940 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
3972 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
3973 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
3974 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
3975 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
3982 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
3999 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
4012 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4019 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4047 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4070 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4071 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4072 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4105 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4106 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4108 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4109 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4115 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4117 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4118 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4119 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4120 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4138 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4140 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4170 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4171 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4173 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4174 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4175 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4193 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4195 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4196 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4197 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4199 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4200 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4215 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4219 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4232 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4234 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4266 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4270 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4302 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4395 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4426 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4467 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4535 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4536 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4554 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4591 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4592 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4615 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4616 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4620 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4622 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4624 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4629 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4635 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4644 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4650 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4657 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4663 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4677 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4678 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4685 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4690 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4691 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4698 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4705 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4711 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4716 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4722 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4725 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4731 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4736 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4738 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4742 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4747 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4752 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4754 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4757 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4768 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4905 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4911 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4912 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4913 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4931 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4935 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4951 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
4991 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
4992 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
4994 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4995 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
4998 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5000 dev->written || test_bit(R5_InJournal, in handle_stripe()
5008 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5031 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5032 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5033 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5034 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5035 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5036 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5037 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5038 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5092 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5109 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5110 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5118 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5119 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5122 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5123 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5133 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5134 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5147 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5148 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5149 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5151 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5166 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5190 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5204 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5425 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5429 (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5430 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5519 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5554 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5711 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5898 if (test_bit(STRIPE_EXPANDING, &sh->state) || in raid5_make_request()
6070 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6079 !test_bit(Journal, &rdev->flags) && in reshape_request()
6080 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6088 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6089 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6177 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6186 !test_bit(Journal, &rdev->flags) && in reshape_request()
6187 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6194 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6195 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6196 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6221 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6239 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6253 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6258 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6287 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6443 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6532 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5d()
6728 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7247 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7317 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7321 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7331 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7468 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7486 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7580 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7581 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7596 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7629 if (test_bit(In_sync, &rdev->flags)) { in raid5_run()
7679 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
7816 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
7841 i, !test_bit(Faulty, &tmp->rdev->flags), in print_raid5_conf()
7858 && !test_bit(Faulty, &tmp->replacement->flags) in raid5_spare_active()
7876 && !test_bit(Faulty, &tmp->rdev->flags) in raid5_spare_active()
7898 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
7924 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
7932 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
7941 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
7983 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8038 if (test_bit(WantReplacement, &p->rdev->flags) && in raid5_add_disk()
8164 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8174 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8175 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8235 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8247 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8301 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8312 !test_bit(Journal, &rdev->flags) && in end_reshape()
8313 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8330 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8658 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8664 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()