]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: fix corner case of pushing inline data
authorYan, Zheng <zheng.z.yan@intel.com>
Sat, 15 Mar 2014 12:37:37 +0000 (20:37 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Sat, 15 Mar 2014 16:54:59 +0000 (00:54 +0800)
commit5b3422a6dc3640a8ff7dbc0a980d20ee3f9e97b0
tree1780420544df2fe5eee4f8523c02e1cb2b57018a
parent35f1b042aa6d0a9dc3ce6b27ebd945cff8c2b532
mds: fix corner case of pushing inline data

Following sequence of events can happen.
 - Client releases an inode, queues cap release message.
 - A 'lookup' reply brings the same inode back, but the reply doesn't
   contain inline data because MDS didn't receive the cap release
   message and thought client already has up-to-data inline data.

The fix is trigger a getattr if client finds inline_version is zero.
The getattr mask is set to CEPH_STAT_CAP_INLINE_DATA, so that MDS knows
client does not have inline data.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/client/Client.cc
src/include/ceph_fs.h
src/mds/CInode.cc
src/mds/Server.cc