diff options
Diffstat (limited to 'block/mirror.c')
-rw-r--r-- | block/mirror.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/mirror.c b/block/mirror.c index b1e633ecad..617bb18f4e 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -303,8 +303,9 @@ static void mirror_do_zero_or_discard(MirrorBlockJob *s, s->in_flight++; s->sectors_in_flight += nb_sectors; if (is_discard) { - blk_aio_discard(s->target, sector_num, op->nb_sectors, - mirror_write_complete, op); + blk_aio_pdiscard(s->target, sector_num << BDRV_SECTOR_BITS, + op->nb_sectors << BDRV_SECTOR_BITS, + mirror_write_complete, op); } else { blk_aio_pwrite_zeroes(s->target, sector_num * BDRV_SECTOR_SIZE, op->nb_sectors * BDRV_SECTOR_SIZE, |