]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.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)
committerGreg Farnum <greg@inktank.com>
Tue, 5 Mar 2013 20:34:20 +0000 (12:34 -0800)
commit9305a4b26946d7248e044296778f329013cc7141
tree0360b44823565c5383a6b451e1e19198732ca611
parent42f94fe2cf502e399c7de1e5a3b3e652d0c6dc84
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