md/raid5: remove an incorect assert in in_chunk_boundary
Subsystems (2)
PATCH 1/1 md/raid5: remove an incorect assert in in_chunk_boundary
Now that the original bdev is stored in the bio this assert is incorrect and will trigge for any partitioned raid5 device.
--- drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-)
drivers/md/raid5.c +0 -2
@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)unsigned int chunk_sectors;unsigned int bio_sectors =bio_sectors (bio); -WARN_ON_ONCE (bio->bi_bdev->bd_partno); - chunk_sectors =min (conf->chunk_sectors, conf->prev_chunk_sectors);return chunk_sectors >= ((sector & (chunk_sectors -1 )) + bio_sectors);
Signature · 1 line
2.30.2
s/incorect/incorrect/ in the subject, sorry.
Quoted 26 lines · Christoph Hellwig
Now that the original bdev is stored in the bio this assert is incorrect and will trigge for any partitioned raid5 device.
Reported-by Florian D. <[email protected]>Fixes 309dca309fc3 ("block: store a block_device pointer in struct bio"),Signed-off-by Christoph Hellwig <[email protected]>--- drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-)drivers/md/raid5.c +0
-2@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)unsigned int chunk_sectors;unsigned int bio_sectors =bio_sectors (bio); -WARN_ON_ONCE (bio->bi_bdev->bd_partno); - chunk_sectors =min (conf->chunk_sectors, conf->prev_chunk_sectors);return chunk_sectors >= ((sector & (chunk_sectors -1 )) + bio_sectors);Signature · 1 line
2.30.2
---end quoted text---
Guoqing Jiang
Reviewed-byQuoted 5 lines · Christoph Hellwig
s/incorect/incorrect/ in the subject, sorry.
Quoted 2 lines · Christoph Hellwig
Now that the original bdev is stored in the bio this assert is incorrect and will trigge for any partitioned raid5 device.
Maybe s/trigge/trigger/? Anyway
Thanks,
Guoqing
Quoted 29 lines
Christoph Hellwig <[email protected]> hat am 19.05.2021 08:22 geschrieben:
Now that the original bdev is stored in the bio this assert is incorrect and will trigge for any partitioned raid5 device.
Reported-by Florian D. <[email protected]>Fixes 309dca309fc3 ("block: store a block_device pointer in struct bio"),Signed-off-by Christoph Hellwig <[email protected]>--- drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-)drivers/md/raid5.c +0
-2@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)unsigned int chunk_sectors;unsigned int bio_sectors =bio_sectors (bio); -WARN_ON_ONCE (bio->bi_bdev->bd_partno); - chunk_sectors =min (conf->chunk_sectors, conf->prev_chunk_sectors);return chunk_sectors >= ((sector & (chunk_sectors -1 )) + bio_sectors);Signature · 1 line
2.30.2
yes, this solves it, I can confirm with this patch the error/warning message when booting linux-5.12 is gone!
Thanks a lot!
Florian
Quoted 23 lines · On Wed, May 19, 2021 at 4:36 AM wp1083705-spam02 wp1083705-spam02…
Quoted 23 lines
Christoph Hellwig <[email protected]> hat am 19.05.2021 08:22 geschrieben:
Now that the original bdev is stored in the bio this assert is incorrect and will trigge for any partitioned raid5 device.
Reported-by Florian D. <[email protected]>Fixes 309dca309fc3 ("block: store a block_device pointer in struct bio"),Signed-off-by Christoph Hellwig <[email protected]>--- drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-)drivers/md/raid5.c +0
-0@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)unsigned int chunk_sectors;unsigned int bio_sectors =bio_sectors (bio);
Quoted 9 lines
Quoted 7 lines
drivers/md/raid5.c +0
-3-WARN_ON_ONCE (bio->bi_bdev->bd_partno); - chunk_sectors =min (conf->chunk_sectors, conf->prev_chunk_sectors);return chunk_sectors >= ((sector & (chunk_sectors -1 )) + bio_sectors); --2.30.2
yes, this solves it, I can confirm with this patch the error/warning message when booting linux-5.12 is gone!
Applied to md-fixes. Thanks all.
@ Florian, would you like to update the Reported-by tag (with your full name and/or
different email)?
Thanks,
Song
As you like... if it's better in the 'tested by:' line, you can also take my full name: Florian Dazinger.
I use the e- mail address regularly, so that's ok.
Thanks for the quick patch!
Florian
Quoted 48 lines · Song Liu
Quoted 6 lines · On Wed, May 19, 2021 at 4:36 AM wp1083705-spam02 wp1083705-spam02…
Quoted 6 lines
Christoph Hellwig <[email protected]> hat am 19.05.2021 08:22 geschrieben:
Now that the original bdev is stored in the bio this assert is
incorrect
Quoted 4 lines
Quoted 4 lines
and will trigge for any partitioned raid5 device.
Reported-by Florian D. <[email protected]>Fixes 309dca309fc3 ("block: store a block_device pointer in structbio"),
Quoted 10 lines
drivers/md/raid5.c static int in_chunk_boundary(struct mddev
Quoted 10 lines
Signed-off-by Christoph Hellwig <[email protected]>--- drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-)drivers/md/raid5.c +0
-0@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev*mddev, struct bio *bio)
Quoted 6 lines
drivers/md/raid5.c static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)
Quoted 6 lines
drivers/md/raid5.c +0
-2unsigned int chunk_sectors;unsigned int bio_sectors =bio_sectors (bio); -WARN_ON_ONCE (bio->bi_bdev->bd_partno); - chunk_sectors = min(conf->chunk_sectors,
conf->prev_chunk_sectors);Quoted 6 lines
Quoted 4 lines
drivers/md/raid5.c +0
-1return chunk_sectors >= ((sector & (chunk_sectors -1 )) + bio_sectors); --2.30.2
yes, this solves it, I can confirm with this patch the error/warning
message when booting linux-5.12 is gone!
Applied to md-fixes. Thanks all.
@ Florian, would you like to update the Reported-by tag (with your full name and/or
different email)?Thanks,
Song
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Song Liu
maintainerQuoted 4 lines · Florian D.
As you like... if it's better in the 'tested by:' line, you can also take my full name: Florian Dazinger.
I use the e- mail address regularly, so that's ok.
Added both Reported-by and Tested-by with your full name.
Thanks,
Song