On Wed, Jan 17, 2024 at 10:22 AM Mikulas Patocka <mpatocka@xxxxxxxxxx> wrote: > [...] > Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx> > Fixes: c467e97f079f ("md/raid6: use valid sector values to determine if an I/O should wait on the reshape") > Cc: stable@xxxxxxxxxxxxxxx # v6.1+ > > --- > drivers/md/raid5.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux-2.6/drivers/md/raid5.c > =================================================================== > --- linux-2.6.orig/drivers/md/raid5.c > +++ linux-2.6/drivers/md/raid5.c > @@ -5851,7 +5851,7 @@ static bool stripe_ahead_of_reshape(stru > continue; > > min_sector = min(min_sector, sh->dev[dd_idx].sector); > - max_sector = max(max_sector, sh->dev[dd_idx].sector); > + max_sector = min(max_sector, sh->dev[dd_idx].sector); This looks wrong. max_sector was initialized to 0, so min(max_sector, sh->dev[dd_idx].sector) will always be 0. Did I miss/misread something here? Thanks, Song > } > > spin_lock_irq(&conf->device_lock); >