From: Sage Weil Date: Tue, 9 Feb 2010 22:04:02 +0000 (-0800) Subject: ceph: fix sync read eof check deadlock X-Git-Tag: v2.6.34-rc2~9^2~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a026589ba333185c466c906376fe022a27a53f9;p=pandora-kernel.git ceph: fix sync read eof check deadlock If a sync read gets a short result from the OSD, it may need to do a getattr to see if it is short due to reaching end-of-file. The getattr was being done while holding a reference to FILE_RD, which can lead to a deadlock if the MDS is revoking that capability bit and can't process the getattr until it does. We fix this by setting a flag if EOF size validation is needed, and doing the getattr in ceph_aio_read, after the RD cap ref is dropped. If the read needs to be continued, we loop and continue traversing the file. Signed-off-by: Sage Weil --- Reading git-diff-tree failed