[PATCH] Cancel outstanding IOs on queue deletion
Busch, Keith
keith.busch at intel.com
Thu Aug 2 14:51:35 EDT 2012
> -----Original Message-----
> From: linux-nvme-bounces at lists.infradead.org [mailto:linux-nvme-
> bounces at lists.infradead.org] On Behalf Of Matthew Wilcox
> Sent: Thursday, August 02, 2012 11:56 AM
> To: linux-nvme at lists.infradead.org
> Subject: [PATCH] Cancel outstanding IOs on queue deletion
> static void nvme_free_queue(struct nvme_dev *dev, int qid) {
> struct nvme_queue *nvmeq = dev->queues[qid];
> int vector = dev->entry[nvmeq->cq_vector].vector;
>
> + nvme_timeout_ios(nvmeq);
> +
> irq_set_affinity_hint(vector, NULL);
> free_irq(vector, nvmeq);
>
nvme_timeout_ios cancels an io only if it has timed out, but I think you want to unconditionally cancel them out when freeing the queue. Also, should you hold the q_lock when calling this function?
More information about the Linux-nvme
mailing list