From patchwork Thu Oct 25 21:10:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10656571 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D33A14DE for ; Thu, 25 Oct 2018 21:11:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82D8F2C648 for ; Thu, 25 Oct 2018 21:11:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 776BE2C654; Thu, 25 Oct 2018 21:11:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02BC52C648 for ; Thu, 25 Oct 2018 21:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727581AbeJZFpx (ORCPT ); Fri, 26 Oct 2018 01:45:53 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:50413 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbeJZFpw (ORCPT ); Fri, 26 Oct 2018 01:45:52 -0400 Received: by mail-it1-f194.google.com with SMTP id k206-v6so3345163ite.0 for ; Thu, 25 Oct 2018 14:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W/545G3EjKdQcRF/oTUEBZKwajiXEbRGzSLmxWu9ous=; b=lr5H5UwF/8/FfcGL1re5eFwqwqLszUxefDn9UCClwNNrwH7ifp9mlKCqxPkUguGTcZ 9wS8DIrn23f0+syDgRNF5wAD8/CGT5uqx19av6H4Pp8EryUSdzlhv/G586oRqFwui3Ex ocnBC8Df5X2NKWvUc8qPgBOo8isytyYXEPo9qfFzNkmyvqF1AHE+EpL3yxon0lnSt4q/ UzEeDU+jzJuoPYrcTciZlfvmyKfbL3uShqvt5Fi/3jKCzMG2sf4IvCujlIb7WY+vzb/h t8W4Q4WcsW25/Sv0Xf52jubTpHRqRp4Tog9sBFYAT/Oy0i4XeeEBNcbtgnHxaW2Wz9do e1+Q== 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=W/545G3EjKdQcRF/oTUEBZKwajiXEbRGzSLmxWu9ous=; b=MVK+09F8KYlqeXmsTHtviz48UTSXAiVzSlieI9u0PMLJe+//bLXX4YZEGbr9fAR+/r kGyyq8Q59LTqMmPsh9saOSE8+27XadiO0WI3lDPWp2NN5x4/aL5JzIUcnEzrc79Lp9B2 +7QjoF5iG1qM+ZsywG/TaQKmhcs4COnKL4h0bi5gZI6JzpC2+MnRULTDCB5WIQAaM9su Gn9NoeoZLDVdDth8bjcqfm9ZNzbOVC1ItF8rbFvoxHQJjW3nYOs2Dw41/y6j/g1s17DP xgvk5NjcabK5PGZX7ttjQcbV5VoOhtfyk8BTPJQO5NVQSAB8arevF2IxoigOQB/DKiZ6 YAAQ== X-Gm-Message-State: AGRZ1gL7lecm/+zWCpaj4u7zwo9ppOnjErxCSQiDdX4M35XC8wNgLDko 80tGxvzkv5hG2G4rCR0ywu2+6JSA51KkNA== X-Google-Smtp-Source: AJdET5fRH2m0mrYlTTRxCbD4oIoXYCOvJgULZSc/uWxlu5txQjhuKLw3QmROowMDflcnOUrWicBBIw== X-Received: by 2002:a24:81d7:: with SMTP id q206-v6mr1983859itd.94.1540501892479; Thu, 25 Oct 2018 14:11:32 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id e65-v6sm3446375ioa.76.2018.10.25.14.11.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 14:11:31 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 23/28] block: kill lld busy Date: Thu, 25 Oct 2018 15:10:34 -0600 Message-Id: <20181025211039.11559-24-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025211039.11559-1-axboe@kernel.dk> References: <20181025211039.11559-1-axboe@kernel.dk> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Nobody sets the helper, so we always return 0. Kill it. Signed-off-by: Jens Axboe --- block/blk-core.c | 28 ---------------------------- block/blk-settings.c | 6 ------ drivers/md/dm-mpath.c | 4 +--- include/linux/blkdev.h | 4 ---- 4 files changed, 1 insertion(+), 41 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 4c39c7865f9c..dd1328f4dc31 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1795,34 +1795,6 @@ void rq_flush_dcache_pages(struct request *rq) EXPORT_SYMBOL_GPL(rq_flush_dcache_pages); #endif -/** - * blk_lld_busy - Check if underlying low-level drivers of a device are busy - * @q : the queue of the device being checked - * - * Description: - * Check if underlying low-level drivers of a device are busy. - * If the drivers want to export their busy state, they must set own - * exporting function using blk_queue_lld_busy() first. - * - * Basically, this function is used only by request stacking drivers - * to stop dispatching requests to underlying devices when underlying - * devices are busy. This behavior helps more I/O merging on the queue - * of the request stacking driver and prevents I/O throughput regression - * on burst I/O load. - * - * Return: - * 0 - Not busy (The request stacking driver should dispatch request) - * 1 - Busy (The request stacking driver should stop dispatching request) - */ -int blk_lld_busy(struct request_queue *q) -{ - if (q->lld_busy_fn) - return q->lld_busy_fn(q); - - return 0; -} -EXPORT_SYMBOL_GPL(blk_lld_busy); - /** * blk_rq_unprep_clone - Helper function to free all bios in a cloned request * @rq: the clone request to be cleaned up diff --git a/block/blk-settings.c b/block/blk-settings.c index 3c5da75c2def..1895f499bbe5 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -32,12 +32,6 @@ void blk_queue_rq_timeout(struct request_queue *q, unsigned int timeout) } EXPORT_SYMBOL_GPL(blk_queue_rq_timeout); -void blk_queue_lld_busy(struct request_queue *q, lld_busy_fn *fn) -{ - q->lld_busy_fn = fn; -} -EXPORT_SYMBOL_GPL(blk_queue_lld_busy); - /** * blk_set_default_limits - reset limits to default values * @lim: the queue_limits structure to reset diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index a24ed3973e7c..4d736e0fd67f 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -1936,9 +1936,7 @@ static int multipath_iterate_devices(struct dm_target *ti, static int pgpath_busy(struct pgpath *pgpath) { - struct request_queue *q = bdev_get_queue(pgpath->path.dev->bdev); - - return blk_lld_busy(q); + return 0; } /* diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index bfe40de81c19..115199e7c581 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -312,7 +312,6 @@ typedef bool (poll_q_fn) (struct request_queue *q, blk_qc_t); struct bio_vec; typedef void (softirq_done_fn)(struct request *); typedef int (dma_drain_needed_fn)(struct request *); -typedef int (lld_busy_fn) (struct request_queue *q); typedef int (bsg_job_fn) (struct bsg_job *); typedef int (init_rq_fn)(struct request_queue *, struct request *, gfp_t); typedef void (exit_rq_fn)(struct request_queue *, struct request *); @@ -443,7 +442,6 @@ struct request_queue { poll_q_fn *poll_fn; softirq_done_fn *softirq_done_fn; dma_drain_needed_fn *dma_drain_needed; - lld_busy_fn *lld_busy_fn; /* Called just after a request is allocated */ init_rq_fn *init_rq_fn; /* Called just before a request is freed */ @@ -909,7 +907,6 @@ extern void blk_init_request_from_bio(struct request *req, struct bio *bio); extern void blk_put_request(struct request *); extern struct request *blk_get_request(struct request_queue *, unsigned int op, blk_mq_req_flags_t flags); -extern int blk_lld_busy(struct request_queue *q); extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, struct bio_set *bs, gfp_t gfp_mask, int (*bio_ctr)(struct bio *, struct bio *, void *), @@ -1152,7 +1149,6 @@ extern void blk_queue_update_dma_pad(struct request_queue *, unsigned int); extern int blk_queue_dma_drain(struct request_queue *q, dma_drain_needed_fn *dma_drain_needed, void *buf, unsigned int size); -extern void blk_queue_lld_busy(struct request_queue *q, lld_busy_fn *fn); extern void blk_queue_segment_boundary(struct request_queue *, unsigned long); extern void blk_queue_virt_boundary(struct request_queue *, unsigned long); extern void blk_queue_dma_alignment(struct request_queue *, int);