Skip to content
Commit c3cd6283 authored by Sage Weil's avatar Sage Weil
Browse files

ceph: fix short sync reads from the OSD



If we get a short read from the OSD because the object is small, we need to
zero the remainder of the buffer.  For O_DIRECT reads, the attempted range
is not trimmed to i_size by the VFS, so we were actually looping
indefinitely.

Fix by trimming by i_size, and the unconditionally zeroing the trailing
range.

Reported-by: default avatarJeff Wu <cpwu@tnsoft.com.cn>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 25845472
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment