]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: allow lock state to be LOCK_MIX_SYNC in replica for filelock
authorXiubo Li <xiubli@redhat.com>
Tue, 28 Nov 2023 03:21:38 +0000 (11:21 +0800)
committerXiubo Li <xiubli@redhat.com>
Fri, 8 Dec 2023 01:03:34 +0000 (09:03 +0800)
When the auth MDS is transmitting state from LOCK_MIX to LOCK_SYNC
it will transmit the state to a intermidiate state LOCK_MIX_SYNC.
Then notifies the replicate MDSs and waits for the acks. But just
in case for some reasons the replicate MDSs couldn't successfully
transmit the state from LOCK_MIX to LOCK_MIX_SYNC and then
LOCK_MIX_SYNC2. And just the auth MDS failover or restart and
then resend the notification.

Fixes: https://tracker.ceph.com/issues/54833
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/Locker.cc

index b4a28fb8379fbdd1c40592bc6d19520ae0d26587..de5b920efaf4a551d75520e2d731e55512a1d57b 100644 (file)
@@ -5765,6 +5765,7 @@ void Locker::handle_file_lock(ScatterLock *lock, const cref_t<MLock> &m)
   case LOCK_AC_SYNC:
     ceph_assert(lock->get_state() == LOCK_LOCK ||
           lock->get_state() == LOCK_MIX ||
+          lock->get_state() == LOCK_MIX_SYNC ||
           lock->get_state() == LOCK_MIX_SYNC2);
     
     if (lock->get_state() == LOCK_MIX) {