mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
block: export blk_validate_limits
While block drivers do the validation as part of committing them to the
queue, users that use the limit outside of a block device context have
to validate the limits and fill in the calculated values as well.
So far btrfs is the only user of queue limits without a block device,
and it has gotten away with that more or less by accident. But with
commit 559218d43e ("block: pre-calculate max_zone_append_sectors")
this became fatal for setups that have small max zone append size,
as it won't be limited now.
Export blk_validate_limits so that it can be called directly from btrfs.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20241113084541.34315-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
15da3dd3f5
commit
470d2bc3a0
@@ -948,6 +948,7 @@ queue_limits_start_update(struct request_queue *q)
|
||||
int queue_limits_commit_update(struct request_queue *q,
|
||||
struct queue_limits *lim);
|
||||
int queue_limits_set(struct request_queue *q, struct queue_limits *lim);
|
||||
int blk_validate_limits(struct queue_limits *lim);
|
||||
|
||||
/**
|
||||
* queue_limits_cancel_update - cancel an atomic update of queue limits
|
||||
|
||||
Reference in New Issue
Block a user