@@ -672,20 +672,23 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
672672 * (conf -> hash_locks + hash ));
673673 sh = __find_stripe (conf , sector , conf -> generation - previous );
674674 if (!sh ) {
675- if (!conf -> inactive_blocked )
675+ if (!test_bit ( R5_INACTIVE_BLOCKED , & conf -> cache_state ) )
676676 sh = get_free_stripe (conf , hash );
677677 if (noblock && sh == NULL )
678678 break ;
679679 if (!sh ) {
680- conf -> inactive_blocked = 1 ;
680+ set_bit (R5_INACTIVE_BLOCKED ,
681+ & conf -> cache_state );
681682 wait_event_lock_irq (
682683 conf -> wait_for_stripe ,
683684 !list_empty (conf -> inactive_list + hash ) &&
684685 (atomic_read (& conf -> active_stripes )
685686 < (conf -> max_nr_stripes * 3 / 4 )
686- || !conf -> inactive_blocked ),
687+ || !test_bit (R5_INACTIVE_BLOCKED ,
688+ & conf -> cache_state )),
687689 * (conf -> hash_locks + hash ));
688- conf -> inactive_blocked = 0 ;
690+ clear_bit (R5_INACTIVE_BLOCKED ,
691+ & conf -> cache_state );
689692 } else {
690693 init_stripe (sh , sector , previous );
691694 atomic_inc (& sh -> count );
@@ -4602,7 +4605,7 @@ static int raid5_congested(struct mddev *mddev, int bits)
46024605 * how busy the stripe_cache is
46034606 */
46044607
4605- if (conf -> inactive_blocked )
4608+ if (test_bit ( R5_INACTIVE_BLOCKED , & conf -> cache_state ) )
46064609 return 1 ;
46074610 if (conf -> quiesce )
46084611 return 1 ;
0 commit comments