Lock:file_eval() does not properly handle the condition: filelock
is in XSYN state, both loner_cap and want_loner_cap are >= 0, and
loner_cap != want_loner_cap.
To set loner to the wanted one, mds need to revoke caps from the old
loner. Changing lock state to MIX can do the job.
Fixes: http://tracker.ceph.com/issues/22008
Signed-off-by: "Yan, Zheng" <zyan@redhat.com
!lock->is_rdlocked() &&
//!lock->is_waiter_for(SimpleLock::WAIT_WR) &&
(lock->get_scatter_wanted() ||
- (in->get_wanted_loner() < 0 && (wanted & CEPH_CAP_GWR)))) {
+ (in->get_target_loner() < 0 && (wanted & CEPH_CAP_GWR)))) {
dout(7) << "file_eval stable, bump to mixed " << *lock
<< " on " << *lock->get_parent() << dendl;
scatter_mix(lock, need_issue);