MDS crashes while journaling dirty root inode in handle_client_setxattr and handle_client_removexattr. We should use journal_dirty_inode to safely log root inode here. --- src/mds/Server.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 11ab834..1e62dd2 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -3907,8 +3907,7 @@ void Server::handle_client_setxattr(MDRequest *mdr) mdlog->start_entry(le); le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid()); mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false); - mdcache->journal_cow_inode(mdr, &le->metablob, cur); - le->metablob.add_primary_dentry(cur->get_projected_parent_dn(), true, cur); + mdcache->journal_dirty_inode(mdr, &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); } @@ -3964,8 +3963,7 @@ void Server::handle_client_removexattr(MDRequest *mdr) mdlog->start_entry(le); le->metablob.add_client_req(req->get_reqid(), req->get_oldest_client_tid()); mdcache->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY, false); - mdcache->journal_cow_inode(mdr, &le->metablob, cur); - le->metablob.add_primary_dentry(cur->get_projected_parent_dn(), true, cur); + mdcache->journal_dirty_inode(mdr, &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html