[PATCH] virtio-blk: change default config-wce to false

Tom Yan posted 1 patch 4 years, 11 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201214165111.5653-1-tom.ty89@gmail.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
hw/block/virtio-blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] virtio-blk: change default config-wce to false
Posted by Tom Yan 4 years, 11 months ago
This would allow `cache=` to be respected when `if=virtio` is used
(instead of `-device virtio-blk-pci`). Since `cache=writeback` is
the default, this does not cause a change in the default behavior.

Also, when `config-wce` is true, `cache.writeback` is still overriden.

Signed-off-by: Tom Yan <tom.ty89@gmail.com>
---
 hw/block/virtio-blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index bac2d6fa2b..0c2ecd22bc 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -1284,7 +1284,7 @@ static Property virtio_blk_properties[] = {
     DEFINE_BLOCK_CHS_PROPERTIES(VirtIOBlock, conf.conf),
     DEFINE_PROP_STRING("serial", VirtIOBlock, conf.serial),
     DEFINE_PROP_BIT64("config-wce", VirtIOBlock, host_features,
-                      VIRTIO_BLK_F_CONFIG_WCE, true),
+                      VIRTIO_BLK_F_CONFIG_WCE, false),
 #ifdef __linux__
     DEFINE_PROP_BIT64("scsi", VirtIOBlock, host_features,
                       VIRTIO_BLK_F_SCSI, false),
-- 
2.29.2