}
-void Client::check_caps(Inode *in, bool is_delayed)
+/**
+ * check_caps
+ *
+ * Examine currently used and wanted versus held caps. Release, flush or ack
+ * revoked caps to the MDS as appropriate.
+ *
+ * @param in the inode to check
+ * @param no_delay whether we should delay sending caps
+ */
+void Client::check_caps(Inode *in, bool no_delay)
{
unsigned wanted = in->caps_wanted();
unsigned used = get_caps_used(in);
<< " used " << ccap_string(used)
<< " issued " << ccap_string(issued)
<< " revoking " << ccap_string(revoking)
- << " is_delayed=" << is_delayed
+ << " no_delay=" << no_delay
<< dendl;
if (in->snapid != CEPH_NOSNAP)
if (!in->cap_snaps.empty())
flush_snaps(in);
- if (!is_delayed)
- cap_delay_requeue(in);
- else
+ if (no_delay)
in->hold_caps_until = utime_t();
+ else
+ cap_delay_requeue(in);
utime_t now = ceph_clock_now(cct);
void send_cap(Inode *in, MetaSession *session, Cap *cap,
int used, int want, int retain, int flush,
ceph_tid_t flush_tid);
- void check_caps(Inode *in, bool is_delayed);
+ void check_caps(Inode *in, bool immediate);
void get_cap_ref(Inode *in, int cap);
void put_cap_ref(Inode *in, int cap);
void flush_snaps(Inode *in, bool all_again=false);