Skip to content
Permalink
Browse files

client: signal MDS to flush log when doing a syncfs

Fixes: http://tracker.ceph.com/issues/20129
Signed-off-by: dongdong tao <tdd21151186@gmail.com>
  • Loading branch information...
taodd committed Jun 8, 2017
1 parent 4c521c0 commit 3fa5dcb5fa563b90b0964638a56f81af91256cfe
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/client/Client.cc
@@ -5790,7 +5790,8 @@ void Client::_close_sessions()

void Client::flush_mdlog_sync()
{

if (mds_requests.empty())
return;
for (map<mds_rank_t,MetaSession*>::iterator p = mds_sessions.begin();
p != mds_sessions.end();
++p) {
@@ -5815,9 +5816,9 @@ void Client::unmount()
ldout(cct, 2) << "unmounting" << dendl;
unmounting = true;

flush_mdlog_sync(); // flush the mdlog for pending requests, if any
while (!mds_requests.empty()) {
ldout(cct, 10) << "waiting on " << mds_requests.size() << " requests" << dendl;
flush_mdlog_sync();
mount_cond.Wait(client_lock);
}

0 comments on commit 3fa5dcb

Please sign in to comment.
You can’t perform that action at this time.