All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk, keith.busch@intel.com
Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, Ming Lin <ming.l@samsung.com>,
	Sagi Grimberg <sagi@grimberg.me>
Subject: [PATCH 09/10] nvme: update nvme_cancel_io() a bit
Date: Mon,  6 Jun 2016 23:20:51 +0200	[thread overview]
Message-ID: <1465248052-17811-10-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1465248052-17811-1-git-send-email-hch@lst.de>

From: Ming Lin <ming.l@samsung.com>

Pass in nvme_ctrl, so it can be used by the fabrics drivers also.
Also update to upstream version and rename it to nvme_cancel_request.

Signed-off-by: Ming Lin <ming.l@samsung.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/nvme/host/pci.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index cf7ea73..5ae5804 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -919,14 +919,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
 	return BLK_EH_RESET_TIMER;
 }
 
-static void nvme_cancel_io(struct request *req, void *data, bool reserved)
+static void nvme_cancel_request(struct request *req, void *data, bool reserved)
 {
 	int status;
 
 	if (!blk_mq_request_started(req))
 		return;
 
-	dev_dbg_ratelimited(((struct nvme_dev *) data)->ctrl.device,
+	dev_dbg_ratelimited(((struct nvme_ctrl *) data)->device,
 				"Cancelling I/O %d", req->tag);
 
 	status = NVME_SC_ABORT_REQ;
@@ -1714,8 +1714,9 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
 	}
 	nvme_pci_disable(dev);
 
-	blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_io, dev);
-	blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_io, dev);
+	blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_request, &dev->ctrl);
+	blk_mq_tagset_busy_iter(&dev->admin_tagset,
+				nvme_cancel_request, &dev->ctrl);
 	mutex_unlock(&dev->shutdown_lock);
 }
 
-- 
2.1.4

WARNING: multiple messages have this Message-ID (diff)
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 09/10] nvme: update nvme_cancel_io() a bit
Date: Mon,  6 Jun 2016 23:20:51 +0200	[thread overview]
Message-ID: <1465248052-17811-10-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1465248052-17811-1-git-send-email-hch@lst.de>

From: Ming Lin <ming.l@samsung.com>

Pass in nvme_ctrl, so it can be used by the fabrics drivers also.
Also update to upstream version and rename it to nvme_cancel_request.

Signed-off-by: Ming Lin <ming.l at samsung.com>
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/pci.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index cf7ea73..5ae5804 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -919,14 +919,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
 	return BLK_EH_RESET_TIMER;
 }
 
-static void nvme_cancel_io(struct request *req, void *data, bool reserved)
+static void nvme_cancel_request(struct request *req, void *data, bool reserved)
 {
 	int status;
 
 	if (!blk_mq_request_started(req))
 		return;
 
-	dev_dbg_ratelimited(((struct nvme_dev *) data)->ctrl.device,
+	dev_dbg_ratelimited(((struct nvme_ctrl *) data)->device,
 				"Cancelling I/O %d", req->tag);
 
 	status = NVME_SC_ABORT_REQ;
@@ -1714,8 +1714,9 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
 	}
 	nvme_pci_disable(dev);
 
-	blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_io, dev);
-	blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_io, dev);
+	blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_request, &dev->ctrl);
+	blk_mq_tagset_busy_iter(&dev->admin_tagset,
+				nvme_cancel_request, &dev->ctrl);
 	mutex_unlock(&dev->shutdown_lock);
 }
 
-- 
2.1.4

  parent reply	other threads:[~2016-06-06 21:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 21:20 general preparation for NVMe over Fabrics support Christoph Hellwig
2016-06-06 21:20 ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 01/10] nvme.h: add RTD3R, RTD3E and OAES fields Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-07  8:10   ` Johannes Thumshirn
2016-06-07  8:10     ` Johannes Thumshirn
2016-06-07  8:10     ` Johannes Thumshirn
2016-06-07  8:38     ` Johannes Thumshirn
2016-06-07  8:38       ` Johannes Thumshirn
2016-06-07  8:38       ` Johannes Thumshirn
2016-06-07 10:49     ` Christoph Hellwig
2016-06-07 10:49       ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 02/10] nvme.h: Add get_log_page command strucure Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 03/10] nvme.h: add NVM command set SQE/CQE size defines Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 04/10] nvme.h: add AER constants Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 05/10] nvme.h: add constants for PSDT and FUSE values Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 06/10] nvme: allow for size limitations from transport drivers Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 07/10] nvme: factor out a add nvme_is_write helper Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-06 21:20 ` [PATCH 08/10] nvme: move the workaround for I/O queue-less controllers from PCIe to core Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-06 21:20 ` Christoph Hellwig [this message]
2016-06-06 21:20   ` [PATCH 09/10] nvme: update nvme_cancel_io() a bit Christoph Hellwig
2016-06-06 21:20 ` [PATCH 10/10] nvme: move nvme_cancel_request() to core.c Christoph Hellwig
2016-06-06 21:20   ` Christoph Hellwig
2016-06-09 16:38 ` general preparation for NVMe over Fabrics support Keith Busch
2016-06-09 16:38   ` Keith Busch
2016-06-09 17:12   ` Christoph Hellwig
2016-06-09 17:12     ` Christoph Hellwig
2016-06-12 13:33   ` Jens Axboe
2016-06-12 13:33     ` Jens Axboe
2016-06-13  8:03     ` Christoph Hellwig
2016-06-13  8:03       ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465248052-17811-10-git-send-email-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.l@samsung.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.