From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org, linux-mmc@vger.kernel.org, drbd-dev@lists.linbit.com Subject: [PATCH 03/16] block: don't hold the queue_lock over blk_abort_request Date: Wed, 14 Nov 2018 17:02:06 +0100 Message-ID: <20181114160219.28328-4-hch@lst.de> (raw) In-Reply-To: <20181114160219.28328-1-hch@lst.de> There is nothing it could synchronize against, so don't go through the pains of acquiring the lock. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-timeout.c | 2 +- drivers/ata/libata-eh.c | 4 ---- drivers/block/mtip32xx/mtip32xx.c | 5 +---- drivers/scsi/libsas/sas_ata.c | 5 ----- drivers/scsi/libsas/sas_scsi_host.c | 10 ++-------- 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 3b0179fbdd6a..124c26128bf6 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -75,7 +75,7 @@ ssize_t part_timeout_store(struct device *dev, struct device_attribute *attr, * This function requests that the block layer start recovery for the * request by deleting the timer and calling the q's timeout function. * LLDDs who implement their own error recovery MAY ignore the timeout - * event if they generated blk_abort_req. Must hold queue lock. + * event if they generated blk_abort_request. */ void blk_abort_request(struct request *req) { diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 01306c018398..938ed513b070 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -919,8 +919,6 @@ static void ata_eh_set_pending(struct ata_port *ap, int fastdrain) void ata_qc_schedule_eh(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; - struct request_queue *q = qc->scsicmd->device->request_queue; - unsigned long flags; WARN_ON(!ap->ops->error_handler); @@ -932,9 +930,7 @@ void ata_qc_schedule_eh(struct ata_queued_cmd *qc) * Note that ATA_QCFLAG_FAILED is unconditionally set after * this function completes. */ - spin_lock_irqsave(q->queue_lock, flags); blk_abort_request(qc->scsicmd->request); - spin_unlock_irqrestore(q->queue_lock, flags); } /** diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index a4c44db097e0..2b0ac9d01e51 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -2770,10 +2770,7 @@ static int mtip_service_thread(void *data) blk_mq_quiesce_queue(dd->queue); - spin_lock(dd->queue->queue_lock); - blk_mq_tagset_busy_iter(&dd->tags, - mtip_queue_cmd, dd); - spin_unlock(dd->queue->queue_lock); + blk_mq_tagset_busy_iter(&dd->tags, mtip_queue_cmd, dd); set_bit(MTIP_PF_ISSUE_CMDS_BIT, &dd->port->flags); diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 4f6cdf53e913..c90b278cc28c 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -601,12 +601,7 @@ void sas_ata_task_abort(struct sas_task *task) /* Bounce SCSI-initiated commands to the SCSI EH */ if (qc->scsicmd) { - struct request_queue *q = qc->scsicmd->device->request_queue; - unsigned long flags; - - spin_lock_irqsave(q->queue_lock, flags); blk_abort_request(qc->scsicmd->request); - spin_unlock_irqrestore(q->queue_lock, flags); return; } diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 33229348dcb6..af085432c5fe 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c @@ -930,16 +930,10 @@ void sas_task_abort(struct sas_task *task) return; } - if (dev_is_sata(task->dev)) { + if (dev_is_sata(task->dev)) sas_ata_task_abort(task); - } else { - struct request_queue *q = sc->device->request_queue; - unsigned long flags; - - spin_lock_irqsave(q->queue_lock, flags); + else blk_abort_request(sc->request); - spin_unlock_irqrestore(q->queue_lock, flags); - } } void sas_target_destroy(struct scsi_target *starget) -- 2.19.1
next prev parent reply index Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-14 16:02 remove more legacy request leftover Christoph Hellwig 2018-11-14 16:02 ` [PATCH 01/16] block: remove QUEUE_FLAG_BYPASS and ->bypass Christoph Hellwig 2018-11-15 6:50 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 02/16] block: remove deadline __deadline manipulation helpers Christoph Hellwig 2018-11-15 6:51 ` Hannes Reinecke 2018-11-14 16:02 ` Christoph Hellwig [this message] 2018-11-15 6:51 ` [PATCH 03/16] block: don't hold the queue_lock over blk_abort_request Hannes Reinecke 2018-11-14 16:02 ` [PATCH 04/16] block: use atomic bitops for ->queue_flags Christoph Hellwig 2018-11-15 6:55 ` Hannes Reinecke 2018-11-15 9:04 ` Christoph Hellwig 2018-11-14 16:02 ` [PATCH 05/16] block: remove queue_lockdep_assert_held Christoph Hellwig 2018-11-15 6:55 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 06/16] block-iolatency: remove the unused lock argument to rq_qos_throttle Christoph Hellwig 2018-11-15 6:56 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 07/16] block: update a few comments for the legacy request removal Christoph Hellwig 2018-11-15 6:56 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 08/16] block: remove a few unused exports Christoph Hellwig 2018-11-15 6:57 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 09/16] blk-cgroup: consolidate error handling in blkcg_init_queue Christoph Hellwig 2018-11-15 6:58 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 10/16] blk-cgroup: move locking into blkg_destroy_all Christoph Hellwig 2018-11-15 6:58 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 11/16] drbd: don't override the queue_lock Christoph Hellwig 2018-11-15 6:58 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 12/16] umem: " Christoph Hellwig 2018-11-15 6:59 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 13/16] mmc: simplify queue initialization Christoph Hellwig 2018-11-14 17:31 ` Ulf Hansson 2018-11-15 9:02 ` Christoph Hellwig 2018-11-15 7:00 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 14/16] mmc: stop abusing the request queue_lock pointer Christoph Hellwig 2018-11-14 17:56 ` Ulf Hansson 2018-11-15 9:03 ` Christoph Hellwig 2018-11-15 7:00 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 15/16] block: remove the lock argument to blk_alloc_queue_node Christoph Hellwig 2018-11-15 7:00 ` Hannes Reinecke 2018-11-14 16:02 ` [PATCH 16/16] block: remove the queue_lock indirection Christoph Hellwig 2018-11-15 7:01 ` Hannes Reinecke 2018-11-15 19:14 ` remove more legacy request leftover Jens Axboe 2018-11-15 19:20 ` Jens Axboe
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=20181114160219.28328-4-hch@lst.de \ --to=hch@lst.de \ --cc=axboe@kernel.dk \ --cc=drbd-dev@lists.linbit.com \ --cc=linux-block@vger.kernel.org \ --cc=linux-mmc@vger.kernel.org \ /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
Linux-Block Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \ linux-block@vger.kernel.org public-inbox-index linux-block Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block AGPL code for this site: git clone https://public-inbox.org/public-inbox.git