The problem is if we revoke caps, nothing is dirty, but we do writeback
because we are adjusting max_size. Then we have to wait for the log to
flush even though the revocation should proceed immediately. To move
things along, flush the log immediately.
This still isn't ideal.. it would be nice to allow the locking to continue
and adjust max_size in parallel, but that isn't always possible, and will
require some more thought.
if (((dirty & (CEPH_CAP_FILE_EXCL|CEPH_CAP_FILE_WR)) && !in->filelock.is_stable()) ||
((dirty & CEPH_CAP_AUTH_EXCL) && !in->authlock.is_stable()) ||
((dirty & CEPH_CAP_XATTR_EXCL) && !in->xattrlock.is_stable()) ||
+ (!dirty && (!in->filelock.is_stable() || !in->authlock.is_stable() || !in->xattrlock.is_stable())) || // nothing dirty + unstable lock -> probably a revoke?
(change_max && new_max) || // max INCREASE
(cap->wanted() & ~cap->pending()))
mds->mdlog->flush();