m->change_attr = in->change_attr;
if (sync)
m->flags |= MClientCaps::FLAG_SYNC;
- if (in->cap_snaps.empty())
- m->flags |= MClientCaps::FLAG_NO_CAPSNAP;
- else
+ if (!in->cap_snaps.empty())
m->flags |= MClientCaps::FLAG_PENDING_CAPSNAP;
if (flush & CEPH_CAP_FILE_WR) {
// released all WR/EXCL caps (the FLUSHSNAP always comes before the cap
// update/release).
if (!head_in->client_need_snapflush.empty()) {
- if ((m->flags & MClientCaps::FLAG_NO_CAPSNAP) ||
- (!(cap->issued() & CEPH_CAP_ANY_FILE_WR) &&
- !(m->flags & MClientCaps::FLAG_PENDING_CAPSNAP))) {
+ if (!(cap->issued() & CEPH_CAP_ANY_FILE_WR) &&
+ !(m->flags & MClientCaps::FLAG_PENDING_CAPSNAP)) {
head_in->auth_pin(this); // prevent subtree frozen
need_unpin = true;
_do_null_snapflush(head_in, client);
dout(10) << " revocation in progress, not making any conclusions about null snapflushes" << dendl;
}
}
- if (cap->need_snapflush() && (m->flags & MClientCaps::FLAG_NO_CAPSNAP))
+ if (cap->need_snapflush() && !(m->flags & MClientCaps::FLAG_PENDING_CAPSNAP))
cap->clear_needsnapflush();
if (m->get_dirty() && in->is_auth()) {
public:
static const unsigned FLAG_SYNC = (1<<0);
- static const unsigned FLAG_NO_CAPSNAP = (1<<1);
+ static const unsigned FLAG_NO_CAPSNAP = (1<<1); // unused
static const unsigned FLAG_PENDING_CAPSNAP = (1<<2);
struct ceph_mds_caps_head head;