Lines Matching refs:test_bit

163 	       test_bit(STRIPE_BIOFILL_RUN, &sh->state) ||  in stripe_operations_active()
164 test_bit(STRIPE_COMPUTE_RUN, &sh->state); in stripe_operations_active()
169 return (test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) || in stripe_is_lowprio()
170 test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state)) && in stripe_is_lowprio()
171 !test_bit(STRIPE_R5C_CACHING, &sh->state); in stripe_is_lowprio()
233 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in do_release_stripe()
242 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) || in do_release_stripe()
244 !test_bit(STRIPE_HANDLE, &sh->state) && injournal != 0)) { in do_release_stripe()
245 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in do_release_stripe()
250 if (test_bit(STRIPE_HANDLE, &sh->state)) { in do_release_stripe()
251 if (test_bit(STRIPE_DELAYED, &sh->state) && in do_release_stripe()
252 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in do_release_stripe()
254 else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && in do_release_stripe()
280 if (!test_bit(STRIPE_EXPANDING, &sh->state)) { in do_release_stripe()
284 WARN_ON(test_bit(R5_InJournal, &sh->dev[sh->pd_idx].flags)); in do_release_stripe()
582 BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); in init_stripe()
600 test_bit(R5_LOCKED, &dev->flags)) { in init_stripe()
604 test_bit(R5_LOCKED, &dev->flags)); in init_stripe()
652 if (!test_bit(STRIPE_HANDLE, &sh->state)) in find_get_stripe()
655 !test_bit(STRIPE_EXPANDING, &sh->state)); in find_get_stripe()
700 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
702 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
704 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()
749 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()
994 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1166 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()
1212 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1267 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1270 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1271 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1274 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1327 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1328 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1481 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1511 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1574 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1630 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1631 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1634 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1635 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1681 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1736 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1737 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1872 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1879 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
2000 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
2001 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
2002 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
2009 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
2011 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
2057 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2080 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2150 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2281 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2286 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2296 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2300 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2307 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2310 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2315 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2322 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2733 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2749 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2762 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2765 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2781 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2794 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2804 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2814 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2815 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2820 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2829 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2892 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3318 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3319 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3322 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3357 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3381 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3382 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3384 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3385 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3393 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3394 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3399 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3430 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3431 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3432 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3601 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3604 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3605 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3642 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3658 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3660 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3661 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3712 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3720 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3721 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3728 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3729 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3748 && !test_bit(Faulty, &rdev->flags) in want_replace()
3749 && !test_bit(In_sync, &rdev->flags) in want_replace()
3766 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3767 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3774 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3803 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3804 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3814 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3815 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3827 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3849 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3850 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3873 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3874 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3917 if (!test_bit(R5_UPTODATE, in fetch_block()
3934 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3959 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3970 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
4002 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
4003 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
4004 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
4005 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
4012 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4039 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4046 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4074 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4097 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4098 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4099 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4132 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4133 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4135 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4136 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4142 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4144 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4145 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4146 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4147 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4164 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4166 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4196 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4197 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4199 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4200 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4201 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4219 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4221 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4222 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4223 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4225 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4226 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4242 test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4246 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4259 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4261 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4293 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4297 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4328 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4421 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4452 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4492 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4561 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4562 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4580 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4617 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4618 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4638 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4639 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4643 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4645 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4647 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4652 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4658 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4667 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4673 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4680 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4699 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4700 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4707 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4712 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4713 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4720 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4727 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4733 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4738 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4744 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4747 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4753 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4758 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4760 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4764 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4768 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4773 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4775 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4778 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4789 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4919 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4925 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4926 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4927 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4945 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4949 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4965 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
5005 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
5006 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
5008 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
5009 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
5012 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5014 dev->written || test_bit(R5_InJournal, in handle_stripe()
5022 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5045 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5046 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5047 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5048 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5049 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5050 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5051 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5052 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5106 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5123 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5124 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5132 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5133 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5136 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5137 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5147 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5148 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5161 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5162 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5163 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5165 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5182 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5206 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5220 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5423 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5428 if (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5429 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5516 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5551 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5710 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5991 if (test_bit(STRIPE_EXPANDING, &sh->state)) { in make_stripe_request()
6346 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6355 !test_bit(Journal, &rdev->flags) && in reshape_request()
6356 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6364 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6365 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6455 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6464 !test_bit(Journal, &rdev->flags) && in reshape_request()
6465 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6472 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6473 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6474 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6498 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6516 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6530 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6535 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6565 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6720 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6763 if (test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags)) in raid5d()
6996 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7517 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7591 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7595 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7605 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7799 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7817 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7911 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7912 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7927 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7953 if (test_bit(In_sync, &rdev->flags)) in raid5_run()
8001 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
8079 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
8102 i, !test_bit(Faulty, &rdev->flags), in print_raid5_conf()
8120 && !test_bit(Faulty, &replacement->flags) in raid5_spare_active()
8138 && !test_bit(Faulty, &rdev->flags) in raid5_spare_active()
8161 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
8190 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
8198 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
8241 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8296 if (test_bit(WantReplacement, &tmp->flags) && in raid5_add_disk()
8425 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8442 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8443 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8503 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8515 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8548 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8559 !test_bit(Journal, &rdev->flags) && in end_reshape()
8560 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8578 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8907 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8913 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()