summaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-13 08:34:14 +0100
committerJens Axboe <axboe@kernel.dk>2024-02-13 08:56:59 -0700
commitd690cb8ae14bd377d422b7905b6959c7e7a45b95 (patch)
treec909d6c4f74dfd4c69ba78d57aa8d737d9515cf3 /block/blk.h
parentc490f226a0ea22639e81ac34edc884e238ea955a (diff)
block: add an API to atomically update queue limits
Add a new queue_limits_{start,commit}_update pair of functions that allows taking an atomic snapshot of queue limits, update it, and commit it if it passes validity checking. Also use the low-level validation helper to implement blk_set_default_limits instead of duplicating the initialization. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20240213073425.1621680-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk.h b/block/blk.h
index 913c93838a01..43c7e9180b30 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -330,7 +330,7 @@ void blk_rq_set_mixed_merge(struct request *rq);
bool blk_rq_merge_ok(struct request *rq, struct bio *bio);
enum elv_merge blk_try_merge(struct request *rq, struct bio *bio);
-void blk_set_default_limits(struct queue_limits *lim);
+int blk_set_default_limits(struct queue_limits *lim);
int blk_dev_init(void);
/*