From: Sage Weil Date: Wed, 1 Jun 2011 23:08:44 +0000 (-0700) Subject: ceph: fix short sync reads from the OSD X-Git-Tag: v3.0-rc3~2^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3cd62839aaa2cdb2b99687c9e44f1b300a4aece;p=pandora-kernel.git 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: Jeff Wu Signed-off-by: Sage Weil --- Reading git-diff-tree failed