summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2017-01-25 00:07:00 +0100
committerJens Axboe <axboe@fb.com>2017-01-31 16:34:47 +0100
commit7bf7d778620d83f14fcd92d0938fb97c7d78bf19 (patch)
treec7f814bb86c432dfe82563b5e40d552aa5796552 /drivers/nvme
parentlightnvm: allow targets to use sysfs (diff)
downloadlinux-7bf7d778620d83f14fcd92d0938fb97c7d78bf19.tar.xz
linux-7bf7d778620d83f14fcd92d0938fb97c7d78bf19.zip
nvme/pci: Don't mark IOD as aborted if abort wasn't sent
This patch sets the aborted flag only if an abort was sent, reducing excessive kernel message spamming for completed IO that wasn't actually aborted. Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e1b4e603b1cf..06875bc1ba80 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -898,12 +898,11 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
return BLK_EH_HANDLED;
}
- iod->aborted = 1;
-
if (atomic_dec_return(&dev->ctrl.abort_limit) < 0) {
atomic_inc(&dev->ctrl.abort_limit);
return BLK_EH_RESET_TIMER;
}
+ iod->aborted = 1;
memset(&cmd, 0, sizeof(cmd));
cmd.abort.opcode = nvme_admin_abort_cmd;