#define CEPH_MDS_FLAG_REPLAY 1 /* this is a replayed op */
#define CEPH_MDS_FLAG_WANT_DENTRY 2 /* want dentry in reply */
+#define CEPH_MDS_FLAG_ASYNC 4 /* request is async */
struct ceph_mds_request_head_legacy {
__le64 oldest_client_tid;
Session *session = mdr->session;
bool new_inode = (mdr->alloc_ino || mdr->used_prealloc_ino);
- // if replay, try to reconnect cap, and otherwise do nothing.
- if (new_inode && mdr->client_request->is_replay())
+ // if replay or async, try to reconnect cap, and otherwise do nothing.
+ if (new_inode && mdr->client_request->is_queued_for_replay())
return mds->mdcache->try_reconnect_cap(in, session);
// my needs
return;
}
bool queue_replay = false;
- if (req->is_replay()) {
+ if (req->is_replay() || req->is_async()) {
dout(3) << "queuing replayed op" << dendl;
queue_replay = true;
if (req->head.ino &&
bool is_replay() const {
return get_flags() & CEPH_MDS_FLAG_REPLAY;
}
+ bool is_async() const {
+ return get_flags() & CEPH_MDS_FLAG_ASYNC;
+ }
// normal fields
void set_stamp(utime_t t) { stamp = t; }
void set_replayed_op() {
head.flags = head.flags | CEPH_MDS_FLAG_REPLAY;
}
+ void set_async_op() {
+ head.flags = head.flags | CEPH_MDS_FLAG_ASYNC;
+ }
utime_t get_stamp() const { return stamp; }
ceph_tid_t get_oldest_client_tid() const { return head.oldest_client_tid; }
out << " " << stamp;
if (head.num_retry)
out << " RETRY=" << (int)head.num_retry;
- if (get_flags() & CEPH_MDS_FLAG_REPLAY)
+ if (is_async())
+ out << " ASYNC";
+ if (is_replay())
out << " REPLAY";
if (queued_for_replay)
out << " QUEUED_FOR_REPLAY";