From 9b6d3fca4289bbb8fa067f65e18c348495dc942c Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 9 Jun 2022 16:32:26 +0000 Subject: [PATCH] submit_io(): fix "nvme compare" to pass correct command Since "18de3a6d Convert to libnvme", an "nvme compare" was being converted incorrectly into an "nvme write" in submit_io(). Signed-off-by: John Levon --- nvme.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvme.c b/nvme.c index 217a8e00..38c865bf 100644 --- a/nvme.c +++ b/nvme.c @@ -6602,7 +6602,9 @@ static int submit_io(int opcode, char *command, const char *desc, .result = NULL, }; gettimeofday(&start_time, NULL); - if (opcode & 1) + if (opcode == nvme_cmd_compare) + err = nvme_compare(&args); + else if (opcode & 1) err = nvme_write(&args); else err = nvme_read(&args); -- 2.50.1