]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: call eval() after caps are exported
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 19 Nov 2012 02:43:39 +0000 (10:43 +0800)
committerSage Weil <sage@inktank.com>
Sat, 1 Dec 2012 20:52:22 +0000 (12:52 -0800)
For an inode just changed authority, if the new auth MDS want to
change a lock in the inode from 'sync' to 'lock' state before caps
are exported. The lock in replica can be in 'sync->lock' state
because client caps prevent it from transitting to 'lock' state.
So we should call eval() after clearing client caps.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Migrator.cc

index b66b54cbc83b143198d9656deee47b4db501e2c2..a804eab77318755f927b5278a7ab87717a47ac86 100644 (file)
@@ -1051,6 +1051,7 @@ void Migrator::finish_export_inode_caps(CInode *in)
     mds->send_message_client_counted(m, it->first);
   }
   in->clear_client_caps_after_export();
+  mds->locker->eval(in, CEPH_CAP_LOCKS);
 }
 
 void Migrator::finish_export_inode(CInode *in, utime_t now, list<Context*>& finished)