summaryrefslogtreecommitdiffstats
path: root/hw/block
diff options
context:
space:
mode:
authorKlaus Jensen2021-02-04 21:58:51 +0100
committerKlaus Jensen2021-03-09 11:00:57 +0100
commitd90ba23a846f8c9cd8d238e8391e6be5881cddb4 (patch)
tree5ce6ac70cec2ba64d006fe27ac3e67fc2e99a5ea /hw/block
parenthw/block/nvme: remove redundant len member in compare context (diff)
downloadqemu-d90ba23a846f8c9cd8d238e8391e6be5881cddb4.tar.gz
qemu-d90ba23a846f8c9cd8d238e8391e6be5881cddb4.tar.xz
qemu-d90ba23a846f8c9cd8d238e8391e6be5881cddb4.zip
hw/block/nvme: remove block accounting for write zeroes
A Write Zeroes commands should not be counted in either the 'Data Units Written' or in 'Host Write Commands' SMART/Health Information Log page. Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> Reviewed-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/nvme.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index fcdd6b7cb9..88e8008985 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -2181,7 +2181,6 @@ static uint16_t nvme_do_write(NvmeCtrl *n, NvmeRequest *req, bool append,
nvme_rw_cb, req);
}
} else {
- block_acct_start(blk_get_stats(blk), &req->acct, 0, BLOCK_ACCT_WRITE);
req->aiocb = blk_aio_pwrite_zeroes(blk, data_offset, data_size,
BDRV_REQ_MAY_UNMAP, nvme_rw_cb,
req);