From: Sage Weil Date: Mon, 5 Nov 2012 19:07:23 +0000 (-0800) Subject: ceph: Fix i_size update race X-Git-Tag: v3.8-rc1~21^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22cddde104d715600a4c218bf9224923208afe90;p=pandora-kernel.git ceph: Fix i_size update race ceph_aio_write() has an optimization that marks cap EPH_CAP_FILE_WR dirty before data is copied to page cache and inode size is updated. If ceph_check_caps() flushes the dirty cap before the inode size is updated, MDS can miss the new inode size. The fix is move ceph_{get,put}_cap_refs() into ceph_write_{begin,end}() and call __ceph_mark_dirty_caps() after inode size is updated. Signed-off-by: Yan, Zheng Signed-off-by: Sage Weil --- Reading git-diff-tree failed