From 87991643b38b1a0e526b599b65bb010e66c08374 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Tue, 7 Nov 2017 12:39:49 +0800 Subject: [PATCH] mds: prevent filelock from being stuck at XSYN state 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" 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); -- 2.39.5