Sidharth noticed that we were probably doing more FLAG_SYNC cap flushes
than necessary.
This flag is intended for sync/fsync type activity, and in those cases
all we care about is cleaning dirty caps. We have no need to expedite
other types of cap calls (releases, revokes, etc.).
Fixes: https://tracker.ceph.com/issues/44963
Reported-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit
63e4ee0e9fe3654dcd680e7e8271870fbd295215)
}
int flushing;
+ int msg_flags = 0;
ceph_tid_t flush_tid;
if (in->auth_cap == &cap && in->dirty_caps) {
flushing = mark_caps_flushing(in, &flush_tid);
+ if (flags & CHECK_CAPS_SYNCHRONOUS)
+ msg_flags |= MClientCaps::FLAG_SYNC;
} else {
flushing = 0;
flush_tid = 0;
}
- int msg_flags = (flags & CHECK_CAPS_SYNCHRONOUS) ? MClientCaps::FLAG_SYNC : 0;
send_cap(in, session, &cap, msg_flags, cap_used, wanted, retain,
flushing, flush_tid);
}