summaryrefslogtreecommitdiffstats
path: root/drivers/block/swim.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-04-13 16:25:57 -0600
committerJens Axboe <axboe@kernel.dk>2018-04-14 22:34:27 -0600
commitf9de14bc7e7aac77fd44bb2f62206eb9e494f0d2 (patch)
treed556b07b0cab85b22b3697fd85705d7e6ed8dd71 /drivers/block/swim.c
parent1894e916546df0efec9890a5c9954f4ad281494c (diff)
downloadop-kernel-dev-f9de14bc7e7aac77fd44bb2f62206eb9e494f0d2.zip
op-kernel-dev-f9de14bc7e7aac77fd44bb2f62206eb9e494f0d2.tar.gz
loop: handle short DIO reads
We ran into an issue with loop and btrfs, where btrfs would complain about checksum errors. It turns out that is because we don't handle short reads at all, we just zero fill the remainder. Worse than that, we don't handle the filling properly, which results in loop trying to advance a single bio by much more than its size, since it doesn't take chaining into account. Handle short reads appropriately, by simply retrying at the new correct offset. End the remainder of the request with EIO, if we get a 0 read. Fixes: bc07c10a3603 ("block: loop: support DIO & AIO") Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/swim.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud