This avoids excessive waits for the journal to flush on lock->sync
when a client request holds a wrlock. There's no reason to hurry.. if
someone needs it sync we can to the transition then; otherwise, it'll
happen when the wrlock is dropped.
// * -> sync?
else if (lock->get_state() != LOCK_SYNC &&
+ !lock->is_wrlocked() && // drain wrlocks first!
!in->filelock.is_waiter_for(SimpleLock::WAIT_WR) &&
!(wanted & (CEPH_CAP_GWR|CEPH_CAP_GBUFFER)) &&
!(in->get_state() == LOCK_MIX &&