Skip to contentSkip to conversation

block: Remove unused blk_limits_io_{min,opt}

PATCH Applied [email protected] 3 participants 3 messages Sep 20, 2024 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Remove unused blk_limits_io_{min,opt}

From: "Dr. David Alan Gilbert" <[email protected]>

blk_limits_io_min and blk_limits_io_opt are unused since the recent commit
0a94a469a4f0 ("dm: stop using blk_limits_io_{min,opt}")

Remove them.

---
 block/blk-settings.c   | 42 ------------------------------------------
 include/linux/blkdev.h |  2 --
 2 files changed, 44 deletions(-)
block/blk-settings.c +0 -42
index cd8a8eabc9a5..a446654ddee5 100644
@@ -437,48 +437,6 @@ int queue_limits_set(struct request_queue *q, struct queue_limits *lim)
 }
 EXPORT_SYMBOL_GPL(queue_limits_set);
 
-/**
- * blk_limits_io_min - set minimum request size for a device
- * @limits: the queue limits
- * @min:  smallest I/O size in bytes
- *
- * Description:
- *   Some devices have an internal block size bigger than the reported
- *   hardware sector size.  This function can be used to signal the
- *   smallest I/O the device can perform without incurring a performance
- *   penalty.
- */
-void blk_limits_io_min(struct queue_limits *limits, unsigned int min)
-{
-	limits->io_min = min;
-
-	if (limits->io_min < limits->logical_block_size)
-		limits->io_min = limits->logical_block_size;
-
-	if (limits->io_min < limits->physical_block_size)
-		limits->io_min = limits->physical_block_size;
-}
-EXPORT_SYMBOL(blk_limits_io_min);
-
-/**
- * blk_limits_io_opt - set optimal request size for a device
- * @limits: the queue limits
- * @opt:  smallest I/O size in bytes
- *
- * Description:
- *   Storage devices may report an optimal I/O size, which is the
- *   device's preferred unit for sustained I/O.  This is rarely reported
- *   for disk drives.  For RAID arrays it is usually the stripe width or
- *   the internal track size.  A properly aligned multiple of
- *   optimal_io_size is the preferred request size for workloads where
- *   sustained throughput is desired.
- */
-void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt)
-{
-	limits->io_opt = opt;
-}
-EXPORT_SYMBOL(blk_limits_io_opt);
-
 static int queue_limit_alignment_offset(const struct queue_limits *lim,
 		sector_t sector)
 {
include/linux/blkdev.h +0 -2
index 643c9020a35a..50c3b959da28 100644
@@ -968,8 +968,6 @@ static inline void blk_queue_disable_write_zeroes(struct request_queue *q)
 /*
  * Access functions for manipulating queue properties
  */
-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);
 extern void blk_set_stacking_limits(struct queue_limits *lim);
 extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
Signature · 1 line
2.46.1
maintainer Applied
#1 lore raw
Quoted 8 lines · On Fri, 20 Sep 2024 01:48:17 +0100, [email protected] wrote:

blk_limits_io_min and blk_limits_io_opt are unused since the recent commit
0a94a469a4f0 ("dm: stop using blk_limits_io_{min,opt}")

Remove them.

[...]

Applied, thanks!

[1/1] block: Remove unused blk_limits_io_{min,opt}

      commit: 9ba5dcc722de4390a1d3211b2ee3c864f84f5461

Best regards,

Signature · 1 line
Jens Axboe
#2 lore raw
In reply to [email protected]
Quoted 5 lines · On Fri, Sep 20, 2024 at 01:48:17AM +0100, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

blk_limits_io_min and blk_limits_io_opt are unused since the recent commit
0a94a469a4f0 ("dm: stop using blk_limits_io_{min,opt}")

Yeah, this should have been removed once both the dm and block tree that had changes in the area got merged, but I forgot about it.

Thanks!