From: Yan, Zheng Date: Mon, 5 Aug 2013 06:10:29 +0000 (+0800) Subject: ceph: fix request max size X-Git-Tag: v3.12-rc1~90^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3871cbb9a41b1371dc13fc619e3ab4e0a1e29b4a;p=pandora-kernel.git ceph: fix request max size ceph_check_caps() requests new max size only when there is Fw cap. If we call check_max_size() while there is no Fw cap. It updates i_wanted_max_size and calls ceph_check_caps(), but ceph_check_caps() does nothing. Later when Fw cap is issued, we call check_max_size() again. But i_wanted_max_size is equal to 'endoff' at this time, so check_max_size() doesn't call ceph_check_caps() and we end up with waiting for the new max size forever. The fix is duplicate ceph_check_caps()'s "request max size" code in check_max_size(), and make try_get_cap_refs() wait for the Fw cap before retry requesting new max size. This patch also removes the "endoff > (inode->i_size << 1)" check in check_max_size(). It's useless because there is no corresponding logic in ceph_check_caps(). Reviewed-by: Sage Weil Signed-off-by: Yan, Zheng --- Reading git-diff-tree failed