[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 3/5] vhost-user-blk: make it possible to disable write-zer
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v1 3/5] vhost-user-blk: make it possible to disable write-zeroes/discard |
Date: |
Wed, 24 Aug 2022 14:00:14 -0400 |
On Wed, Aug 24, 2022 at 12:18:35PM +0300, Daniil Tatianin wrote:
> diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
> index 9117222456..e89164c358 100644
> --- a/hw/block/vhost-user-blk.c
> +++ b/hw/block/vhost-user-blk.c
> @@ -251,6 +251,8 @@ static uint64_t vhost_user_blk_get_features(VirtIODevice
> *vdev,
> {
> VHostUserBlk *s = VHOST_USER_BLK(vdev);
>
> + features |= s->host_features;
I think you can eliminate this if you use vdev->host_features in the
qdev properties instead of adding a separate s->host_features field.
That will simplify the code.
signature.asc
Description: PGP signature