mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
Merge pull request #45955 from lxbsz/wip-55240
mds: trigger to flush the mdlog in handle_find_ino() Reviewed-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
commit
3f55262ea9
@ -9485,6 +9485,19 @@ void MDCache::handle_find_ino(const cref_t<MMDSFindIno> &m)
|
||||
if (in) {
|
||||
in->make_path(r->path);
|
||||
dout(10) << " have " << r->path << " " << *in << dendl;
|
||||
|
||||
/*
|
||||
* If the the CInode was just created by using openc in current
|
||||
* auth MDS, but the client just sends a getattr request to another
|
||||
* replica MDS. Then here it will make a path of '#INODE-NUMBER'
|
||||
* only because the CInode hasn't been linked yet, and the replica
|
||||
* MDS will keep retrying until the auth MDS flushes the mdlog and
|
||||
* the C_MDS_openc_finish and link_primary_inode are called at most
|
||||
* 5 seconds later.
|
||||
*/
|
||||
if (!in->get_parent_dn() && in->is_auth()) {
|
||||
mds->mdlog->flush();
|
||||
}
|
||||
}
|
||||
mds->send_message_mds(r, mds_rank_t(m->get_source().num()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user