From 321597e941fc4d1b5200a3ea3226a0f928349ff4 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 26 Nov 2018 16:17:23 -0800 Subject: [PATCH] mds: use uniform write handler for PQ MDS would go damaged after blacklisting the MDS caused the PQ to see a write error. Instead, just respawn and/or do usual write error handling (default r/o). Fixes: https://tracker.ceph.com/issues/37394 Signed-off-by: Patrick Donnelly (cherry picked from commit 2fb665194f61914711454c2084eb1539bd3588b5) Conflicts: src/msd/MDSRank.cc - use Mutex::Locker instead of std::lock_guard --- src/mds/MDSRank.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 1e8b024b8aeb6..f4cc0c3d51c31 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -77,9 +77,10 @@ MDSRank::MDSRank( // Purge Queue operates inside mds_lock when we're calling into // it, and outside when in background, so must handle both cases. if (mds_lock.is_locked_by_me()) { - damaged(); + handle_write_error(r); } else { - damaged_unlocked(); + Mutex::Locker l(mds_lock); + handle_write_error(r); } } ) -- 2.39.5