diff options
author | Christoph Hellwig <hch@lst.de> | 2024-06-26 16:26:29 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-06-26 09:37:35 -0600 |
commit | e94b45d08b5d1c230c0f59c3eed758d28658851e (patch) | |
tree | 0b340806fc8d7ad718ab1e9abc99aa0a977035ea /block/bio-integrity.c | |
parent | abfc9d810926dfbf5645c7755c8d5ab96273f27d (diff) |
block: move dma_pad_mask into queue_limits
dma_pad_mask is a queue_limits by all ways of looking at it, so move it
there and set it through the atomic queue limits APIs.
Add a little helper that takes the alignment and pad into account to
simplify the code that is touched a bit.
Note that there never was any need for the > check in
blk_queue_update_dma_pad, this probably was just copy and paste from
dma_update_dma_alignment.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240626142637.300624-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio-integrity.c')
-rw-r--r-- | block/bio-integrity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 173ffd4d6237..356ca0d3d62f 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -312,7 +312,7 @@ int bio_integrity_map_user(struct bio *bio, void __user *ubuf, ssize_t bytes, u32 seed) { struct request_queue *q = bdev_get_queue(bio->bi_bdev); - unsigned int align = q->dma_pad_mask | queue_dma_alignment(q); + unsigned int align = blk_lim_dma_alignment_and_pad(&q->limits); struct page *stack_pages[UIO_FASTIOV], **pages = stack_pages; struct bio_vec stack_vec[UIO_FASTIOV], *bvec = stack_vec; unsigned int direction, nr_bvecs; |