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()
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()
1194 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1199 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1203 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1213 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1268 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1271 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1272 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1275 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1328 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1329 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1484 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1514 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1577 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1633 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1634 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1637 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1638 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1684 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1739 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1740 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1875 if (test_bit(R5_InJournal, &dev->flags)) { in ops_run_prexor5()
1882 } else if (test_bit(R5_Wantdrain, &dev->flags)) { in ops_run_prexor5()
2003 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
2004 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
2005 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
2012 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
2014 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
2060 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
2083 test_bit(R5_InJournal, &head_sh->dev[i].flags)) { in ops_run_reconstruct5()
2153 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2284 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2289 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2299 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2303 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2310 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2313 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2318 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2325 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2736 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2752 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2765 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2768 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2784 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2797 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2807 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2817 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2818 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2823 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2832 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2896 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
3322 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3323 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3326 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3361 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3385 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3386 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3388 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3389 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3397 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3398 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3403 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3434 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3435 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3436 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3626 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3629 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3630 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3674 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3691 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3693 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3694 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3749 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { in handle_failed_sync()
3757 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3758 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3765 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3766 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3785 && !test_bit(Faulty, &rdev->flags) in want_replace()
3786 && !test_bit(In_sync, &rdev->flags) in want_replace()
3803 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3804 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3811 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3840 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3841 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3851 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3852 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3864 !test_bit(R5_UPTODATE, &fdev[i]->flags)) in need_this_block()
3886 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3887 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3910 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3911 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3954 if (!test_bit(R5_UPTODATE, in fetch_block()
3971 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3996 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
4007 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
4039 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
4040 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
4041 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
4042 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
4049 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
4066 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
4079 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
4086 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
4114 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
4137 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
4138 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
4139 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
4172 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4173 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4175 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4176 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4182 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4184 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4185 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4186 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4187 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
4204 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
4206 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
4236 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
4237 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4239 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
4240 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
4241 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4259 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
4261 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
4262 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
4263 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
4265 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
4266 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4282 test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4286 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4299 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4301 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4333 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4337 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4369 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4462 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4493 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4534 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4603 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4604 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4622 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4659 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4660 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4680 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4681 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4685 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4687 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4689 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4694 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4700 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4709 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4715 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4722 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4728 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4742 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4743 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4750 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4755 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4756 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4763 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4770 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4776 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4781 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4787 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4790 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4796 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4801 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4803 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4807 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4811 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4816 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4818 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4821 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4832 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4964 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4970 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4971 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4972 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4990 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4994 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
5010 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
5050 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
5051 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
5053 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
5054 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
5057 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
5059 dev->written || test_bit(R5_InJournal, in handle_stripe()
5067 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
5090 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
5091 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
5092 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
5093 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
5094 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
5095 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
5096 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
5097 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
5151 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
5168 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5169 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
5177 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
5178 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
5181 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
5182 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
5192 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
5193 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
5206 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
5207 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
5208 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
5210 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
5227 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
5251 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
5265 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5468 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5473 if (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5474 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5561 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5596 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5755 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5992 if (test_bit(STRIPE_EXPANDING, &sh->state)) { in make_stripe_request()
6347 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6356 !test_bit(Journal, &rdev->flags) && in reshape_request()
6357 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6365 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6366 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6456 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6465 !test_bit(Journal, &rdev->flags) && in reshape_request()
6466 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6473 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6474 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6475 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6499 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6517 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6531 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6536 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6566 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6721 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6764 if (test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags)) in raid5d()
6997 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || in raid5_store_stripe_size()
7514 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7588 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7592 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7602 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7796 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7814 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7908 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7909 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7924 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7950 if (test_bit(In_sync, &rdev->flags)) in raid5_run()
7998 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
8076 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
8099 i, !test_bit(Faulty, &rdev->flags), in print_raid5_conf()
8117 && !test_bit(Faulty, &replacement->flags) in raid5_spare_active()
8135 && !test_bit(Faulty, &rdev->flags) in raid5_spare_active()
8158 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
8187 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
8195 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
8238 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
8293 if (test_bit(WantReplacement, &tmp->flags) && in raid5_add_disk()
8422 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
8439 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
8440 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
8500 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8512 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8545 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8556 !test_bit(Journal, &rdev->flags) && in end_reshape()
8557 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8575 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8904 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8910 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()