Skip to content

Commit 3f55262

Browse files
authored
Merge pull request ceph#45955 from lxbsz/wip-55240
mds: trigger to flush the mdlog in handle_find_ino() Reviewed-by: Venky Shankar <[email protected]>
2 parents 450cdba + 5d6dd5d commit 3f55262

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/mds/MDCache.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9485,6 +9485,19 @@ void MDCache::handle_find_ino(const cref_t<MMDSFindIno> &m)
94859485
if (in) {
94869486
in->make_path(r->path);
94879487
dout(10) << " have " << r->path << " " << *in << dendl;
9488+
9489+
/*
9490+
* If the the CInode was just created by using openc in current
9491+
* auth MDS, but the client just sends a getattr request to another
9492+
* replica MDS. Then here it will make a path of '#INODE-NUMBER'
9493+
* only because the CInode hasn't been linked yet, and the replica
9494+
* MDS will keep retrying until the auth MDS flushes the mdlog and
9495+
* the C_MDS_openc_finish and link_primary_inode are called at most
9496+
* 5 seconds later.
9497+
*/
9498+
if (!in->get_parent_dn() && in->is_auth()) {
9499+
mds->mdlog->flush();
9500+
}
94889501
}
94899502
mds->send_message_mds(r, mds_rank_t(m->get_source().num()));
94909503
}

0 commit comments

Comments
 (0)