linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>, Song Liu <song@kernel.org>,
	Yu Kuai <yukuai3@huawei.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-block@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH 6/8] block: remove disk_update_readahead
Date: Tue, 25 Jun 2024 16:59:51 +0200	[thread overview]
Message-ID: <20240625145955.115252-7-hch@lst.de> (raw)
In-Reply-To: <20240625145955.115252-1-hch@lst.de>

Mark blk_apply_bdi_limits non-static and open code disk_update_readahead
in the only caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-settings.c   | 8 +-------
 block/blk.h            | 2 ++
 block/genhd.c          | 2 +-
 include/linux/blkdev.h | 1 -
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/block/blk-settings.c b/block/blk-settings.c
index c2221b7406d46a..c692e80bb4f890 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -55,7 +55,7 @@ void blk_set_stacking_limits(struct queue_limits *lim)
 }
 EXPORT_SYMBOL(blk_set_stacking_limits);
 
-static void blk_apply_bdi_limits(struct backing_dev_info *bdi,
+void blk_apply_bdi_limits(struct backing_dev_info *bdi,
 		struct queue_limits *lim)
 {
 	/*
@@ -434,12 +434,6 @@ int queue_limits_set(struct request_queue *q, struct queue_limits *lim)
 }
 EXPORT_SYMBOL_GPL(queue_limits_set);
 
-void disk_update_readahead(struct gendisk *disk)
-{
-	blk_apply_bdi_limits(disk->bdi, &disk->queue->limits);
-}
-EXPORT_SYMBOL_GPL(disk_update_readahead);
-
 /**
  * blk_limits_io_min - set minimum request size for a device
  * @limits: the queue limits
diff --git a/block/blk.h b/block/blk.h
index d0a986d8ee507e..95e5a4f81693c4 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -358,6 +358,8 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio);
 enum elv_merge blk_try_merge(struct request *rq, struct bio *bio);
 
 int blk_set_default_limits(struct queue_limits *lim);
+void blk_apply_bdi_limits(struct backing_dev_info *bdi,
+		struct queue_limits *lim);
 int blk_dev_init(void);
 
 /*
diff --git a/block/genhd.c b/block/genhd.c
index 8f1f3c6b4d6729..4dc95a46350532 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -524,7 +524,7 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
 		disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor);
 	}
 
-	disk_update_readahead(disk);
+	blk_apply_bdi_limits(disk->bdi, &disk->queue->limits);
 	disk_add_events(disk);
 	set_bit(GD_ADDED, &disk->state);
 	return 0;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index b37826b350a2e3..6b88382012e958 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -973,7 +973,6 @@ static inline void blk_queue_disable_write_zeroes(struct request_queue *q)
 /*
  * Access functions for manipulating queue properties
  */
-void disk_update_readahead(struct gendisk *disk);
 extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
 extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt);
 extern void blk_set_queue_depth(struct request_queue *q, unsigned int depth);
-- 
2.43.0


  parent reply	other threads:[~2024-06-25 15:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 14:59 queue_limits fixups and tidyups v2 Christoph Hellwig
2024-06-25 14:59 ` [PATCH 1/8] md: set md-specific flags for all queue limits Christoph Hellwig
2024-06-25 21:21   ` Damien Le Moal
2024-06-25 14:59 ` [PATCH 2/8] block: correctly report cache type Christoph Hellwig
2024-06-25 21:22   ` Damien Le Moal
2024-06-26  7:59   ` John Garry
2024-06-25 14:59 ` [PATCH 3/8] block: rename BLK_FLAG_MISALIGNED Christoph Hellwig
2024-06-25 21:23   ` Damien Le Moal
2024-06-26  8:07   ` John Garry
2024-06-25 14:59 ` [PATCH 4/8] block: convert features and flags to __bitwise types Christoph Hellwig
2024-06-25 21:27   ` Damien Le Moal
2024-06-25 14:59 ` [PATCH 5/8] block: conding style fixup for blk_queue_max_guaranteed_bio Christoph Hellwig
2024-06-25 21:27   ` Damien Le Moal
2024-06-25 14:59 ` Christoph Hellwig [this message]
2024-06-25 21:29   ` [PATCH 6/8] block: remove disk_update_readahead Damien Le Moal
2024-06-25 14:59 ` [PATCH 7/8] block: remove the fallback case in queue_dma_alignment Christoph Hellwig
2024-06-25 15:07   ` John Garry
2024-06-25 21:29   ` Damien Le Moal
2024-06-25 14:59 ` [PATCH 8/8] block: move dma_pad_mask into queue_limits Christoph Hellwig
2024-06-25 21:31   ` Damien Le Moal
  -- strict thread matches above, loose matches on Subject: below --
2024-06-26 14:26 queue_limits fixups and tidyups v3 Christoph Hellwig
2024-06-26 14:26 ` [PATCH 6/8] block: remove disk_update_readahead Christoph Hellwig

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=20240625145955.115252-7-hch@lst.de \
    --to=hch@lst.de \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=song@kernel.org \
    --cc=yukuai3@huawei.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).