diff options
author | Minwoo Im | 2021-01-17 15:53:32 +0100 |
---|---|---|
committer | Klaus Jensen | 2021-02-08 21:15:53 +0100 |
commit | aa5e55e3b07ede87a8fd7aa3e67583dfc464dd52 (patch) | |
tree | cba8d40eb1cdd430e41e3283fb86c002f8e054fc /hw/block/nvme-ns.c | |
parent | hw/block/nvme: remove unused argument in nvme_ns_init_zoned (diff) | |
download | qemu-aa5e55e3b07ede87a8fd7aa3e67583dfc464dd52.tar.gz qemu-aa5e55e3b07ede87a8fd7aa3e67583dfc464dd52.tar.xz qemu-aa5e55e3b07ede87a8fd7aa3e67583dfc464dd52.zip |
hw/block/nvme: open code for volatile write cache
Volatile Write Cache(VWC) feature is set in nvme_ns_setup() in the
initial time. This feature is related to block device backed, but this
feature is controlled in controller level via Set/Get Features command.
This patch removed dependency between nvme and nvme-ns to manage the VWC
flag value. Also, it open coded the Get Features for VWC to check all
namespaces attached to the controller, and if false detected, return
directly false.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
[k.jensen: report write cache preset if present on ANY namespace]
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/block/nvme-ns.c')
-rw-r--r-- | hw/block/nvme-ns.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index d35c2925ec..7a5a779837 100644 --- a/hw/block/nvme-ns.c +++ b/hw/block/nvme-ns.c @@ -90,10 +90,6 @@ static int nvme_ns_init_blk(NvmeCtrl *n, NvmeNamespace *ns, Error **errp) return -1; } - if (blk_enable_write_cache(ns->blkconf.blk)) { - n->features.vwc = 0x1; - } - return 0; } |