The old condition makes no sense. It appears to have been broken since
2008, commit
a5d5e679? Yikes.
The problem is that a flushsnap will 'release' the caps, but still leave
an open Capability on the CInode. Then, CInode::encode_inodestat() would
& issued() when issuing caps, and a client ceph_open() would get no
caps. The kclient is fixed up to at least not crash in that case, but even
with the fix it deadlocked.
}
// remove cap _after_ do_cap_update() (which takes the Capability*)
- if (in->last <= follows) {
+ if (in->last < CEPH_NOSNAP) {
dout(10) << " flushsnap releasing cloned cap" << dendl;
in->remove_client_cap(client);
} else {