Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2ac5a39c authored by Martijn Coenen's avatar Martijn Coenen Committed by Martijn Coenen
Browse files

BACKPORT: loop: change queue block size to match when using DIO



The loop driver assumes that if the passed in fd is opened with
O_DIRECT, the caller wants to use direct I/O on the loop device.
However, if the underlying block device has a different block size than
the loop block queue, direct I/O can't be enabled. Instead of requiring
userspace to manually change the blocksize and re-enable direct I/O,
just change the queue block sizes to match, as well as the io_min size.

(BACKPORT because physical / io_min are not set in 4.9's loop.c).

Bug: 148607611
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartijn Coenen <maco@android.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
(cherry picked from commit 85560117d00f5d528e928918b8f61cadcefff98b)

Change-Id: I753830e548b3bc33a0baa2baaaf710e1d169ab67
parent 90aa4751
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment