in->requested_max_size = in->wanted_max_size;
ldout(cct, 15) << "auth cap, setting max_size = " << in->requested_max_size << dendl;
}
+
+ if (!session->flushing_caps_tids.empty())
+ m->set_oldest_flush_tid(*session->flushing_caps_tids.begin());
+
session->con->send_message(m);
}
class MClientCaps : public Message {
- static const int HEAD_VERSION = 5;
+ static const int HEAD_VERSION = 6;
static const int COMPAT_VERSION = 1;
public:
// Receivers may not use their new caps until they have this OSD map
epoch_t osd_epoch_barrier;
+ ceph_tid_t oldest_flush_tid;
int get_caps() { return head.caps; }
int get_wanted() { return head.wanted; }
peer.flags = flags;
}
+ void set_oldest_flush_tid(ceph_tid_t tid) { oldest_flush_tid = tid; }
+ ceph_tid_t get_oldest_flush_tid() { return oldest_flush_tid; }
+
MClientCaps()
: Message(CEPH_MSG_CLIENT_CAPS, HEAD_VERSION, COMPAT_VERSION),
- osd_epoch_barrier(0) {
+ osd_epoch_barrier(0), oldest_flush_tid(0) {
inline_version = 0;
}
MClientCaps(int op,
int mseq,
epoch_t oeb)
: Message(CEPH_MSG_CLIENT_CAPS, HEAD_VERSION, COMPAT_VERSION),
- osd_epoch_barrier(oeb) {
+ osd_epoch_barrier(oeb), oldest_flush_tid(0) {
memset(&head, 0, sizeof(head));
head.op = op;
head.ino = ino;
if (header.version >= 5) {
::decode(osd_epoch_barrier, p);
}
+ if (header.version >= 6) {
+ ::decode(oldest_flush_tid, p);
+ }
}
void encode_payload(uint64_t features) {
header.version = HEAD_VERSION;
}
::encode(osd_epoch_barrier, payload);
+ ::encode(oldest_flush_tid, payload);
}
};