Lines Matching refs:test_bit
155 test_bit(STRIPE_BIOFILL_RUN, &sh->state) || in stripe_operations_active()
156 test_bit(STRIPE_COMPUTE_RUN, &sh->state); in stripe_operations_active()
161 return (test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) || in stripe_is_lowprio()
162 test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state)) && in stripe_is_lowprio()
163 !test_bit(STRIPE_R5C_CACHING, &sh->state); in stripe_is_lowprio()
223 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in do_release_stripe()
232 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) || in do_release_stripe()
234 !test_bit(STRIPE_HANDLE, &sh->state) && injournal != 0)) { in do_release_stripe()
235 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in do_release_stripe()
240 if (test_bit(STRIPE_HANDLE, &sh->state)) { in do_release_stripe()
241 if (test_bit(STRIPE_DELAYED, &sh->state) && in do_release_stripe()
242 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in do_release_stripe()
244 else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && in do_release_stripe()
270 if (!test_bit(STRIPE_EXPANDING, &sh->state)) { in do_release_stripe()
274 WARN_ON(test_bit(R5_InJournal, &sh->dev[sh->pd_idx].flags)); in do_release_stripe()
494 BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); in init_stripe()
512 test_bit(R5_LOCKED, &dev->flags)) { in init_stripe()
516 test_bit(R5_LOCKED, &dev->flags)); in init_stripe()
565 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
567 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
569 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
591 if (rdev && test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
593 if (!rdev || test_bit(Faulty, &rdev->flags)) in raid5_calc_degraded()
595 else if (test_bit(In_sync, &rdev->flags)) in raid5_calc_degraded()
643 if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { in raid5_get_active_stripe()
645 if (!sh && !test_bit(R5_DID_ALLOC, in raid5_get_active_stripe()
663 || !test_bit(R5_INACTIVE_BLOCKED, in raid5_get_active_stripe()
675 if (!test_bit(STRIPE_HANDLE, &sh->state)) in raid5_get_active_stripe()
678 !test_bit(STRIPE_EXPANDING, &sh->state)); in raid5_get_active_stripe()
733 return test_bit(STRIPE_BATCH_READY, &sh->state) && in stripe_can_batch()
734 !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && in stripe_can_batch()
759 if (!test_bit(STRIPE_HANDLE, &head->state)) in stripe_add_to_batch_list()
762 !test_bit(STRIPE_EXPANDING, &head->state)); in stripe_add_to_batch_list()
836 if (test_bit(STRIPE_BIT_DELAY, &sh->batch_head->state) && in stripe_add_to_batch_list()
1005 if (test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_io()
1037 if (test_bit(R5_ReadRepl, &head_sh->dev[i].flags) && rrdev) in ops_run_io()
1042 if (rdev && test_bit(Faulty, &rdev->flags)) in ops_run_io()
1046 if (rrdev && test_bit(Faulty, &rrdev->flags)) in ops_run_io()
1057 test_bit(WriteErrorSeen, &rdev->flags)) { in ops_run_io()
1115 if (test_bit(R5_ReadNoMerge, &head_sh->dev[i].flags)) in ops_run_io()
1118 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1119 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1122 test_bit(R5_InJournal, &sh->dev[i].flags)) in ops_run_io()
1182 if (test_bit(R5_SkipCopy, &sh->dev[i].flags)) in ops_run_io()
1183 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in ops_run_io()
1340 if (test_bit(R5_Wantfill, &dev->flags)) { in ops_run_biofill()
1369 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in mark_target_uptodate()
1421 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute5()
1470 (test_bit(R5_Wantdrain, &dev->flags) || in set_syndrome_sources()
1471 test_bit(R5_InJournal, &dev->flags))) || in set_syndrome_sources()
1474 test_bit(R5_InJournal, &dev->flags)))) { in set_syndrome_sources()
1475 if (test_bit(R5_InJournal, &dev->flags)) in set_syndrome_sources()
1513 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_1()
1563 BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); in ops_run_compute6_2()
1564 BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); in ops_run_compute6_2()
1686 if (test_bit(R5_InJournal, &dev->flags)) in ops_run_prexor5()
1688 else if (test_bit(R5_Wantdrain, &dev->flags)) in ops_run_prexor5()
1803 fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); in ops_complete_reconstruct()
1804 sync |= test_bit(R5_SyncIO, &sh->dev[i].flags); in ops_complete_reconstruct()
1805 discard |= test_bit(R5_Discard, &sh->dev[i].flags); in ops_complete_reconstruct()
1812 if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) { in ops_complete_reconstruct()
1814 if (test_bit(STRIPE_EXPAND_READY, &sh->state)) in ops_complete_reconstruct()
1858 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct5()
1879 test_bit(R5_InJournal, &head_sh->dev[i].flags)) in ops_run_reconstruct5()
1941 if (!test_bit(R5_Discard, &sh->dev[i].flags)) in ops_run_reconstruct6()
2063 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { in raid_run_ops()
2068 if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) { in raid_run_ops()
2078 if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) in raid_run_ops()
2082 if (test_bit(STRIPE_OP_PREXOR, &ops_request)) { in raid_run_ops()
2089 if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request)) in raid_run_ops()
2092 if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { in raid_run_ops()
2097 if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) { in raid_run_ops()
2104 if (test_bit(STRIPE_OP_CHECK, &ops_request)) { in raid_run_ops()
2482 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2498 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in raid5_end_read_request()
2511 } else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2514 if (test_bit(R5_InJournal, &sh->dev[i].flags)) in raid5_end_read_request()
2531 if (test_bit(R5_ReadRepl, &sh->dev[i].flags)) in raid5_end_read_request()
2544 } else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) { in raid5_end_read_request()
2554 if (!test_bit(Faulty, &rdev->flags)) { in raid5_end_read_request()
2564 if (set_bad && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2565 && !test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) in raid5_end_read_request()
2570 else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) { in raid5_end_read_request()
2579 && test_bit(In_sync, &rdev->flags) in raid5_end_read_request()
2648 if (test_bit(R5_ReadError, &sh->dev[i].flags)) in raid5_end_write_request()
2680 if (test_bit(In_sync, &rdev->flags) && in raid5_error()
3078 if (!test_bit(R5_OVERWRITE, &dev->flags) && in delay_towrite()
3079 !test_bit(R5_Insync, &dev->flags) && s->injournal) in delay_towrite()
3082 if (test_bit(R5C_LOG_CRITICAL, &conf->cache_state) && in delay_towrite()
3117 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3141 BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || in schedule_reconstruction()
3142 test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); in schedule_reconstruction()
3144 (!(test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags) || in schedule_reconstruction()
3145 test_bit(R5_Wantcompute, &sh->dev[qd_idx].flags)))); in schedule_reconstruction()
3153 (test_bit(R5_UPTODATE, &dev->flags) || in schedule_reconstruction()
3154 test_bit(R5_Wantcompute, &dev->flags))) { in schedule_reconstruction()
3159 } else if (test_bit(R5_InJournal, &dev->flags)) { in schedule_reconstruction()
3190 test_bit(STRIPE_OP_BIODRAIN, &s->ops_request) && in schedule_reconstruction()
3191 !test_bit(STRIPE_FULL_WRITE, &sh->state) && in schedule_reconstruction()
3192 test_bit(R5_Insync, &sh->dev[pd_idx].flags)) in schedule_reconstruction()
3358 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { in handle_failed_stripe()
3362 if (rdev && test_bit(In_sync, &rdev->flags) && in handle_failed_stripe()
3363 !test_bit(Faulty, &rdev->flags)) in handle_failed_stripe()
3407 WARN_ON(test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_failed_stripe()
3424 if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && in handle_failed_stripe()
3426 (!test_bit(R5_Insync, &sh->dev[i].flags) || in handle_failed_stripe()
3427 test_bit(R5_ReadError, &sh->dev[i].flags))) { in handle_failed_stripe()
3481 if (test_bit(MD_RECOVERY_RECOVER, &conf->mddev->recovery)) { 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()
3496 && !test_bit(Faulty, &rdev->flags) in handle_failed_sync()
3497 && !test_bit(In_sync, &rdev->flags) in handle_failed_sync()
3518 && !test_bit(Faulty, &rdev->flags) in want_replace()
3519 && !test_bit(In_sync, &rdev->flags) in want_replace()
3536 if (test_bit(R5_LOCKED, &dev->flags) || in need_this_block()
3537 test_bit(R5_UPTODATE, &dev->flags)) in need_this_block()
3544 (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags))) in need_this_block()
3573 if (test_bit(R5_Insync, &dev->flags) && in need_this_block()
3574 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in need_this_block()
3584 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3585 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3609 !test_bit(R5_UPTODATE, &fdev[i]->flags) && in need_this_block()
3610 !test_bit(R5_OVERWRITE, &fdev[i]->flags)) in need_this_block()
3633 BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); in fetch_block()
3634 BUG_ON(test_bit(R5_Wantread, &dev->flags)); in fetch_block()
3677 if (!test_bit(R5_UPTODATE, in fetch_block()
3694 } else if (test_bit(R5_Insync, &dev->flags)) { in fetch_block()
3719 if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && in handle_stripe_fill()
3730 if (test_bit(STRIPE_R5C_CACHING, &sh->state)) in handle_stripe_fill()
3762 if (!test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_clean_event()
3763 (test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_clean_event()
3764 test_bit(R5_Discard, &dev->flags) || in handle_stripe_clean_event()
3765 test_bit(R5_SkipCopy, &dev->flags))) { in handle_stripe_clean_event()
3772 WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); in handle_stripe_clean_event()
3789 !test_bit(STRIPE_DEGRADED, &sh->state), in handle_stripe_clean_event()
3802 } else if (test_bit(R5_Discard, &dev->flags)) in handle_stripe_clean_event()
3809 test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_clean_event()
3837 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) in handle_stripe_clean_event()
3860 return (test_bit(R5_UPTODATE, &dev->flags)) && in uptodate_for_rmw()
3861 (!test_bit(R5_InJournal, &dev->flags) || in uptodate_for_rmw()
3862 test_bit(R5_OrigPageUPTDODATE, &dev->flags)); in uptodate_for_rmw()
3895 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
3896 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3898 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
3899 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
3905 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
3907 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3908 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
3909 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
3910 if (test_bit(R5_Insync, &dev->flags)) in handle_stripe_dirtying()
3928 if (test_bit(R5_InJournal, &dev->flags) && in handle_stripe_dirtying()
3930 !test_bit(R5_LOCKED, &sh->dev[sh->pd_idx].flags)) { in handle_stripe_dirtying()
3960 test_bit(R5_InJournal, &dev->flags)) && in handle_stripe_dirtying()
3961 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3963 test_bit(R5_Wantcompute, &dev->flags)) && in handle_stripe_dirtying()
3964 test_bit(R5_Insync, &dev->flags)) { in handle_stripe_dirtying()
3965 if (test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
3985 if (!test_bit(R5_OVERWRITE, &dev->flags) && in handle_stripe_dirtying()
3987 !test_bit(R5_LOCKED, &dev->flags) && in handle_stripe_dirtying()
3988 !(test_bit(R5_UPTODATE, &dev->flags) || in handle_stripe_dirtying()
3989 test_bit(R5_Wantcompute, &dev->flags))) { in handle_stripe_dirtying()
3991 if (test_bit(R5_Insync, &dev->flags) && in handle_stripe_dirtying()
3992 test_bit(STRIPE_PREREAD_ACTIVE, in handle_stripe_dirtying()
4009 rcw, qread, test_bit(STRIPE_DELAYED, &sh->state)); in handle_stripe_dirtying()
4013 !test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) in handle_stripe_dirtying()
4026 if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && in handle_stripe_dirtying()
4028 !test_bit(STRIPE_BIT_DELAY, &sh->state))) in handle_stripe_dirtying()
4060 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks5()
4064 BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); in handle_parity_checks5()
4096 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks5()
4189 if (test_bit(STRIPE_INSYNC, &sh->state)) in handle_parity_checks6()
4220 if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags), in handle_parity_checks6()
4261 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { in handle_parity_checks6()
4329 if (!test_bit(STRIPE_EXPANDING, &sh2->state) || in handle_stripe_expansion()
4330 test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { in handle_stripe_expansion()
4347 !test_bit(R5_Expanded, &sh2->dev[j].flags)) in handle_stripe_expansion()
4384 s->expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state) && !sh->batch_head; in analyse_stripe()
4385 s->expanded = test_bit(STRIPE_EXPAND_READY, &sh->state) && !sh->batch_head; in analyse_stripe()
4408 if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && in analyse_stripe()
4409 !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) in analyse_stripe()
4413 if (test_bit(R5_LOCKED, &dev->flags)) in analyse_stripe()
4415 if (test_bit(R5_UPTODATE, &dev->flags)) in analyse_stripe()
4417 if (test_bit(R5_Wantcompute, &dev->flags)) { in analyse_stripe()
4422 if (test_bit(R5_Wantfill, &dev->flags)) in analyse_stripe()
4428 if (!test_bit(R5_OVERWRITE, &dev->flags)) in analyse_stripe()
4437 if (rdev && !test_bit(Faulty, &rdev->flags) && in analyse_stripe()
4443 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4450 if (rdev && test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4456 && (test_bit(Blocked, &rdev->flags) in analyse_stripe()
4470 if (!test_bit(WriteErrorSeen, &rdev->flags) && in analyse_stripe()
4471 test_bit(R5_UPTODATE, &dev->flags)) { in analyse_stripe()
4478 } else if (test_bit(In_sync, &rdev->flags)) in analyse_stripe()
4483 else if (test_bit(R5_UPTODATE, &dev->flags) && in analyse_stripe()
4484 test_bit(R5_Expanded, &dev->flags)) in analyse_stripe()
4491 if (test_bit(R5_WriteError, &dev->flags)) { in analyse_stripe()
4498 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4504 if (test_bit(R5_MadeGood, &dev->flags)) { in analyse_stripe()
4509 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4515 if (test_bit(R5_MadeGoodRepl, &dev->flags)) { in analyse_stripe()
4518 if (rdev2 && !test_bit(Faulty, &rdev2->flags)) { in analyse_stripe()
4524 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4529 if (test_bit(R5_ReadError, &dev->flags)) in analyse_stripe()
4531 if (!test_bit(R5_Insync, &dev->flags)) { in analyse_stripe()
4535 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4540 if (rdev && !test_bit(Faulty, &rdev->flags)) in analyse_stripe()
4545 if (test_bit(R5_InJournal, &dev->flags)) in analyse_stripe()
4547 if (test_bit(R5_InJournal, &dev->flags) && dev->written) in analyse_stripe()
4550 if (test_bit(STRIPE_SYNCING, &sh->state)) { in analyse_stripe()
4561 test_bit(MD_RECOVERY_REQUESTED, &(conf->mddev->recovery))) in analyse_stripe()
4693 if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state) && !sh->batch_head) { in handle_stripe()
4699 if (!test_bit(STRIPE_R5C_PARTIAL_STRIPE, &sh->state) && in handle_stripe()
4700 !test_bit(STRIPE_R5C_FULL_STRIPE, &sh->state) && in handle_stripe()
4701 !test_bit(STRIPE_DISCARD, &sh->state) && in handle_stripe()
4719 if (test_bit(STRIPE_LOG_TRAPPED, &sh->state)) in handle_stripe()
4723 test_bit(MD_SB_CHANGE_PENDING, &conf->mddev->sb_flags)) { in handle_stripe()
4739 if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { in handle_stripe()
4779 BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags) && in handle_stripe()
4780 !test_bit(R5_Discard, &sh->dev[sh->pd_idx].flags)); in handle_stripe()
4782 !test_bit(R5_UPTODATE, &sh->dev[sh->qd_idx].flags) && in handle_stripe()
4783 !test_bit(R5_Discard, &sh->dev[sh->qd_idx].flags)); in handle_stripe()
4786 if (test_bit(R5_LOCKED, &dev->flags) && in handle_stripe()
4788 dev->written || test_bit(R5_InJournal, in handle_stripe()
4796 if (!test_bit(R5_Insync, &dev->flags) || in handle_stripe()
4819 (s.p_failed || ((test_bit(R5_Insync, &pdev->flags) in handle_stripe()
4820 && !test_bit(R5_LOCKED, &pdev->flags) in handle_stripe()
4821 && (test_bit(R5_UPTODATE, &pdev->flags) || in handle_stripe()
4822 test_bit(R5_Discard, &pdev->flags))))) && in handle_stripe()
4823 (s.q_failed || ((test_bit(R5_Insync, &qdev->flags) in handle_stripe()
4824 && !test_bit(R5_LOCKED, &qdev->flags) in handle_stripe()
4825 && (test_bit(R5_UPTODATE, &qdev->flags) || in handle_stripe()
4826 test_bit(R5_Discard, &qdev->flags)))))) in handle_stripe()
4880 (!test_bit(STRIPE_R5C_CACHING, &sh->state) && in handle_stripe()
4897 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
4898 !test_bit(STRIPE_INSYNC, &sh->state))) { in handle_stripe()
4906 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) in handle_stripe()
4907 && !test_bit(STRIPE_REPLACED, &sh->state)) { in handle_stripe()
4910 if (test_bit(R5_NeedReplace, &sh->dev[i].flags)) { in handle_stripe()
4911 WARN_ON(!test_bit(R5_UPTODATE, &sh->dev[i].flags)); in handle_stripe()
4921 !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && in handle_stripe()
4922 test_bit(STRIPE_INSYNC, &sh->state)) { in handle_stripe()
4935 if (test_bit(R5_ReadError, &dev->flags) in handle_stripe()
4936 && !test_bit(R5_LOCKED, &dev->flags) in handle_stripe()
4937 && test_bit(R5_UPTODATE, &dev->flags) in handle_stripe()
4939 if (!test_bit(R5_ReWrite, &dev->flags)) { in handle_stripe()
4957 if (sh_src && test_bit(STRIPE_EXPAND_SOURCE, &sh_src->state)) { in handle_stripe()
4981 if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && in handle_stripe()
4995 !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) in handle_stripe()
5103 if (test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) in raid5_congested()
5107 if (test_bit(R5C_LOG_TIGHT, &conf->cache_state)) in raid5_congested()
5238 if (!rdev || test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5242 (test_bit(Faulty, &rdev->flags) || in raid5_read_one_chunk()
5243 !(test_bit(In_sync, &rdev->flags) || in raid5_read_one_chunk()
5332 bool try_loprio = test_bit(R5C_LOG_TIGHT, &conf->cache_state) || in __get_priority_stripe()
5367 else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { in __get_priority_stripe()
5524 if (test_bit(STRIPE_SYNCING, &sh->state)) { in make_discard_request()
5711 if (test_bit(STRIPE_EXPANDING, &sh->state) || in raid5_make_request()
5884 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
5893 !test_bit(Journal, &rdev->flags) && in reshape_request()
5894 !test_bit(In_sync, &rdev->flags) && in reshape_request()
5902 test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
5903 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
5991 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6000 !test_bit(Journal, &rdev->flags) && in reshape_request()
6001 !test_bit(In_sync, &rdev->flags) && in reshape_request()
6008 !test_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags) in reshape_request()
6009 || test_bit(MD_RECOVERY_INTR, &mddev->recovery)); in reshape_request()
6010 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) in reshape_request()
6035 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { in raid5_sync_request()
6053 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) in raid5_sync_request()
6067 test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { in raid5_sync_request()
6072 if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && in raid5_sync_request()
6100 if (rdev == NULL || test_bit(Faulty, &rdev->flags)) in raid5_sync_request()
6256 !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags), in raid5_do_work()
6956 if (test_bit(Journal, &rdev->flags)) in setup_conf()
7026 || raid_disk < 0 || test_bit(Journal, &rdev->flags)) in setup_conf()
7030 if (test_bit(Replacement, &rdev->flags)) { in setup_conf()
7040 if (test_bit(In_sync, &rdev->flags)) { in setup_conf()
7171 if (test_bit(Journal, &rdev->flags)) { in raid5_run()
7189 if ((test_bit(MD_HAS_JOURNAL, &mddev->flags) || journal_dev) && in raid5_run()
7283 if (test_bit(MD_HAS_JOURNAL, &mddev->flags) && in raid5_run()
7284 test_bit(MD_HAS_PPL, &mddev->flags)) { in raid5_run()
7299 if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) { in raid5_run()
7332 if (test_bit(In_sync, &rdev->flags)) { in raid5_run()
7382 if (test_bit(MD_HAS_PPL, &mddev->flags)) in raid5_run()
7522 seq_printf (seq, "%s", rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); in raid5_status()
7547 i, !test_bit(Faulty, &tmp->rdev->flags), in print_raid5_conf()
7564 && !test_bit(Faulty, &tmp->replacement->flags) in raid5_spare_active()
7582 && !test_bit(Faulty, &tmp->rdev->flags) in raid5_spare_active()
7604 if (test_bit(Journal, &rdev->flags) && conf->log) { in raid5_remove_disk()
7630 if (test_bit(In_sync, &rdev->flags) || in raid5_remove_disk()
7638 if (!test_bit(Faulty, &rdev->flags) && in raid5_remove_disk()
7647 if (!test_bit(RemoveSynchronized, &rdev->flags)) { in raid5_remove_disk()
7689 if (test_bit(Journal, &rdev->flags)) { in raid5_add_disk()
7743 if (test_bit(WantReplacement, &p->rdev->flags) && in raid5_add_disk()
7869 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in raid5_start_reshape()
7879 if (!test_bit(In_sync, &rdev->flags) in raid5_start_reshape()
7880 && !test_bit(Faulty, &rdev->flags)) in raid5_start_reshape()
7940 !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
7952 && !test_bit(Faulty, &rdev->flags)) { in raid5_start_reshape()
8006 if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { in end_reshape()
8017 !test_bit(Journal, &rdev->flags) && in end_reshape()
8018 !test_bit(In_sync, &rdev->flags)) in end_reshape()
8043 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { in raid5_finish_reshape()
8371 } else if (test_bit(MD_HAS_JOURNAL, &conf->mddev->flags) && in raid5_change_consistency_policy()
8377 if (test_bit(Journal, &rdev->flags)) { in raid5_change_consistency_policy()