diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-04-13 16:25:57 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-04-14 22:34:27 -0600 |
commit | f9de14bc7e7aac77fd44bb2f62206eb9e494f0d2 (patch) | |
tree | d556b07b0cab85b22b3697fd85705d7e6ed8dd71 /mm/mmzone.c | |
parent | 1894e916546df0efec9890a5c9954f4ad281494c (diff) |
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 'mm/mmzone.c')
0 files changed, 0 insertions, 0 deletions