summaryrefslogtreecommitdiffstats
path: root/src/messages/MClientSession.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messages/MClientSession.h')
-rw-r--r--src/messages/MClientSession.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/messages/MClientSession.h b/src/messages/MClientSession.h
index 7ce165870..37b3fc1d0 100644
--- a/src/messages/MClientSession.h
+++ b/src/messages/MClientSession.h
@@ -15,22 +15,25 @@
#ifndef CEPH_MCLIENTSESSION_H
#define CEPH_MCLIENTSESSION_H
+#include "mds/MDSAuthCaps.h"
#include "msg/Message.h"
#include "mds/mdstypes.h"
class MClientSession final : public SafeMessage {
private:
- static constexpr int HEAD_VERSION = 5;
+ static constexpr int HEAD_VERSION = 7;
static constexpr int COMPAT_VERSION = 1;
public:
ceph_mds_session_head head;
static constexpr unsigned SESSION_BLOCKLISTED = (1<<0);
- unsigned flags = 0;
+ uint32_t flags = 0;
std::map<std::string, std::string> metadata;
feature_bitset_t supported_features;
metric_spec_t metric_spec;
+ std::vector<MDSCapAuth> cap_auths;
+ ceph_tid_t oldest_client_tid = UINT64_MAX;
int get_op() const { return head.op; }
version_t get_seq() const { return head.seq; }
@@ -64,6 +67,8 @@ public:
out << " seq " << get_seq();
if (get_op() == CEPH_SESSION_RECALL_STATE)
out << " max_caps " << head.max_caps << " max_leases " << head.max_leases;
+ if (!cap_auths.empty())
+ out << " cap_auths " << cap_auths;
out << ")";
}
@@ -81,6 +86,12 @@ public:
if (header.version >= 5) {
decode(flags, p);
}
+ if (header.version >= 6) {
+ decode(cap_auths, p);
+ }
+ if (header.version >= 7) {
+ decode(oldest_client_tid, p);
+ }
}
void encode_payload(uint64_t features) override {
using ceph::encode;
@@ -96,6 +107,8 @@ public:
encode(supported_features, payload);
encode(metric_spec, payload);
encode(flags, payload);
+ encode(cap_auths, payload);
+ encode(oldest_client_tid, payload);
}
}
private: