Current code allow importing non-auth caps when inode is being exported.
This can breaks message ordering because the corresponding cap import
messages are sent after the flush session messages. So they can arrive
at clients after clients have already received cap import messages from
new auth MDS of the inode.
The quick fix is ignore MExportCaps when inode is frozen.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
assert(in);
assert(in->is_auth());
- /*
- * note: i may be frozen, but i won't have been encoded for export (yet)!
- * see export_go() vs export_go_synced().
- */
+
+ // FIXME
+ if (in->is_frozen())
+ return;
C_M_LoggedImportCaps *finish = new C_M_LoggedImportCaps(this, in, ex->get_source().num());
finish->client_map = ex->client_map;
map<client_t,uint64_t>& sseqmap)
{
dout(10) << "logged_import_caps on " << *in << dendl;
+ // see export_go() vs export_go_synced()
+ assert(in->is_auth());
// force open client sessions and finish cap import
mds->server->finish_force_open_sessions(client_map, sseqmap);