diff options
| author | Ming Lei <[email protected]> | 2024-03-11 17:42:55 +0000 |
|---|---|---|
| committer | Mike Snitzer <[email protected]> | 2024-03-12 13:27:42 +0000 |
| commit | b25b8f4b8ecef0f48c05f0c3572daeabefe16526 (patch) | |
| tree | f8a63cb2a0187845a855bcab9a8528dd3f2697a7 | |
| parent | dm-integrity: set max_integrity_segments in dm_integrity_io_hints (diff) | |
| download | kernel-b25b8f4b8ecef0f48c05f0c3572daeabefe16526.tar.gz kernel-b25b8f4b8ecef0f48c05f0c3572daeabefe16526.zip | |
dm raid: fix false positive for requeue needed during reshape
An empty flush doesn't have a payload, so it should never be looked at
when considering to possibly requeue a bio for the case when a reshape
is in progress.
Fixes: 9dbd1aa3a81c ("dm raid: add reshaping support to the target")
Reported-by: Patrick Plenefisch <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
| -rw-r--r-- | drivers/md/dm-raid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 6bb1765be1e5..b3c8920fe723 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -3329,14 +3329,14 @@ static int raid_map(struct dm_target *ti, struct bio *bio) struct mddev *mddev = &rs->md; /* - * If we're reshaping to add disk(s)), ti->len and + * If we're reshaping to add disk(s), ti->len and * mddev->array_sectors will differ during the process * (ti->len > mddev->array_sectors), so we have to requeue * bios with addresses > mddev->array_sectors here or * there will occur accesses past EOD of the component * data images thus erroring the raid set. */ - if (unlikely(bio_end_sector(bio) > mddev->array_sectors)) + if (unlikely(bio_has_data(bio) && bio_end_sector(bio) > mddev->array_sectors)) return DM_MAPIO_REQUEUE; md_handle_request(mddev, bio); |
