Skip to contentSkip to conversation

libceph, rbd, ceph: "blacklist" -> "blocklist"

PATCH In review Ilya Dryomov 2 participants 7 messages Sep 15, 2020 – Sep 16, 2020

Subsystems (5)
lore
Share & tools
lore

Ilya Dryomov

author maintainer
#0 lore raw

cover libceph, rbd, ceph: "blacklist" -> "blocklist"

Hello,

This switches the kernel client to the conscious language. Two instances of "blacklist" remain because they are part of the on-wire
format: the "osd blacklist add" monitor command used as a fallback and the session reject error string. The latter is to be addressed in the near future:

https://tracker.ceph.com/issues/47450

Thanks,

Ilya

Ilya Dryomov (3):
libceph, rbd, ceph: "blacklist" -> "blocklist"
libceph: switch to the new "osd blocklist add" command
ceph: add a note explaining session reject error string

 Documentation/filesystems/ceph.rst |  6 +--
 drivers/block/rbd.c                |  8 ++--
 fs/ceph/addr.c                     | 24 +++++------
 fs/ceph/file.c                     |  4 +-
 fs/ceph/mds_client.c               | 20 +++++----
 fs/ceph/super.c                    |  4 +-
 fs/ceph/super.h                    |  4 +-
 include/linux/ceph/mon_client.h    |  2 +-
 include/linux/ceph/rados.h         |  2 +-
 net/ceph/mon_client.c              | 67 +++++++++++++++++++++++-------
 10 files changed, 90 insertions(+), 51 deletions(-)
Signature · 1 line
2.19.2
author maintainer
#1 lore raw

PATCH 1/3 libceph, rbd, ceph: "blacklist" -> "blocklist"

---
 Documentation/filesystems/ceph.rst |  6 +++---
 drivers/block/rbd.c                |  8 ++++----
 fs/ceph/addr.c                     | 24 ++++++++++++------------
 fs/ceph/file.c                     |  4 ++--
 fs/ceph/mds_client.c               | 16 ++++++++--------
 fs/ceph/super.c                    |  4 ++--
 fs/ceph/super.h                    |  4 ++--
 include/linux/ceph/mon_client.h    |  2 +-
 include/linux/ceph/rados.h         |  2 +-
 net/ceph/mon_client.c              |  8 ++++----
 10 files changed, 39 insertions(+), 39 deletions(-)
Documentation/filesystems/ceph.rst +3 -3
index 0aa70750df0f..7d2ef4e27273 100644
@@ -163,14 +163,14 @@ Mount Options
         to the default VFS implementation if this option is used.
 
   recover_session=<no|clean>
-	Set auto reconnect mode in the case where the client is blacklisted. The
+	Set auto reconnect mode in the case where the client is blocklisted. The
 	available modes are "no" and "clean". The default is "no".
 
 	* no: never attempt to reconnect when client detects that it has been
-	  blacklisted. Operations will generally fail after being blacklisted.
+	  blocklisted. Operations will generally fail after being blocklisted.
 
 	* clean: client reconnects to the ceph cluster automatically when it
-	  detects that it has been blacklisted. During reconnect, client drops
+	  detects that it has been blocklisted. During reconnect, client drops
 	  dirty data/metadata, invalidates page caches and writable file handles.
 	  After reconnect, file locks become stale because the MDS loses track
 	  of them. If an inode contains any stale file locks, read/write on the
drivers/block/rbd.c +4 -4
index 180587ce606c..d21fecfe3eba 100644
@@ -4010,10 +4010,10 @@ static int rbd_try_lock(struct rbd_device *rbd_dev)
 		rbd_warn(rbd_dev, "breaking header lock owned by %s%llu",
 			 ENTITY_NAME(lockers[0].id.name));
 
-		ret = ceph_monc_blacklist_add(&client->monc,
+		ret = ceph_monc_blocklist_add(&client->monc,
 					      &lockers[0].info.addr);
 		if (ret) {
-			rbd_warn(rbd_dev, "blacklist of %s%llu failed: %d",
+			rbd_warn(rbd_dev, "blocklist of %s%llu failed: %d",
 				 ENTITY_NAME(lockers[0].id.name), ret);
 			goto out;
 		}
@@ -4077,7 +4077,7 @@ static int rbd_try_acquire_lock(struct rbd_device *rbd_dev)
 	ret = rbd_try_lock(rbd_dev);
 	if (ret < 0) {
 		rbd_warn(rbd_dev, "failed to lock header: %d", ret);
-		if (ret == -EBLACKLISTED)
+		if (ret == -EBLOCKLISTED)
 			goto out;
 
 		ret = 1; /* request lock anyway */
@@ -4613,7 +4613,7 @@ static void rbd_reregister_watch(struct work_struct *work)
 	ret = __rbd_register_watch(rbd_dev);
 	if (ret) {
 		rbd_warn(rbd_dev, "failed to reregister watch: %d", ret);
-		if (ret != -EBLACKLISTED && ret != -ENOENT) {
+		if (ret != -EBLOCKLISTED && ret != -ENOENT) {
 			queue_delayed_work(rbd_dev->task_wq,
 					   &rbd_dev->watch_dwork,
 					   RBD_RETRY_DELAY);
fs/ceph/addr.c +12 -12
index b03dbaa9d345..7b1f3dad576f 100644
@@ -271,8 +271,8 @@ static int ceph_do_readpage(struct file *filp, struct page *page)
 	if (err < 0) {
 		SetPageError(page);
 		ceph_fscache_readpage_cancel(inode, page);
-		if (err == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err == -EBLOCKLISTED)
+			fsc->blocklisted = true;
 		goto out;
 	}
 	if (err < PAGE_SIZE)
@@ -312,8 +312,8 @@ static void finish_read(struct ceph_osd_request *req)
 	int i;
 
 	dout("finish_read %p req %p rc %d bytes %d\n", inode, req, rc, bytes);
-	if (rc == -EBLACKLISTED)
-		ceph_inode_to_client(inode)->blacklisted = true;
+	if (rc == -EBLOCKLISTED)
+		ceph_inode_to_client(inode)->blocklisted = true;
 
 	/* unlock all pages, zeroing any data we didn't read */
 	osd_data = osd_req_op_extent_osd_data(req, 0);
@@ -737,8 +737,8 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
 			end_page_writeback(page);
 			return err;
 		}
-		if (err == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err == -EBLOCKLISTED)
+			fsc->blocklisted = true;
 		dout("writepage setting page/mapping error %d %p\n",
 		     err, page);
 		mapping_set_error(&inode->i_data, err);
@@ -801,8 +801,8 @@ static void writepages_finish(struct ceph_osd_request *req)
 	if (rc < 0) {
 		mapping_set_error(mapping, rc);
 		ceph_set_error_write(ci);
-		if (rc == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (rc == -EBLOCKLISTED)
+			fsc->blocklisted = true;
 	} else {
 		ceph_clear_error_write(ci);
 	}
@@ -2038,16 +2038,16 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci,
 	if (err >= 0 || err == -ENOENT)
 		have |= POOL_READ;
 	else if (err != -EPERM) {
-		if (err == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err == -EBLOCKLISTED)
+			fsc->blocklisted = true;
 		goto out_unlock;
 	}
 
 	if (err2 == 0 || err2 == -EEXIST)
 		have |= POOL_WRITE;
 	else if (err2 != -EPERM) {
-		if (err2 == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err2 == -EBLOCKLISTED)
+			fsc->blocklisted = true;
 		err = err2;
 		goto out_unlock;
 	}
fs/ceph/file.c +2 -2
index 762a280b7037..209535d5b8d3 100644
@@ -933,8 +933,8 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
 		ceph_release_page_vector(pages, num_pages);
 
 		if (ret < 0) {
-			if (ret == -EBLACKLISTED)
-				fsc->blacklisted = true;
+			if (ret == -EBLOCKLISTED)
+				fsc->blocklisted = true;
 			break;
 		}
 
fs/ceph/mds_client.c +8 -8
index 76d8d9495d1d..bb2d938a17ac 100644
@@ -3303,7 +3303,7 @@ static void handle_forward(struct ceph_mds_client *mdsc,
 }
 
 static int __decode_session_metadata(void **p, void *end,
-				     bool *blacklisted)
+				     bool *blocklisted)
 {
 	/* map<string,string> */
 	u32 n;
@@ -3318,7 +3318,7 @@ static int __decode_session_metadata(void **p, void *end,
 		ceph_decode_32_safe(p, end, len, bad);
 		ceph_decode_need(p, end, len, bad);
 		if (err_str && strnstr(*p, "blacklisted", len))
-			*blacklisted = true;
+			*blocklisted = true;
 		*p += len;
 	}
 	return 0;
@@ -3341,7 +3341,7 @@ static void handle_session(struct ceph_mds_session *session,
 	u32 op;
 	u64 seq, features = 0;
 	int wake = 0;
-	bool blacklisted = false;
+	bool blocklisted = false;
 
 	/* decode */
 	ceph_decode_need(&p, end, sizeof(*h), bad);
@@ -3354,7 +3354,7 @@ static void handle_session(struct ceph_mds_session *session,
 	if (msg_version >= 3) {
 		u32 len;
 		/* version >= 2, metadata */
-		if (__decode_session_metadata(&p, end, &blacklisted) < 0)
+		if (__decode_session_metadata(&p, end, &blocklisted) < 0)
 			goto bad;
 		/* version >= 3, feature bits */
 		ceph_decode_32_safe(&p, end, len, bad);
@@ -3445,8 +3445,8 @@ static void handle_session(struct ceph_mds_session *session,
 		session->s_state = CEPH_MDS_SESSION_REJECTED;
 		cleanup_session_requests(mdsc, session);
 		remove_session_caps(session);
-		if (blacklisted)
-			mdsc->fsc->blacklisted = true;
+		if (blocklisted)
+			mdsc->fsc->blocklisted = true;
 		wake = 2; /* for good measure */
 		break;
 
@@ -4367,14 +4367,14 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)
 	if (READ_ONCE(fsc->mount_state) != CEPH_MOUNT_MOUNTED)
 		return;
 
-	if (!READ_ONCE(fsc->blacklisted))
+	if (!READ_ONCE(fsc->blocklisted))
 		return;
 
 	if (fsc->last_auto_reconnect &&
 	    time_before(jiffies, fsc->last_auto_reconnect + HZ * 60 * 30))
 		return;
 
-	pr_info("auto reconnect after blacklisted\n");
+	pr_info("auto reconnect after blocklisted\n");
 	fsc->last_auto_reconnect = jiffies;
 	ceph_force_reconnect(fsc->sb);
 }
fs/ceph/super.c +2 -2
index b3fc9bb61afc..2516304379d3 100644
@@ -1241,13 +1241,13 @@ int ceph_force_reconnect(struct super_block *sb)
 	 * see remove_session_caps_cb() */
 	flush_workqueue(fsc->inode_wq);
 
-	/* In case that we were blacklisted. This also reset
+	/* In case that we were blocklisted. This also reset
 	 * all mon/osd connections */
 	ceph_reset_client_addr(fsc->client);
 
 	ceph_osdc_clear_abort_err(&fsc->client->osdc);
 
-	fsc->blacklisted = false;
+	fsc->blocklisted = false;
 	fsc->mount_state = CEPH_MOUNT_MOUNTED;
 
 	if (sb->s_root) {
fs/ceph/super.h +2 -2
index 483a52d281cd..582694899130 100644
@@ -32,7 +32,7 @@
 #define CEPH_BLOCK_SHIFT   22  /* 4 MB */
 #define CEPH_BLOCK         (1 << CEPH_BLOCK_SHIFT)
 
-#define CEPH_MOUNT_OPT_CLEANRECOVER    (1<<1) /* auto reonnect (clean mode) after blacklisted */
+#define CEPH_MOUNT_OPT_CLEANRECOVER    (1<<1) /* auto reonnect (clean mode) after blocklisted */
 #define CEPH_MOUNT_OPT_DIRSTAT         (1<<4) /* `cat dirname` for stats */
 #define CEPH_MOUNT_OPT_RBYTES          (1<<5) /* dir st_bytes = rbytes */
 #define CEPH_MOUNT_OPT_NOASYNCREADDIR  (1<<7) /* no dcache readdir */
@@ -109,7 +109,7 @@ struct ceph_fs_client {
 	unsigned long mount_state;
 
 	unsigned long last_auto_reconnect;
-	bool blacklisted;
+	bool blocklisted;
 
 	bool have_copy_from2;
 
include/linux/ceph/mon_client.h +1 -1
index ce4ffeb384d7..b658961156a0 100644
@@ -142,7 +142,7 @@ int ceph_monc_get_version(struct ceph_mon_client *monc, const char *what,
 int ceph_monc_get_version_async(struct ceph_mon_client *monc, const char *what,
 				ceph_monc_callback_t cb, u64 private_data);
 
-int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
+int ceph_monc_blocklist_add(struct ceph_mon_client *monc,
 			    struct ceph_entity_addr *client_addr);
 
 extern int ceph_monc_open_session(struct ceph_mon_client *monc);
include/linux/ceph/rados.h +1 -1
index 3a518fd0eaad..43a7a1573b51 100644
@@ -424,7 +424,7 @@ enum {
 };
 
 #define EOLDSNAPC    ERESTART  /* ORDERSNAP flag set; writer has old snapc*/
-#define EBLACKLISTED ESHUTDOWN /* blacklisted */
+#define EBLOCKLISTED ESHUTDOWN /* blocklisted */
 
 /* xattr comparison */
 enum {
net/ceph/mon_client.c +4 -4
index d633a0aeaa55..efcdde471278 100644
@@ -896,7 +896,7 @@ static void handle_command_ack(struct ceph_mon_client *monc,
 	ceph_msg_dump(msg);
 }
 
-int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
+int ceph_monc_blocklist_add(struct ceph_mon_client *monc,
 			    struct ceph_entity_addr *client_addr)
 {
 	struct ceph_mon_generic_request *req;
@@ -936,9 +936,9 @@ int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
 	ret = wait_generic_request(req);
 	if (!ret)
 		/*
-		 * Make sure we have the osdmap that includes the blacklist
+		 * Make sure we have the osdmap that includes the blocklist
 		 * entry.  This is needed to ensure that the OSDs pick up the
-		 * new blacklist before processing any future requests from
+		 * new blocklist before processing any future requests from
 		 * this client.
 		 */
 		ret = ceph_wait_for_latest_osdmap(monc->client, 0);
@@ -947,7 +947,7 @@ int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
 	put_generic_request(req);
 	return ret;
 }
-EXPORT_SYMBOL(ceph_monc_blacklist_add);
+EXPORT_SYMBOL(ceph_monc_blocklist_add);
 
 /*
  * Resend pending generic requests.
Signature · 1 line
2.19.2
author maintainer
#6 lore raw

PATCH 3/3 ceph: add a note explaining session reject error string

In reply to Ilya Dryomov

error_string key in the metadata map of MClientSession message is intended for humans, but unfortunately became part of the on-wire format with the introduction of recover_session=clean mode in commit 131d7eb4faa1 ("ceph: auto reconnect after blacklisted").

---
 fs/ceph/mds_client.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/ceph/mds_client.c +4 -0
index bb2d938a17ac..08f1c0c31dc2 100644
@@ -3317,6 +3317,10 @@ static int __decode_session_metadata(void **p, void *end,
 		*p += len;
 		ceph_decode_32_safe(p, end, len, bad);
 		ceph_decode_need(p, end, len, bad);
+		/*
+		 * Match "blocklisted (blacklisted)" from newer MDSes,
+		 * or "blacklisted" from older MDSes.
+		 */
 		if (err_str && strnstr(*p, "blacklisted", len))
 			*blocklisted = true;
 		*p += len;
Signature · 1 line
2.19.2
author maintainer
#5 lore raw

PATCH 2/3 libceph: switch to the new "osd blocklist add" command

In reply to Ilya Dryomov
---
 net/ceph/mon_client.c | 65 +++++++++++++++++++++++++++++++++----------
 1 file changed, 50 insertions(+), 15 deletions(-)
net/ceph/mon_client.c +50 -15
index efcdde471278..32bce480f8e4 100644
@@ -896,8 +896,8 @@ static void handle_command_ack(struct ceph_mon_client *monc,
 	ceph_msg_dump(msg);
 }
 
-int ceph_monc_blocklist_add(struct ceph_mon_client *monc,
-			    struct ceph_entity_addr *client_addr)
+static int do_mon_command_vargs(struct ceph_mon_client *monc,
+				const char *fmt, va_list ap)
 {
 	struct ceph_mon_generic_request *req;
 	struct ceph_mon_command *h;
@@ -925,28 +925,63 @@ int ceph_monc_blocklist_add(struct ceph_mon_client *monc,
 	h->monhdr.session_mon_tid = 0;
 	h->fsid = monc->monmap->fsid;
 	h->num_strs = cpu_to_le32(1);
-	len = sprintf(h->str, "{ \"prefix\": \"osd blacklist\", \
-		                 \"blacklistop\": \"add\", \
-				 \"addr\": \"%pISpc/%u\" }",
-		      &client_addr->in_addr, le32_to_cpu(client_addr->nonce));
+	len = vsprintf(h->str, fmt, ap);
 	h->str_len = cpu_to_le32(len);
 	send_generic_request(monc, req);
 	mutex_unlock(&monc->mutex);
 
 	ret = wait_generic_request(req);
-	if (!ret)
-		/*
-		 * Make sure we have the osdmap that includes the blocklist
-		 * entry.  This is needed to ensure that the OSDs pick up the
-		 * new blocklist before processing any future requests from
-		 * this client.
-		 */
-		ret = ceph_wait_for_latest_osdmap(monc->client, 0);
-
 out:
 	put_generic_request(req);
 	return ret;
 }
+
+static int do_mon_command(struct ceph_mon_client *monc, const char *fmt, ...)
+{
+	va_list ap;
+	int ret;
+
+	va_start(ap, fmt);
+	ret = do_mon_command_vargs(monc, fmt, ap);
+	va_end(ap);
+	return ret;
+}
+
+int ceph_monc_blocklist_add(struct ceph_mon_client *monc,
+			    struct ceph_entity_addr *client_addr)
+{
+	int ret;
+
+	ret = do_mon_command(monc,
+			     "{ \"prefix\": \"osd blocklist\", \
+				\"blocklistop\": \"add\", \
+				\"addr\": \"%pISpc/%u\" }",
+			     &client_addr->in_addr,
+			     le32_to_cpu(client_addr->nonce));
+	if (ret == -EINVAL) {
+		/*
+		 * The monitor returns EINVAL on an unrecognized command.
+		 * Try the legacy command -- it is exactly the same except
+		 * for the name.
+		 */
+		ret = do_mon_command(monc,
+				     "{ \"prefix\": \"osd blacklist\", \
+					\"blacklistop\": \"add\", \
+					\"addr\": \"%pISpc/%u\" }",
+				     &client_addr->in_addr,
+				     le32_to_cpu(client_addr->nonce));
+	}
+	if (ret)
+		return ret;
+
+	/*
+	 * Make sure we have the osdmap that includes the blocklist
+	 * entry.  This is needed to ensure that the OSDs pick up the
+	 * new blocklist before processing any future requests from
+	 * this client.
+	 */
+	return ceph_wait_for_latest_osdmap(monc->client, 0);
+}
 EXPORT_SYMBOL(ceph_monc_blocklist_add);
 
 /*
Signature · 1 line
2.19.2
#2 lore raw
In reply to Ilya Dryomov
Quoted 169 lines · Ilya Dryomov
---
  Documentation/filesystems/ceph.rst |  6 +++---
  drivers/block/rbd.c                |  8 ++++----
  fs/ceph/addr.c                     | 24 ++++++++++++------------
  fs/ceph/file.c                     |  4 ++--
  fs/ceph/mds_client.c               | 16 ++++++++--------
  fs/ceph/super.c                    |  4 ++--
  fs/ceph/super.h                    |  4 ++--
  include/linux/ceph/mon_client.h    |  2 +-
  include/linux/ceph/rados.h         |  2 +-
  net/ceph/mon_client.c              |  8 ++++----
  10 files changed, 39 insertions(+), 39 deletions(-)
Documentation/filesystems/ceph.rst +3 -3
index 0aa70750df0f..7d2ef4e27273 100644
@@ -163,14 +163,14 @@ Mount Options
          to the default VFS implementation if this option is used.
 
    recover_session=<no|clean>
-	Set auto reconnect mode in the case where the client is blacklisted. The
+	Set auto reconnect mode in the case where the client is blocklisted. The
  	available modes are "no" and "clean". The default is "no".
 
  	* no: never attempt to reconnect when client detects that it has been
-	  blacklisted. Operations will generally fail after being blacklisted.
+	  blocklisted. Operations will generally fail after being blocklisted.
 
  	* clean: client reconnects to the ceph cluster automatically when it
-	  detects that it has been blacklisted. During reconnect, client drops
+	  detects that it has been blocklisted. During reconnect, client drops
  	  dirty data/metadata, invalidates page caches and writable file handles.
  	  After reconnect, file locks become stale because the MDS loses track
  	  of them. If an inode contains any stale file locks, read/write on the
drivers/block/rbd.c +4 -4
index 180587ce606c..d21fecfe3eba 100644
@@ -4010,10 +4010,10 @@ static int rbd_try_lock(struct rbd_device *rbd_dev)
  		rbd_warn(rbd_dev, "breaking header lock owned by %s%llu",
  			 ENTITY_NAME(lockers[0].id.name));
 
-		ret = ceph_monc_blacklist_add(&client->monc,
+		ret = ceph_monc_blocklist_add(&client->monc,
  					      &lockers[0].info.addr);
  		if (ret) {
-			rbd_warn(rbd_dev, "blacklist of %s%llu failed: %d",
+			rbd_warn(rbd_dev, "blocklist of %s%llu failed: %d",
  				 ENTITY_NAME(lockers[0].id.name), ret);
  			goto out;
  		}
@@ -4077,7 +4077,7 @@ static int rbd_try_acquire_lock(struct rbd_device *rbd_dev)
  	ret = rbd_try_lock(rbd_dev);
  	if (ret < 0) {
  		rbd_warn(rbd_dev, "failed to lock header: %d", ret);
-		if (ret == -EBLACKLISTED)
+		if (ret == -EBLOCKLISTED)
  			goto out;
 
  		ret = 1; /* request lock anyway */
@@ -4613,7 +4613,7 @@ static void rbd_reregister_watch(struct work_struct *work)
  	ret = __rbd_register_watch(rbd_dev);
  	if (ret) {
  		rbd_warn(rbd_dev, "failed to reregister watch: %d", ret);
-		if (ret != -EBLACKLISTED && ret != -ENOENT) {
+		if (ret != -EBLOCKLISTED && ret != -ENOENT) {
  			queue_delayed_work(rbd_dev->task_wq,
  					   &rbd_dev->watch_dwork,
  					   RBD_RETRY_DELAY);
fs/ceph/addr.c +12 -12
index b03dbaa9d345..7b1f3dad576f 100644
@@ -271,8 +271,8 @@ static int ceph_do_readpage(struct file *filp, struct page *page)
  	if (err < 0) {
  		SetPageError(page);
  		ceph_fscache_readpage_cancel(inode, page);
-		if (err == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err == -EBLOCKLISTED)
+			fsc->blocklisted = true;
  		goto out;
  	}
  	if (err < PAGE_SIZE)
@@ -312,8 +312,8 @@ static void finish_read(struct ceph_osd_request *req)
  	int i;
 
  	dout("finish_read %p req %p rc %d bytes %d\n", inode, req, rc, bytes);
-	if (rc == -EBLACKLISTED)
-		ceph_inode_to_client(inode)->blacklisted = true;
+	if (rc == -EBLOCKLISTED)
+		ceph_inode_to_client(inode)->blocklisted = true;
 
  	/* unlock all pages, zeroing any data we didn't read */
  	osd_data = osd_req_op_extent_osd_data(req, 0);
@@ -737,8 +737,8 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
  			end_page_writeback(page);
  			return err;
  		}
-		if (err == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err == -EBLOCKLISTED)
+			fsc->blocklisted = true;
  		dout("writepage setting page/mapping error %d %p\n",
  		     err, page);
  		mapping_set_error(&inode->i_data, err);
@@ -801,8 +801,8 @@ static void writepages_finish(struct ceph_osd_request *req)
  	if (rc < 0) {
  		mapping_set_error(mapping, rc);
  		ceph_set_error_write(ci);
-		if (rc == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (rc == -EBLOCKLISTED)
+			fsc->blocklisted = true;
  	} else {
  		ceph_clear_error_write(ci);
  	}
@@ -2038,16 +2038,16 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci,
  	if (err >= 0 || err == -ENOENT)
  		have |= POOL_READ;
  	else if (err != -EPERM) {
-		if (err == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err == -EBLOCKLISTED)
+			fsc->blocklisted = true;
  		goto out_unlock;
  	}
 
  	if (err2 == 0 || err2 == -EEXIST)
  		have |= POOL_WRITE;
  	else if (err2 != -EPERM) {
-		if (err2 == -EBLACKLISTED)
-			fsc->blacklisted = true;
+		if (err2 == -EBLOCKLISTED)
+			fsc->blocklisted = true;
  		err = err2;
  		goto out_unlock;
  	}
fs/ceph/file.c +2 -2
index 762a280b7037..209535d5b8d3 100644
@@ -933,8 +933,8 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
  		ceph_release_page_vector(pages, num_pages);
 
  		if (ret < 0) {
-			if (ret == -EBLACKLISTED)
-				fsc->blacklisted = true;
+			if (ret == -EBLOCKLISTED)
+				fsc->blocklisted = true;
  			break;
  		}
 
fs/ceph/mds_client.c +1 -1
index 76d8d9495d1d..bb2d938a17ac 100644
@@ -3303,7 +3303,7 @@ static void handle_forward(struct ceph_mds_client *mdsc,
  }
 
  static int __decode_session_metadata(void **p, void *end,
-				     bool *blacklisted)
+				     bool *blocklisted)
  {
  	/* map<string,string> */
  	u32 n;

fs/ceph/mds_client.c static int __decode_session_metadata(void **p, void *end, · line 3320

Quoted 3 lines
fs/ceph/mds_client.c +0 -0
@@ -3318,7 +3318,7 @@ static int __decode_session_metadata(void **p, void *end,
  		ceph_decode_32_safe(p, end, len, bad);
  		ceph_decode_need(p, end, len, bad);
  		if (err_str && strnstr(*p, "blacklisted", len))

BTW, for new MDS shouldn't we check "blocklisted" first ? And then "blacklisted" ?

https://github.com/ceph/ceph/blob/master/src/mds/Server.cc#L617

BRs

Quoted 153 lines
fs/ceph/mds_client.c +7 -7
-			*blacklisted = true;
+			*blocklisted = true;
  		*p += len;
  	}
  	return 0;
@@ -3341,7 +3341,7 @@ static void handle_session(struct ceph_mds_session *session,
  	u32 op;
  	u64 seq, features = 0;
  	int wake = 0;
-	bool blacklisted = false;
+	bool blocklisted = false;
 
  	/* decode */
  	ceph_decode_need(&p, end, sizeof(*h), bad);
@@ -3354,7 +3354,7 @@ static void handle_session(struct ceph_mds_session *session,
  	if (msg_version >= 3) {
  		u32 len;
  		/* version >= 2, metadata */
-		if (__decode_session_metadata(&p, end, &blacklisted) < 0)
+		if (__decode_session_metadata(&p, end, &blocklisted) < 0)
  			goto bad;
  		/* version >= 3, feature bits */
  		ceph_decode_32_safe(&p, end, len, bad);
@@ -3445,8 +3445,8 @@ static void handle_session(struct ceph_mds_session *session,
  		session->s_state = CEPH_MDS_SESSION_REJECTED;
  		cleanup_session_requests(mdsc, session);
  		remove_session_caps(session);
-		if (blacklisted)
-			mdsc->fsc->blacklisted = true;
+		if (blocklisted)
+			mdsc->fsc->blocklisted = true;
  		wake = 2; /* for good measure */
  		break;
 
@@ -4367,14 +4367,14 @@ static void maybe_recover_session(struct ceph_mds_client *mdsc)
  	if (READ_ONCE(fsc->mount_state) != CEPH_MOUNT_MOUNTED)
  		return;
 
-	if (!READ_ONCE(fsc->blacklisted))
+	if (!READ_ONCE(fsc->blocklisted))
  		return;
 
  	if (fsc->last_auto_reconnect &&
  	    time_before(jiffies, fsc->last_auto_reconnect + HZ * 60 * 30))
  		return;
 
-	pr_info("auto reconnect after blacklisted\n");
+	pr_info("auto reconnect after blocklisted\n");
  	fsc->last_auto_reconnect = jiffies;
  	ceph_force_reconnect(fsc->sb);
  }
fs/ceph/super.c +2 -2
index b3fc9bb61afc..2516304379d3 100644
@@ -1241,13 +1241,13 @@ int ceph_force_reconnect(struct super_block *sb)
  	 * see remove_session_caps_cb() */
  	flush_workqueue(fsc->inode_wq);
 
-	/* In case that we were blacklisted. This also reset
+	/* In case that we were blocklisted. This also reset
  	 * all mon/osd connections */
  	ceph_reset_client_addr(fsc->client);
 
  	ceph_osdc_clear_abort_err(&fsc->client->osdc);
 
-	fsc->blacklisted = false;
+	fsc->blocklisted = false;
  	fsc->mount_state = CEPH_MOUNT_MOUNTED;
 
  	if (sb->s_root) {
fs/ceph/super.h +2 -2
index 483a52d281cd..582694899130 100644
@@ -32,7 +32,7 @@
  #define CEPH_BLOCK_SHIFT   22  /* 4 MB */
  #define CEPH_BLOCK         (1 << CEPH_BLOCK_SHIFT)
 
-#define CEPH_MOUNT_OPT_CLEANRECOVER    (1<<1) /* auto reonnect (clean mode) after blacklisted */
+#define CEPH_MOUNT_OPT_CLEANRECOVER    (1<<1) /* auto reonnect (clean mode) after blocklisted */
  #define CEPH_MOUNT_OPT_DIRSTAT         (1<<4) /* `cat dirname` for stats */
  #define CEPH_MOUNT_OPT_RBYTES          (1<<5) /* dir st_bytes = rbytes */
  #define CEPH_MOUNT_OPT_NOASYNCREADDIR  (1<<7) /* no dcache readdir */
@@ -109,7 +109,7 @@ struct ceph_fs_client {
  	unsigned long mount_state;
 
  	unsigned long last_auto_reconnect;
-	bool blacklisted;
+	bool blocklisted;
 
  	bool have_copy_from2;
 
include/linux/ceph/mon_client.h +1 -1
index ce4ffeb384d7..b658961156a0 100644
@@ -142,7 +142,7 @@ int ceph_monc_get_version(struct ceph_mon_client *monc, const char *what,
  int ceph_monc_get_version_async(struct ceph_mon_client *monc, const char *what,
  				ceph_monc_callback_t cb, u64 private_data);
 
-int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
+int ceph_monc_blocklist_add(struct ceph_mon_client *monc,
  			    struct ceph_entity_addr *client_addr);
 
  extern int ceph_monc_open_session(struct ceph_mon_client *monc);
include/linux/ceph/rados.h +1 -1
index 3a518fd0eaad..43a7a1573b51 100644
@@ -424,7 +424,7 @@ enum {
  };
 
  #define EOLDSNAPC    ERESTART  /* ORDERSNAP flag set; writer has old snapc*/
-#define EBLACKLISTED ESHUTDOWN /* blacklisted */
+#define EBLOCKLISTED ESHUTDOWN /* blocklisted */
 
  /* xattr comparison */
  enum {
net/ceph/mon_client.c +4 -4
index d633a0aeaa55..efcdde471278 100644
@@ -896,7 +896,7 @@ static void handle_command_ack(struct ceph_mon_client *monc,
  	ceph_msg_dump(msg);
  }
 
-int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
+int ceph_monc_blocklist_add(struct ceph_mon_client *monc,
  			    struct ceph_entity_addr *client_addr)
  {
  	struct ceph_mon_generic_request *req;
@@ -936,9 +936,9 @@ int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
  	ret = wait_generic_request(req);
  	if (!ret)
  		/*
-		 * Make sure we have the osdmap that includes the blacklist
+		 * Make sure we have the osdmap that includes the blocklist
  		 * entry.  This is needed to ensure that the OSDs pick up the
-		 * new blacklist before processing any future requests from
+		 * new blocklist before processing any future requests from
  		 * this client.
  		 */
  		ret = ceph_wait_for_latest_osdmap(monc->client, 0);
@@ -947,7 +947,7 @@ int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
  	put_generic_request(req);
  	return ret;
  }
-EXPORT_SYMBOL(ceph_monc_blacklist_add);
+EXPORT_SYMBOL(ceph_monc_blocklist_add);
 
  /*
   * Resend pending generic requests.
author maintainer
#3 lore raw
Quoted 178 lines · Xiubo Li
Quoted 169 lines · Ilya Dryomov
---
  Documentation/filesystems/ceph.rst |  6 +++---
  drivers/block/rbd.c                |  8 ++++----
  fs/ceph/addr.c                     | 24 ++++++++++++------------
  fs/ceph/file.c                     |  4 ++--
  fs/ceph/mds_client.c               | 16 ++++++++--------
  fs/ceph/super.c                    |  4 ++--
  fs/ceph/super.h                    |  4 ++--
  include/linux/ceph/mon_client.h    |  2 +-
  include/linux/ceph/rados.h         |  2 +-
  net/ceph/mon_client.c              |  8 ++++----
  10 files changed, 39 insertions(+), 39 deletions(-)
Documentation/filesystems/ceph.rst +3 -3
index 0aa70750df0f..7d2ef4e27273 100644
@@ -163,14 +163,14 @@ Mount Options
          to the default VFS implementation if this option is used.
 
    recover_session=<no|clean>
-     Set auto reconnect mode in the case where the client is blacklisted. The
+     Set auto reconnect mode in the case where the client is blocklisted. The
      available modes are "no" and "clean". The default is "no".
 
      * no: never attempt to reconnect when client detects that it has been
-       blacklisted. Operations will generally fail after being blacklisted.
+       blocklisted. Operations will generally fail after being blocklisted.
 
      * clean: client reconnects to the ceph cluster automatically when it
-       detects that it has been blacklisted. During reconnect, client drops
+       detects that it has been blocklisted. During reconnect, client drops
        dirty data/metadata, invalidates page caches and writable file handles.
        After reconnect, file locks become stale because the MDS loses track
        of them. If an inode contains any stale file locks, read/write on the
drivers/block/rbd.c +4 -4
index 180587ce606c..d21fecfe3eba 100644
@@ -4010,10 +4010,10 @@ static int rbd_try_lock(struct rbd_device *rbd_dev)
              rbd_warn(rbd_dev, "breaking header lock owned by %s%llu",
                       ENTITY_NAME(lockers[0].id.name));
 
-             ret = ceph_monc_blacklist_add(&client->monc,
+             ret = ceph_monc_blocklist_add(&client->monc,
                                            &lockers[0].info.addr);
              if (ret) {
-                     rbd_warn(rbd_dev, "blacklist of %s%llu failed: %d",
+                     rbd_warn(rbd_dev, "blocklist of %s%llu failed: %d",
                               ENTITY_NAME(lockers[0].id.name), ret);
                      goto out;
              }
@@ -4077,7 +4077,7 @@ static int rbd_try_acquire_lock(struct rbd_device *rbd_dev)
      ret = rbd_try_lock(rbd_dev);
      if (ret < 0) {
              rbd_warn(rbd_dev, "failed to lock header: %d", ret);
-             if (ret == -EBLACKLISTED)
+             if (ret == -EBLOCKLISTED)
                      goto out;
 
              ret = 1; /* request lock anyway */
@@ -4613,7 +4613,7 @@ static void rbd_reregister_watch(struct work_struct *work)
      ret = __rbd_register_watch(rbd_dev);
      if (ret) {
              rbd_warn(rbd_dev, "failed to reregister watch: %d", ret);
-             if (ret != -EBLACKLISTED && ret != -ENOENT) {
+             if (ret != -EBLOCKLISTED && ret != -ENOENT) {
                      queue_delayed_work(rbd_dev->task_wq,
                                         &rbd_dev->watch_dwork,
                                         RBD_RETRY_DELAY);
fs/ceph/addr.c +12 -12
index b03dbaa9d345..7b1f3dad576f 100644
@@ -271,8 +271,8 @@ static int ceph_do_readpage(struct file *filp, struct page *page)
      if (err < 0) {
              SetPageError(page);
              ceph_fscache_readpage_cancel(inode, page);
-             if (err == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
              goto out;
      }
      if (err < PAGE_SIZE)
@@ -312,8 +312,8 @@ static void finish_read(struct ceph_osd_request *req)
      int i;
 
      dout("finish_read %p req %p rc %d bytes %d\n", inode, req, rc, bytes);
-     if (rc == -EBLACKLISTED)
-             ceph_inode_to_client(inode)->blacklisted = true;
+     if (rc == -EBLOCKLISTED)
+             ceph_inode_to_client(inode)->blocklisted = true;
 
      /* unlock all pages, zeroing any data we didn't read */
      osd_data = osd_req_op_extent_osd_data(req, 0);
@@ -737,8 +737,8 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
                      end_page_writeback(page);
                      return err;
              }
-             if (err == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
              dout("writepage setting page/mapping error %d %p\n",
                   err, page);
              mapping_set_error(&inode->i_data, err);
@@ -801,8 +801,8 @@ static void writepages_finish(struct ceph_osd_request *req)
      if (rc < 0) {
              mapping_set_error(mapping, rc);
              ceph_set_error_write(ci);
-             if (rc == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (rc == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
      } else {
              ceph_clear_error_write(ci);
      }
@@ -2038,16 +2038,16 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci,
      if (err >= 0 || err == -ENOENT)
              have |= POOL_READ;
      else if (err != -EPERM) {
-             if (err == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
              goto out_unlock;
      }
 
      if (err2 == 0 || err2 == -EEXIST)
              have |= POOL_WRITE;
      else if (err2 != -EPERM) {
-             if (err2 == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err2 == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
              err = err2;
              goto out_unlock;
      }
fs/ceph/file.c +2 -2
index 762a280b7037..209535d5b8d3 100644
@@ -933,8 +933,8 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
              ceph_release_page_vector(pages, num_pages);
 
              if (ret < 0) {
-                     if (ret == -EBLACKLISTED)
-                             fsc->blacklisted = true;
+                     if (ret == -EBLOCKLISTED)
+                             fsc->blocklisted = true;
                      break;
              }
 
fs/ceph/mds_client.c +1 -1
index 76d8d9495d1d..bb2d938a17ac 100644
@@ -3303,7 +3303,7 @@ static void handle_forward(struct ceph_mds_client *mdsc,
  }
 
  static int __decode_session_metadata(void **p, void *end,
-                                  bool *blacklisted)
+                                  bool *blocklisted)
  {
      /* map<string,string> */
      u32 n;

fs/ceph/mds_client.c static int __decode_session_metadata(void **p, void *end, · line 3320

Quoted 3 lines
fs/ceph/mds_client.c +0 -0
@@ -3318,7 +3318,7 @@ static int __decode_session_metadata(void **p, void *end,
              ceph_decode_32_safe(p, end, len, bad);
              ceph_decode_need(p, end, len, bad);
              if (err_str && strnstr(*p, "blacklisted", len))

BTW, for new MDS shouldn't we check "blocklisted" first ? And then "blacklisted" ?

Quoted 1 line

https://github.com/ceph/ceph/blob/master/src/mds/Server.cc#L617

We could, but it would be fixed in a better way by [1], see [2] for context.

[1] https://tracker.ceph.com/issues/47450
[2] https://github.com/ceph/ceph/pull/37072

Thanks,

Ilya

#4 lore raw
Quoted 177 lines · Ilya Dryomov
Quoted 176 lines · Xiubo Li
Quoted 169 lines · Ilya Dryomov
---
   Documentation/filesystems/ceph.rst |  6 +++---
   drivers/block/rbd.c                |  8 ++++----
   fs/ceph/addr.c                     | 24 ++++++++++++------------
   fs/ceph/file.c                     |  4 ++--
   fs/ceph/mds_client.c               | 16 ++++++++--------
   fs/ceph/super.c                    |  4 ++--
   fs/ceph/super.h                    |  4 ++--
   include/linux/ceph/mon_client.h    |  2 +-
   include/linux/ceph/rados.h         |  2 +-
   net/ceph/mon_client.c              |  8 ++++----
   10 files changed, 39 insertions(+), 39 deletions(-)
Documentation/filesystems/ceph.rst +3 -3
index 0aa70750df0f..7d2ef4e27273 100644
@@ -163,14 +163,14 @@ Mount Options
           to the default VFS implementation if this option is used.
 
     recover_session=<no|clean>
-     Set auto reconnect mode in the case where the client is blacklisted. The
+     Set auto reconnect mode in the case where the client is blocklisted. The
       available modes are "no" and "clean". The default is "no".
 
       * no: never attempt to reconnect when client detects that it has been
-       blacklisted. Operations will generally fail after being blacklisted.
+       blocklisted. Operations will generally fail after being blocklisted.
 
       * clean: client reconnects to the ceph cluster automatically when it
-       detects that it has been blacklisted. During reconnect, client drops
+       detects that it has been blocklisted. During reconnect, client drops
         dirty data/metadata, invalidates page caches and writable file handles.
         After reconnect, file locks become stale because the MDS loses track
         of them. If an inode contains any stale file locks, read/write on the
drivers/block/rbd.c +4 -4
index 180587ce606c..d21fecfe3eba 100644
@@ -4010,10 +4010,10 @@ static int rbd_try_lock(struct rbd_device *rbd_dev)
               rbd_warn(rbd_dev, "breaking header lock owned by %s%llu",
                        ENTITY_NAME(lockers[0].id.name));
 
-             ret = ceph_monc_blacklist_add(&client->monc,
+             ret = ceph_monc_blocklist_add(&client->monc,
                                             &lockers[0].info.addr);
               if (ret) {
-                     rbd_warn(rbd_dev, "blacklist of %s%llu failed: %d",
+                     rbd_warn(rbd_dev, "blocklist of %s%llu failed: %d",
                                ENTITY_NAME(lockers[0].id.name), ret);
                       goto out;
               }
@@ -4077,7 +4077,7 @@ static int rbd_try_acquire_lock(struct rbd_device *rbd_dev)
       ret = rbd_try_lock(rbd_dev);
       if (ret < 0) {
               rbd_warn(rbd_dev, "failed to lock header: %d", ret);
-             if (ret == -EBLACKLISTED)
+             if (ret == -EBLOCKLISTED)
                       goto out;
 
               ret = 1; /* request lock anyway */
@@ -4613,7 +4613,7 @@ static void rbd_reregister_watch(struct work_struct *work)
       ret = __rbd_register_watch(rbd_dev);
       if (ret) {
               rbd_warn(rbd_dev, "failed to reregister watch: %d", ret);
-             if (ret != -EBLACKLISTED && ret != -ENOENT) {
+             if (ret != -EBLOCKLISTED && ret != -ENOENT) {
                       queue_delayed_work(rbd_dev->task_wq,
                                          &rbd_dev->watch_dwork,
                                          RBD_RETRY_DELAY);
fs/ceph/addr.c +12 -12
index b03dbaa9d345..7b1f3dad576f 100644
@@ -271,8 +271,8 @@ static int ceph_do_readpage(struct file *filp, struct page *page)
       if (err < 0) {
               SetPageError(page);
               ceph_fscache_readpage_cancel(inode, page);
-             if (err == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
               goto out;
       }
       if (err < PAGE_SIZE)
@@ -312,8 +312,8 @@ static void finish_read(struct ceph_osd_request *req)
       int i;
 
       dout("finish_read %p req %p rc %d bytes %d\n", inode, req, rc, bytes);
-     if (rc == -EBLACKLISTED)
-             ceph_inode_to_client(inode)->blacklisted = true;
+     if (rc == -EBLOCKLISTED)
+             ceph_inode_to_client(inode)->blocklisted = true;
 
       /* unlock all pages, zeroing any data we didn't read */
       osd_data = osd_req_op_extent_osd_data(req, 0);
@@ -737,8 +737,8 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
                       end_page_writeback(page);
                       return err;
               }
-             if (err == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
               dout("writepage setting page/mapping error %d %p\n",
                    err, page);
               mapping_set_error(&inode->i_data, err);
@@ -801,8 +801,8 @@ static void writepages_finish(struct ceph_osd_request *req)
       if (rc < 0) {
               mapping_set_error(mapping, rc);
               ceph_set_error_write(ci);
-             if (rc == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (rc == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
       } else {
               ceph_clear_error_write(ci);
       }
@@ -2038,16 +2038,16 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci,
       if (err >= 0 || err == -ENOENT)
               have |= POOL_READ;
       else if (err != -EPERM) {
-             if (err == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
               goto out_unlock;
       }
 
       if (err2 == 0 || err2 == -EEXIST)
               have |= POOL_WRITE;
       else if (err2 != -EPERM) {
-             if (err2 == -EBLACKLISTED)
-                     fsc->blacklisted = true;
+             if (err2 == -EBLOCKLISTED)
+                     fsc->blocklisted = true;
               err = err2;
               goto out_unlock;
       }
fs/ceph/file.c +2 -2
index 762a280b7037..209535d5b8d3 100644
@@ -933,8 +933,8 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
               ceph_release_page_vector(pages, num_pages);
 
               if (ret < 0) {
-                     if (ret == -EBLACKLISTED)
-                             fsc->blacklisted = true;
+                     if (ret == -EBLOCKLISTED)
+                             fsc->blocklisted = true;
                       break;
               }
 
fs/ceph/mds_client.c +1 -1
index 76d8d9495d1d..bb2d938a17ac 100644
@@ -3303,7 +3303,7 @@ static void handle_forward(struct ceph_mds_client *mdsc,
   }
 
   static int __decode_session_metadata(void **p, void *end,
-                                  bool *blacklisted)
+                                  bool *blocklisted)
   {
       /* map<string,string> */
       u32 n;

fs/ceph/mds_client.c static int __decode_session_metadata(void **p, void *end, · line 3320

Quoted 3 lines
fs/ceph/mds_client.c +0 -0
@@ -3318,7 +3318,7 @@ static int __decode_session_metadata(void **p, void *end,
               ceph_decode_32_safe(p, end, len, bad);
               ceph_decode_need(p, end, len, bad);
               if (err_str && strnstr(*p, "blacklisted", len))

BTW, for new MDS shouldn't we check "blocklisted" first ? And then "blacklisted" ?

Quoted 6 lines
Quoted 1 line

https://github.com/ceph/ceph/blob/master/src/mds/Server.cc#L617

We could, but it would be fixed in a better way by [1], see [2] for context.

[1] https://tracker.ceph.com/issues/47450
[2] https://github.com/ceph/ceph/pull/37072

Yeah, that fix is cool.

Thanks

Quoted 4 lines

Thanks,

Ilya