]>
git.proxmox.com Git - ceph.git/blob - ceph/src/client/MetaRequest.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #include "include/types.h"
5 #include "client/MetaRequest.h"
6 #include "client/Dentry.h"
7 #include "client/Inode.h"
8 #include "messages/MClientReply.h"
9 #include "common/Formatter.h"
11 void MetaRequest::dump(Formatter
*f
) const
13 auto age
= std::chrono::duration
<double>(ceph_clock_now() - op_stamp
);
15 f
->dump_unsigned("tid", tid
);
16 f
->dump_string("op", ceph_mds_op_name(head
.op
));
17 f
->dump_stream("path") << path
;
18 f
->dump_stream("path2") << path2
;
20 f
->dump_stream("ino") << _inode
->ino
;
22 f
->dump_stream("old_ino") << _old_inode
->ino
;
24 f
->dump_stream("other_ino") << _other_inode
->ino
;
26 f
->dump_stream("target_ino") << target
->ino
;
28 f
->dump_string("dentry", _dentry
->name
);
30 f
->dump_string("old_dentry", _old_dentry
->name
);
31 f
->dump_stream("hint_ino") << inodeno_t(head
.ino
);
33 f
->dump_stream("sent_stamp") << sent_stamp
;
34 f
->dump_float("age", age
.count());
35 f
->dump_int("mds", mds
);
36 f
->dump_int("resend_mds", resend_mds
);
37 f
->dump_int("send_to_auth", send_to_auth
);
38 f
->dump_unsigned("sent_on_mseq", sent_on_mseq
);
39 f
->dump_int("retry_attempt", retry_attempt
);
41 f
->dump_int("got_unsafe", got_unsafe
);
43 f
->dump_unsigned("uid", head
.caller_uid
);
44 f
->dump_unsigned("gid", head
.caller_gid
);
46 f
->dump_unsigned("oldest_client_tid", head
.oldest_client_tid
);
47 f
->dump_unsigned("mdsmap_epoch", head
.mdsmap_epoch
);
48 f
->dump_unsigned("flags", head
.flags
);
49 f
->dump_unsigned("num_retry", head
.ext_num_retry
);
50 f
->dump_unsigned("num_fwd", head
.ext_num_fwd
);
51 f
->dump_unsigned("num_releases", head
.num_releases
);
53 f
->dump_int("abort_rc", abort_rc
);
56 MetaRequest::~MetaRequest()
64 void MetaRequest::set_dentry(Dentry
*d
) {
65 ceph_assert(_dentry
== NULL
);
69 Dentry
*MetaRequest::dentry() {
73 void MetaRequest::set_old_dentry(Dentry
*d
) {
74 ceph_assert(_old_dentry
== NULL
);
78 Dentry
*MetaRequest::old_dentry() {