]> www.infradead.org Git - nvme.git/commit
loop: regularize upgrading the block size for direct I/O
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Jun 2024 06:04:33 +0000 (08:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Jun 2024 13:58:28 +0000 (07:58 -0600)
commita17ece76bcfe7b86327b19cae1652d7c62068a30
tree414d1953e1aa50981ac5ad3c4df91e53c87af5d7
parentae0d40ff49642651f969883ef9fc79d69c1632d7
loop: regularize upgrading the block size for direct I/O

The LOOP_CONFIGURE path automatically upgrades the block size to that
of the underlying file for O_DIRECT file descriptors, but the
LOOP_SET_BLOCK_SIZE path does not.  Fix this by lifting the code to
pick the block size into common code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240617060532.127975-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c