]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: don't early drop Fw cap
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 1 Mar 2013 02:55:39 +0000 (10:55 +0800)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:16:10 +0000 (21:16 -0700)
commit6a98d7fd593470ca6004c9ce3e895402569a1385
tree2a9bb6aea63854927ce03a2ecee8ccaa6b914008
parent4b07b18320a289b74b7aa41c6250175ba0f8821b
ceph: don't early drop Fw cap

ceph_aio_write() has an optimization that marks CEPH_CAP_FILE_WR
cap dirty before data is copied to page cache and inode size is
updated. The optimization avoids slow cap revocation caused by
balance_dirty_pages(), but introduces inode size update race. If
ceph_check_caps() flushes the dirty cap before the inode size is
updated, MDS can miss the new inode size. So just remove the
optimization.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
fs/ceph/file.c