Skip to content

Commit

Permalink
client: don't embed cap releases in clientreplay
Browse files Browse the repository at this point in the history
If the client is sending replay requests, avoid sending embedded caps,
since the mds already has the client's caps from the reconnect.
This matches the behavior of the kernel client.

Fixes ceph#4742.
Signed-off-by: Sam Lang <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
Reviewed-by: Greg Farnum <[email protected]>
  • Loading branch information
6uv1s authored and Sage Weil committed Apr 26, 2013
1 parent a5cade1 commit 5121e56
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1574,15 +1574,16 @@ void Client::send_request(MetaRequest *request, MetaSession *session)
ldout(cct, 10) << "send_request rebuilding request " << request->get_tid()
<< " for mds." << mds << dendl;
MClientRequest *r = build_client_request(request);
if (request->dentry())
if (request->dentry()) {
r->set_dentry_wanted();
if (request->got_unsafe)
}
if (request->got_unsafe) {
r->set_replayed_op();
encode_cap_releases(request, mds);
r->releases.swap(request->cap_releases);
}
r->set_mdsmap_epoch(mdsmap->get_epoch());

encode_cap_releases(request, mds);
r->releases.swap(request->cap_releases);

if (request->mds == -1) {
request->sent_stamp = ceph_clock_now(cct);
ldout(cct, 20) << "send_request set sent_stamp to " << request->sent_stamp << dendl;
Expand Down

0 comments on commit 5121e56

Please sign in to comment.