From 67b7fa318a05cf71b8617dc0cf06a0c2fbd31e90 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Wed, 9 Sep 2020 19:10:06 +0000 Subject: [PATCH] mds: add " (blacklisted)" to session reject error string Commit dfd01d765304 ("blacklist -> blocklist") introduced a regression for recover_session=clean mode of the kernel client. Unfortunately, one of the ways it detects blocklisting is by parsing the error string in the session reject message: 3320 if (err_str && strnstr(*p, "blacklisted", len)) 3321 *blacklisted = true; Add a suitable substring to restore the functionality. ceph-fuse doesn't care, as it just logs this string. Signed-off-by: Ilya Dryomov --- src/mds/Server.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 515f96bbeba6..7950d35f96d3 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -598,7 +598,12 @@ void Server::handle_client_session(const cref_t &m) if (blocklisted) { dout(10) << "rejecting blocklisted client " << addr << dendl; - send_reject_message("blocklisted"); + // This goes on the wire and the "blacklisted" substring is + // depended upon by the kernel client for detecting whether it + // has been blocklisted. If mounted with recover_session=clean + // (since 5.4), it tries to automatically recover itself from + // blocklisting. + send_reject_message("blocklisted (blacklisted)"); session->clear(); break; } -- 2.47.3