Re: WARNING in break_stripe_batch_list with "stripe state: 2001"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guoqing,

Sorry for the delay.

On Mon, Aug 26, 2019 at 6:46 AM Guoqing Jiang
<guoqing.jiang@xxxxxxxxxxxxxxx> wrote:
>
[...]
> >
> > Maybe it makes sense to remove the checking of STRIPE_ACTIVE just like
> > commit 550da24f8d62f
> > ("md/raid5: preserve STRIPE_PREREAD_ACTIVE in break_stripe_batch_list").
> >
> > @@ -4606,8 +4607,7 @@ static void break_stripe_batch_list(struct
> > stripe_head *head_sh,
> >
> >                 list_del_init(&sh->batch_list);
> >
> > -               WARN_ONCE(sh->state & ((1 << STRIPE_ACTIVE) |
> > -                                         (1 << STRIPE_SYNCING) |
> > +               WARN_ONCE(sh->state & ((1 << STRIPE_SYNCING) |
> >                                           (1 << STRIPE_REPLACED) |
> >                                           (1 << STRIPE_DELAYED) |
> >                                           (1 << STRIPE_BIT_DELAY) |

This part looks good to me.

> > @@ -4626,6 +4626,7 @@ static void break_stripe_batch_list(struct
> > stripe_head *head_sh,
> >
> >                 set_mask_bits(&sh->state, ~(STRIPE_EXPAND_SYNC_FLAGS |
> >                                             (1 <<
> > STRIPE_PREREAD_ACTIVE) |
> > +                                           (1 << STRIPE_ACTIVE) |
> >                                             (1 << STRIPE_DEGRADED) |
> >                                             (1 <<
> > STRIPE_ON_UNPLUG_LIST)),
> >                               head_sh->state & (1 << STRIPE_INSYNC));
> >

But I think we should not clear STRIPE_ACTIVE here. It should be
cleared at the end of handle_stripe().

Does this make sense?

Thanks,
Song



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux