diff --git a/block/qcow2.c b/block/qcow2.c index 91ef4dfefc75da7acb26974e61cb873226b9cf5b..497df0f639c8b6594da94655143615f331ef682a 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1204,6 +1204,7 @@ static void qcow2_refresh_limits(BlockDriverState *bs, Error **errp) bs->bl.request_alignment = BDRV_SECTOR_SIZE; } bs->bl.pwrite_zeroes_alignment = s->cluster_size; + bs->bl.pdiscard_alignment = s->cluster_size; } static int qcow2_set_key(BlockDriverState *bs, const char *key)