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: 989365 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="lr5H5UwF"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42h0DS2WJQz9sBq for ; Fri, 26 Oct 2018 08:11:36 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727538AbeJZFpx (ORCPT ); Fri, 26 Oct 2018 01:45:53 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:34094 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbeJZFpv (ORCPT ); Fri, 26 Oct 2018 01:45:51 -0400 Received: by mail-it1-f194.google.com with SMTP id e81-v6so3045200itc.1 for ; Thu, 25 Oct 2018 14:11:32 -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=X2+WBFX2jj4OGKGVY7Z4JArLuAVB7Kt+Nuo4kQrJAXuF6YgHO78Y9F1QxUCVBbIO6E mce34FI5spuL/krQ0pyCkRwRY8vYDmWiBKblpuesHJhvdMnhH2wizxKEQ4gEa5jn+1w/ 3sw0xlh/NG29B9upU/vFABarWo95TxzDdo8rS+SOk9yAbrMQceG0TTSReMULqJIgLXyZ RkgRJrJ+ct2ZaepthhfGxUBs7DL4rG4e0jvIaxSiuYDhBjVZbj7TaGPTU+mAQqj1nBws XVIEh4SVGl4+yvf8aHMYLlyTBIsjlLj49PgbDkToohh6SJQCSNNBpOFyavtBxt8FNeCf KNlA== X-Gm-Message-State: AGRZ1gKyf7vH8ZgeQcvT0jyX86LgF1VdOrRh23ctz9kekkUim3s79+ze fHz2OEQKisSrifxsLIIkG94o1Q== 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-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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);