diff options
author | Gollu Appalanaidu | 2021-01-24 16:54:40 +0100 |
---|---|---|
committer | Klaus Jensen | 2021-02-08 21:15:54 +0100 |
commit | 56990c777a635ded6e2f191c470ca6410cf5c11a (patch) | |
tree | a78b1ca09dba048e9e43e746d58a0af04f810f74 /hw/block | |
parent | hw/block/nvme: error if drive less than a zone size (diff) | |
download | qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.tar.gz qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.tar.xz qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.zip |
hw/block/nvme: fix set feature for error recovery
Only enable DULBE if the namespace supports it.
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/block')
-rw-r--r-- | hw/block/nvme.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 40784bd908..b3d072c8b2 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -3396,7 +3396,9 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req) } assert(ns); - ns->features.err_rec = dw11; + if (NVME_ID_NS_NSFEAT_DULBE(ns->id_ns.nsfeat)) { + ns->features.err_rec = dw11; + } break; case NVME_VOLATILE_WRITE_CACHE: for (i = 1; i <= n->num_namespaces; i++) { |