Skip to content

Commit

Permalink
md/raid5: remove an incorrect assert in in_chunk_boundary
Browse files Browse the repository at this point in the history
Now that the original bdev is stored in the bio this assert is incorrect
and will trigger for any partitioned raid5 device.

Reported-by: Florian Dazinger <[email protected]>
Tested-by: Florian Dazinger <[email protected]>
Cc: [email protected] # 5.12
Fixes: 309dca3 ("block: store a block_device pointer in struct bio"),
Reviewed-by:  Guoqing Jiang <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Song Liu <[email protected]>
  • Loading branch information
Christoph Hellwig authored and liu-song-6 committed May 26, 2021
1 parent bc6a385 commit cc14626
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc14626

Please sign in to comment.