Skip to content

Commit

Permalink
Merge pull request #9716 from xiexingguo/xxg-wip-server_droppinlock2
Browse files Browse the repository at this point in the history
Server: drop locks and auth pins if wait for pending truncate

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
  • Loading branch information
John Spray committed Jul 25, 2016
2 parents 1194331 + 8fbefdd commit 55691af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mds/Server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3004,6 +3004,8 @@ void Server::handle_client_open(MDRequestRef& mdr)
if (pi->is_truncating()) {
dout(10) << " waiting for pending truncate from " << pi->truncate_from
<< " to " << pi->truncate_size << " to complete on " << *cur << dendl;
mds->locker->drop_locks(mdr.get());
mdr->drop_local_auth_pins();
cur->add_waiter(CInode::WAIT_TRUNC, new C_MDS_RetryRequest(mdcache, mdr));
return;
}
Expand Down

0 comments on commit 55691af

Please sign in to comment.