Thread (23 messages) 23 messages, 6 authors, 2025-02-14

Re: [PATCH V2] block: make segment size limit workable for > 4K PAGE_SIZE

From: Daniel Gomez <da.gomez@kernel.org>
Date: 2025-02-14 12:28:44

On Fri, Feb 14, 2025 at 07:19:45PM +0100, Ming Lei wrote:
On Fri, Feb 14, 2025 at 10:38:36AM +0100, Daniel Gomez wrote:
quoted
On Mon, Feb 10, 2025 at 05:03:19PM +0100, Ming Lei wrote:
quoted
 /**
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 248416ecd01c..32188af4051e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1163,6 +1163,7 @@ static inline bool bdev_is_partition(struct block_device *bdev)
 enum blk_default_limits {
 	BLK_MAX_SEGMENTS	= 128,
 	BLK_SAFE_MAX_SECTORS	= 255,
+	BLK_MIN_SEGMENT_SIZE	= 4096, /* min(PAGE_SIZE) */
I think it would be useful to expose this value to the queue_limits and
Can you share it is useful for what?
I meant for your use case.
quoted
sysfs (and remove it from here). We can default it to PAGE_SIZE (as it has
always been) and allow to overwrite it when the block driver initializes the
Which device driver needs to initialize it?
I mean, it would be yours. Keeping the default minimum segment size to PAGE_SIZE
rather than changing it to 4k, would keep the current behaviour. Then, adding
the minimum segment limit would allow your driver to overwrite it for your use
case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help