From 1f92f55882f73f3a3f3da6e01f77a59442787ea9 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Sun, 11 May 2014 12:20:48 +0800 Subject: [PATCH] mds: cleanup usage of MDCache::predirty_journal_parent() The sixth parameter of MDCache::predirty_journal_parent() is 'int' with default value 0. Signed-off-by: Yan, Zheng --- src/mds/Locker.cc | 2 +- src/mds/Server.cc | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 2f0f5bdb234cc..5533ce5ea5bef 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -3875,7 +3875,7 @@ void Locker::scatter_writebehind(ScatterLock *lock) EUpdate *le = new EUpdate(mds->mdlog, "scatter_writebehind"); mds->mdlog->start_entry(le); - mdcache->predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY, false); + mdcache->predirty_journal_parents(mut, &le->metablob, in, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mut.get(), &le->metablob, in); in->finish_scatter_gather_update_accounted(lock->get_type(), mut, &le->metablob); diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 3043d94102087..8e879cd712738 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -3292,7 +3292,7 @@ void Server::handle_client_setattr(MDRequestRef& mdr) // log + wait 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->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur, @@ -3340,7 +3340,7 @@ void Server::do_open_truncate(MDRequestRef& mdr, int cmode) le->metablob.add_client_req(mdr->reqid, mdr->client_request->get_oldest_client_tid()); - mdcache->predirty_journal_parents(mdr, &le->metablob, in, 0, PREDIRTY_PRIMARY, false); + mdcache->predirty_journal_parents(mdr, &le->metablob, in, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, in); // make sure ino gets into the journal @@ -3435,7 +3435,7 @@ void Server::handle_client_setlayout(MDRequestRef& mdr) EUpdate *le = new EUpdate(mdlog, "setlayout"); 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->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); @@ -3511,7 +3511,7 @@ void Server::handle_client_setdirlayout(MDRequestRef& mdr) EUpdate *le = new EUpdate(mdlog, "setlayout"); 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->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); @@ -3700,7 +3700,7 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur, EUpdate *le = new EUpdate(mdlog, "set vxattr layout"); 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->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); @@ -3747,7 +3747,7 @@ void Server::handle_remove_vxattr(MDRequestRef& mdr, CInode *cur, EUpdate *le = new EUpdate(mdlog, "remove dir layout vxattr"); 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->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); @@ -3844,7 +3844,7 @@ void Server::handle_client_setxattr(MDRequestRef& mdr) EUpdate *le = new EUpdate(mdlog, "setxattr"); 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->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); @@ -3900,7 +3900,7 @@ void Server::handle_client_removexattr(MDRequestRef& mdr) EUpdate *le = new EUpdate(mdlog, "removexattr"); 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->predirty_journal_parents(mdr, &le->metablob, cur, 0, PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->metablob, cur); journal_and_reply(mdr, cur, 0, le, new C_MDS_inode_update_finish(mds, mdr, cur)); @@ -4531,7 +4531,7 @@ void Server::handle_slave_link_prep(MDRequestRef& mdr) dout(10) << " projected inode " << pi << " v " << pi->version << dendl; // commit case - mdcache->predirty_journal_parents(mdr, &le->commit, dnl->get_inode(), 0, PREDIRTY_SHALLOW|PREDIRTY_PRIMARY, 0); + mdcache->predirty_journal_parents(mdr, &le->commit, dnl->get_inode(), 0, PREDIRTY_SHALLOW|PREDIRTY_PRIMARY); mdcache->journal_dirty_inode(mdr.get(), &le->commit, targeti); // set up commit waiter -- 2.39.5