]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - fs/ceph/file.c
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)
commit6070e0c1e2b515ad5edc2f8224031b051bd08109
tree2a9bb6aea63854927ce03a2ecee8ccaa6b914008
parent7971bd92baf729fcebe04d7330ac22dc668d0261
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