Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2782554pxb; Sun, 24 Jan 2021 20:52:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzzih+e6Swj0bQ8ZM4aleahy5TRgG89+7mnE6fvQp07n0AGV4594wxUG1X6ENB3kK5hxqG X-Received: by 2002:a17:907:f81:: with SMTP id kb1mr1390899ejc.412.1611550360907; Sun, 24 Jan 2021 20:52:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611550360; cv=none; d=google.com; s=arc-20160816; b=mY5AIk7NPCn44U7YC7nWqIxnxnQAtjz4DciV+pCQA9yTsAGR685me98W69gmgLBTkh jWjoyapHU8GqiRL4eLh65klDT7dEQOvrkCOyKaKj9qarCMl5f9ns72WsivpNG8boifmf opVLGUEDJVUsvN1s0PBND4cOg9Bgg//K/j9rzn/2P/61GC2sXbcjlU5aEEUFAy+Exu5x rTo3WfCYXEJMkxVJl20Ze/mjSxtMAH3hMtG0qGNoXmiNmlhD/Qrq5ztKB2oGhy7qLFhT vDXLjgz+JI/1tc7i5twY6x+B2MwOPg/+9Rsk/diuAfvvSs65JaBbbOKOZwFw2IoPszXS Qfdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=T5YNgIrxBX6fSO1uhOYj11WRP7y8mCJCG6UXZFMUMjA=; b=PKeHadQyOokEkJla8xV+l7ijFXCpymqe1sg8m8XlI5dKutS4G35oshkztCD3W0NoF8 zoBNGtXoLh0uNg+zXRTAVO1FP1pnux/vc6Xaxy2PZHQV8DWuVvc4y4lM+kvAjvPUdNoA 4PkIvV+McJahnMYfWgYVywbYo6fTTeR0i2xKDNu0EMpdA/Q7Z8dcObUbhWbaln+DQtal px99Qy7P0pWqqJNtsiRwrCij8jaOmBPuN2u5zyPHCFhYEumoklx7iJkgS9YS/GFaXAsK Ic0uJ0PIIughzWTNTI7/CD4ccA4mrsFT0Ug4N7JK8lrUdOUvRqDc0FO6eMN7O+0KWGic pnRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=EGw97nsw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ionos.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p1si7522122eds.205.2021.01.24.20.52.18; Sun, 24 Jan 2021 20:52:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=EGw97nsw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ionos.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726791AbhAYEwL (ORCPT + 99 others); Sun, 24 Jan 2021 23:52:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727024AbhAYEvz (ORCPT ); Sun, 24 Jan 2021 23:51:55 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D3EEC061788 for ; Sun, 24 Jan 2021 20:50:57 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id q131so7689384pfq.10 for ; Sun, 24 Jan 2021 20:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T5YNgIrxBX6fSO1uhOYj11WRP7y8mCJCG6UXZFMUMjA=; b=EGw97nswwXd08Pj3+sWIL4ti+9YlSXulGKujjjzAHqHGWS5XhVFnpJ02q9S8WUqUZ1 yj44hN0tL5eXwuks+p3F0bSmFG2to6KhbLDQ+bSeGWlYgZGfa3CrTNi9FyWkswwdY8VQ biUJPVMdB5U4ANOpJwuKQ6ozsjgEgRZSCJpZMMutGYnifSIVmtC89065pxx6oi78WTaO znsulJubrIh446r3rLooSFpAV4XTTnytEt1c5BeHWmXXQ6aUHRClQDK9cUOZqhYOKCjs mT0nu7qqhOu98tuy3LJq2EGC8SeffErW4mxZ06gRUVouukgx94ADwRTZhuxUjTMpV5R2 lVkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T5YNgIrxBX6fSO1uhOYj11WRP7y8mCJCG6UXZFMUMjA=; b=r32moT34PQkAqyrwYylWBNY0RWrETHKwWMlPO2vRZNzDCtLEOOfq01URNmSOxfm3eU 8hpa8qrvJ0J/gs+aOoSthDu4X0HgoV/2AWvHKE5o4ets6uy5V7N4Cdjz47JVbdsWGHgv oVPw+7G0CPKRDVOLSNsoeDlv0cu3UtHSE2j2pG2JcEbtPx9pTtrDf0bkw/xmfUu6BgyX kwVI0Xg6Ace5DQVwjVmXdK6Pq26LOfOMhxQKP21UaE2HlInWxN5Ob5V856LlKgxfL1rn ytEda0OLa5sahBqBHGGz9ktMIJV0eRV1Vkwdevoh3NQhGF3CRzWKcp7jHbTbSx6HU20u UDNg== X-Gm-Message-State: AOAM532jMuXqWKg8jjizd1g7nvcQq3UzBz4Xsqsw1NVqCtPfYdsF8Mx6 +Gk2JMsA/bWbTJyJ8cD79yX8rA== X-Received: by 2002:a62:444:0:b029:1bc:ebb6:71f8 with SMTP id 65-20020a6204440000b02901bcebb671f8mr5247300pfe.75.1611550255849; Sun, 24 Jan 2021 20:50:55 -0800 (PST) Received: from gqjiang-home.profitbricks.net ([185.125.207.232]) by smtp.gmail.com with ESMTPSA id l14sm16459423pjy.15.2021.01.24.20.50.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jan 2021 20:50:55 -0800 (PST) From: Guoqing Jiang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-ide@vger.kernel.org, linux-mmc@vger.kernel.org, linux-nvme@lists.infradead.org, linux-nfs@vger.kernel.org, hch@infradead.org, Guoqing Jiang , target-devel@vger.kernel.org Subject: [PATCH V3 1/2] block: remove unnecessary argument from blk_execute_rq_nowait Date: Mon, 25 Jan 2021 05:49:57 +0100 Message-Id: <1611550198-17142-2-git-send-email-guoqing.jiang@cloud.ionos.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611550198-17142-1-git-send-email-guoqing.jiang@cloud.ionos.com> References: <1611550198-17142-1-git-send-email-guoqing.jiang@cloud.ionos.com> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org The 'q' is not used since commit a1ce35fa4985 ("block: remove dead elevator code"), also update the comment of the function. And more importantly it never really was needed to start with given that we can trivial derive it from struct request. Cc: target-devel@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: linux-ide@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-nvme@lists.infradead.org Cc: linux-nfs@vger.kernel.org Signed-off-by: Guoqing Jiang --- block/blk-exec.c | 10 ++++------ drivers/block/sx8.c | 4 ++-- drivers/nvme/host/core.c | 4 ++-- drivers/nvme/host/lightnvm.c | 2 +- drivers/nvme/host/pci.c | 4 ++-- drivers/nvme/target/passthru.c | 2 +- drivers/scsi/scsi_error.c | 2 +- drivers/scsi/sg.c | 3 +-- drivers/scsi/st.c | 2 +- drivers/target/target_core_pscsi.c | 3 +-- include/linux/blkdev.h | 2 +- 11 files changed, 17 insertions(+), 21 deletions(-) diff --git a/block/blk-exec.c b/block/blk-exec.c index 85324d5..2e37e85 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c @@ -31,8 +31,7 @@ static void blk_end_sync_rq(struct request *rq, blk_status_t error) } /** - * blk_execute_rq_nowait - insert a request into queue for execution - * @q: queue to insert the request in + * blk_execute_rq_nowait - insert a request to I/O scheduler for execution * @bd_disk: matching gendisk * @rq: request to insert * @at_head: insert request at head or tail of queue @@ -45,9 +44,8 @@ static void blk_end_sync_rq(struct request *rq, blk_status_t error) * Note: * This function will invoke @done directly if the queue is dead. */ -void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk, - struct request *rq, int at_head, - rq_end_io_fn *done) +void blk_execute_rq_nowait(struct gendisk *bd_disk, struct request *rq, + int at_head, rq_end_io_fn *done) { WARN_ON(irqs_disabled()); WARN_ON(!blk_rq_is_passthrough(rq)); @@ -83,7 +81,7 @@ void blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk, unsigned long hang_check; rq->end_io_data = &wait; - blk_execute_rq_nowait(q, bd_disk, rq, at_head, blk_end_sync_rq); + blk_execute_rq_nowait(bd_disk, rq, at_head, blk_end_sync_rq); /* Prevent hang_check timer from firing at us during very long I/O */ hang_check = sysctl_hung_task_timeout_secs; diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 4478eb7..2cdf277 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c @@ -539,7 +539,7 @@ static int carm_array_info (struct carm_host *host, unsigned int array_idx) spin_unlock_irq(&host->lock); DPRINTK("blk_execute_rq_nowait, tag == %u\n", rq->tag); - blk_execute_rq_nowait(host->oob_q, NULL, rq, true, NULL); + blk_execute_rq_nowait(NULL, rq, true, NULL); return 0; @@ -578,7 +578,7 @@ static int carm_send_special (struct carm_host *host, carm_sspc_t func) crq->msg_bucket = (u32) rc; DPRINTK("blk_execute_rq_nowait, tag == %u\n", rq->tag); - blk_execute_rq_nowait(host->oob_q, NULL, rq, true, NULL); + blk_execute_rq_nowait(NULL, rq, true, NULL); return 0; } diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index a39befb..0bea9ae 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -925,7 +925,7 @@ static void nvme_execute_rq_polled(struct request_queue *q, rq->cmd_flags |= REQ_HIPRI; rq->end_io_data = &wait; - blk_execute_rq_nowait(q, bd_disk, rq, at_head, nvme_end_sync_rq); + blk_execute_rq_nowait(bd_disk, rq, at_head, nvme_end_sync_rq); while (!completion_done(&wait)) { blk_poll(q, request_to_qc_t(rq->mq_hctx, rq), true); @@ -1202,7 +1202,7 @@ static int nvme_keep_alive(struct nvme_ctrl *ctrl) rq->timeout = ctrl->kato * HZ; rq->end_io_data = ctrl; - blk_execute_rq_nowait(rq->q, NULL, rq, 0, nvme_keep_alive_end_io); + blk_execute_rq_nowait(NULL, rq, 0, nvme_keep_alive_end_io); return 0; } diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 6c8eab8..0e5a550 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -695,7 +695,7 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd, rq->end_io_data = rqd; - blk_execute_rq_nowait(q, NULL, rq, 0, nvme_nvm_end_io); + blk_execute_rq_nowait(NULL, rq, 0, nvme_nvm_end_io); return 0; diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 856aa31..5b78e68 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1357,7 +1357,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) } abort_req->end_io_data = NULL; - blk_execute_rq_nowait(abort_req->q, NULL, abort_req, 0, abort_endio); + blk_execute_rq_nowait(NULL, abort_req, 0, abort_endio); /* * The aborted req will be completed on receiving the abort req. @@ -2281,7 +2281,7 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode) req->end_io_data = nvmeq; init_completion(&nvmeq->delete_done); - blk_execute_rq_nowait(q, NULL, req, false, + blk_execute_rq_nowait(NULL, req, false, opcode == nvme_admin_delete_cq ? nvme_del_cq_end : nvme_del_queue_end); return 0; diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c index b9776fc..cbc88ac 100644 --- a/drivers/nvme/target/passthru.c +++ b/drivers/nvme/target/passthru.c @@ -275,7 +275,7 @@ static void nvmet_passthru_execute_cmd(struct nvmet_req *req) schedule_work(&req->p.work); } else { rq->end_io_data = req; - blk_execute_rq_nowait(rq->q, ns ? ns->disk : NULL, rq, 0, + blk_execute_rq_nowait(ns ? ns->disk : NULL, rq, 0, nvmet_passthru_req_done); } diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index f11f51e..c00f06e 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2007,7 +2007,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) req->timeout = 10 * HZ; rq->retries = 5; - blk_execute_rq_nowait(req->q, NULL, req, 1, eh_lock_door_done); + blk_execute_rq_nowait(NULL, req, 1, eh_lock_door_done); } /** diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index bfa8d77..4383d93 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -829,8 +829,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp, srp->rq->timeout = timeout; kref_get(&sfp->f_ref); /* sg_rq_end_io() does kref_put(). */ - blk_execute_rq_nowait(sdp->device->request_queue, sdp->disk, - srp->rq, at_head, sg_rq_end_io); + blk_execute_rq_nowait(sdp->disk, srp->rq, at_head, sg_rq_end_io); return 0; } diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 43f7624..841ad2f 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -585,7 +585,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, rq->retries = retries; req->end_io_data = SRpnt; - blk_execute_rq_nowait(req->q, NULL, req, 1, st_scsi_execute_end); + blk_execute_rq_nowait(NULL, req, 1, st_scsi_execute_end); return 0; } diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 7994f27..33770e5 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -1000,8 +1000,7 @@ pscsi_execute_cmd(struct se_cmd *cmd) req->timeout = PS_TIMEOUT_OTHER; scsi_req(req)->retries = PS_RETRY; - blk_execute_rq_nowait(pdv->pdv_sd->request_queue, NULL, req, - (cmd->sam_task_attr == TCM_HEAD_TAG), + blk_execute_rq_nowait(NULL, req, (cmd->sam_task_attr == TCM_HEAD_TAG), pscsi_req_done); return 0; diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4526b9e..623a612 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -950,7 +950,7 @@ extern int blk_rq_map_user_iov(struct request_queue *, struct request *, gfp_t); extern void blk_execute_rq(struct request_queue *, struct gendisk *, struct request *, int); -extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, +extern void blk_execute_rq_nowait(struct gendisk *, struct request *, int, rq_end_io_fn *); /* Helper to convert REQ_OP_XXX to its string format XXX */ -- 2.7.4