• S
    ceph: Fix i_size update race · 22cddde1
    Sage Weil 提交于
    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: NYan, Zheng <zheng.z.yan@intel.com>
    Signed-off-by: NSage Weil <sage@inktank.com>
    22cddde1
addr.c 34.4 KB