}
-void MDCache::do_realm_invalidate_and_update_notify(CInode *in, int snapop)
+void MDCache::do_realm_invalidate_and_update_notify(CInode *in, int snapop, bool nosend)
{
dout(10) << "do_realm_invalidate_and_update_notify " << *in->snaprealm << " " << *in << dendl;
p != realm->client_caps.end();
p++) {
assert(!p->second.empty());
- if (updates.count(p->first) == 0) {
+ if (!nosend && updates.count(p->first) == 0) {
MClientSnap *update = new MClientSnap(snapop);
update->head.split = in->ino();
update->split_inos = split_inos;
q.push_back(*p);
}
- send_snaps(updates);
+ if (!nosend)
+ send_snaps(updates);
}
void MDCache::_snaprealm_create_finish(MDRequest *mdr, Mutation *mut, CInode *in)
void process_reconnected_caps();
void prepare_realm_split(SnapRealm *realm, client_t client, inodeno_t ino,
map<client_t,MClientSnap*>& splits);
- void do_realm_invalidate_and_update_notify(CInode *in, int snapop);
+ void do_realm_invalidate_and_update_notify(CInode *in, int snapop, bool nosend=false);
void send_snaps(map<client_t,MClientSnap*>& splits);
void rejoin_import_cap(CInode *in, client_t client, ceph_mds_cap_reconnect& icr, int frommds);
void finish_snaprealm_reconnect(client_t client, SnapRealm *realm, snapid_t seq);
}
straydnl->get_inode()->snaprealm->add_past_parent(oldparent);
if (isnew)
- mdcache->do_realm_invalidate_and_update_notify(straydnl->get_inode(), CEPH_SNAP_OP_SPLIT);
+ mdcache->do_realm_invalidate_and_update_notify(straydnl->get_inode(), CEPH_SNAP_OP_SPLIT, true);
mdcache->touch_dentry_bottom(straydn);
}