]> www.infradead.org Git - users/hch/block.git/commit
loop: regularize upgrading the block size for direct I/O
authorChristoph Hellwig <hch@lst.de>
Sun, 2 Jun 2024 06:47:04 +0000 (08:47 +0200)
committerChristoph Hellwig <hch@lst.de>
Sun, 16 Jun 2024 09:47:55 +0000 (11:47 +0200)
commitc8a015b6ad1ced7f84fcf42b34e5f1fa4ef39c39
tree414d1953e1aa50981ac5ad3c4df91e53c87af5d7
parent59f98f9f64773ad20dd3fc5fe6904b29bb5611c0
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>
drivers/block/loop.c