// request to open a session (initial state of Session is `closed`)
if (!s) {
s = new Session;
+ s->info.auth_name = name;
s->info.inst.addr = con->get_peer_addr();
s->info.inst.name = n;
dout(10) << " new session " << s << " for " << s->info.inst << " con " << con << dendl;
*/
void session_info_t::encode(bufferlist& bl) const
{
- ENCODE_START(5, 3, bl);
+ ENCODE_START(6, 3, bl);
::encode(inst, bl);
::encode(completed_requests, bl);
::encode(prealloc_inos, bl); // hacky, see below.
::encode(used_inos, bl);
::encode(client_metadata, bl);
::encode(completed_flushes, bl);
+ ::encode(auth_name, bl);
ENCODE_FINISH(bl);
}
void session_info_t::decode(bufferlist::iterator& p)
{
- DECODE_START_LEGACY_COMPAT_LEN(4, 2, 2, p);
+ DECODE_START_LEGACY_COMPAT_LEN(6, 2, 2, p);
::decode(inst, p);
if (struct_v <= 2) {
set<ceph_tid_t> s;
if (struct_v >= 5) {
::decode(completed_flushes, p);
}
+ if (struct_v >= 6) {
+ ::decode(auth_name, p);
+ }
DECODE_FINISH(p);
}
#include "common/config.h"
#include "common/Clock.h"
#include "common/DecayCounter.h"
+#include "common/entity_name.h"
#include "MDSContext.h"
#include "include/frag.h"
interval_set<inodeno_t> used_inos; // journaling use
std::map<std::string, std::string> client_metadata;
std::set<ceph_tid_t> completed_flushes;
+ EntityName auth_name;
client_t get_client() const { return client_t(inst.name.num()); }