]> www.infradead.org Git - users/jedix/linux-maple.git/commit
loop: check in LO_FLAGS_DIRECT_IO in loop_default_blocksize
authorChristoph Hellwig <hch@lst.de>
Fri, 31 Jan 2025 12:00:40 +0000 (13:00 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Feb 2025 23:17:56 +0000 (16:17 -0700)
commitf6f9e32fe1e454ae8ac0190b2c2bd6074914beec
treef5c607a15b89ed54211c36b1eaf52930c8abdf85
parent984c2ab4b87c0db7c53c3b6a42be95f79f2aae89
loop: check in LO_FLAGS_DIRECT_IO in loop_default_blocksize

We can't go below the minimum direct I/O size no matter if direct I/O is
enabled by passing in an O_DIRECT file descriptor or due to the explicit
flag.  Now that LO_FLAGS_DIRECT_IO is set earlier after assigning a
backing file, loop_default_blocksize can check it instead of the
O_DIRECT flag to handle both conditions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250131120120.1315125-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c