Skip to content

Commit

Permalink
mds: send unlinked dentry's inode attributes in the reply trace for u…
Browse files Browse the repository at this point in the history
…nlink

When an inode has multiple dentries (i.e. is hardlinked) then it won't
necessarily get dropped from the cache after an unlink. The MDS doesn't
currently send the updated target inode info in the UNLINK reply traces
however. Have it do that in all unlink replies -- the inode is almost
certainly already in-core so there's little cost to doing so.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
  • Loading branch information
jtlayton committed Jul 26, 2016
1 parent 6051032 commit 592b890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mds/Server.cc
Expand Up @@ -5639,7 +5639,7 @@ void Server::_unlink_local(MDRequestRef& mdr, CDentry *dn, CDentry *straydn)
mdcache->project_subtree_rename(in, dn->get_dir(), straydn->get_dir());
}

journal_and_reply(mdr, 0, dn, le, new C_MDS_unlink_local_finish(mds, mdr, dn, straydn));
journal_and_reply(mdr, in, dn, le, new C_MDS_unlink_local_finish(mds, mdr, dn, straydn));
}

void Server::_unlink_local_finish(MDRequestRef& mdr,
Expand Down

0 comments on commit 592b890

Please sign in to comment.