diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2021-02-22 20:29:47 +0100 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-03-09 11:00:57 +0100 |
commit | be5a1c27a3a5576323e910549071be635645aef1 (patch) | |
tree | 33eceb6fe10b8b94b31e93c51f08b5bb9301954b /hw/block/nvme.c | |
parent | 5b8bb923ccf749d500593d6f1f0a210062285532 (diff) | |
download | qemu-be5a1c27a3a5576323e910549071be635645aef1.zip qemu-be5a1c27a3a5576323e910549071be635645aef1.tar.gz qemu-be5a1c27a3a5576323e910549071be635645aef1.tar.bz2 |
hw/block/nvme: deduplicate bad mdts trace event
If mdts is exceeded, trace it from a single place.
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'hw/block/nvme.c')
-rw-r--r-- | hw/block/nvme.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 6921b19..b7ec9dc 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1084,6 +1084,7 @@ static inline uint16_t nvme_check_mdts(NvmeCtrl *n, size_t len) uint8_t mdts = n->params.mdts; if (mdts && len > n->page_size << mdts) { + trace_pci_nvme_err_mdts(len); return NVME_INVALID_FIELD | NVME_DNR; } @@ -1954,7 +1955,6 @@ static uint16_t nvme_compare(NvmeCtrl *n, NvmeRequest *req) status = nvme_check_mdts(n, len); if (status) { - trace_pci_nvme_err_mdts(nvme_cid(req), len); return status; } @@ -2057,7 +2057,6 @@ static uint16_t nvme_read(NvmeCtrl *n, NvmeRequest *req) status = nvme_check_mdts(n, data_size); if (status) { - trace_pci_nvme_err_mdts(nvme_cid(req), data_size); goto invalid; } @@ -2125,7 +2124,6 @@ static uint16_t nvme_do_write(NvmeCtrl *n, NvmeRequest *req, bool append, if (!wrz) { status = nvme_check_mdts(n, data_size); if (status) { - trace_pci_nvme_err_mdts(nvme_cid(req), data_size); goto invalid; } } @@ -2619,7 +2617,6 @@ static uint16_t nvme_zone_mgmt_recv(NvmeCtrl *n, NvmeRequest *req) status = nvme_check_mdts(n, data_size); if (status) { - trace_pci_nvme_err_mdts(nvme_cid(req), data_size); return status; } @@ -3061,7 +3058,6 @@ static uint16_t nvme_get_log(NvmeCtrl *n, NvmeRequest *req) status = nvme_check_mdts(n, len); if (status) { - trace_pci_nvme_err_mdts(nvme_cid(req), len); return status; } |