{"thread":{"id":"53840","subject":"[PATCH] libceph : client only want latest osdmap. If the gap with the latest version exceeds the threshold, mon will send the fullosdmap instead of incremental osdmap","startedAt":"2020-07-11T01:59:12Z","lastAt":"2020-07-11T01:59:12Z","messageCount":1,"participants":["simon gao"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"401397","messageId":"1594432793-1451-1-git-send-email-simon29rock@gmail.com","threadId":"53840","inReplyTo":null,"subject":"[PATCH] libceph : client only want latest osdmap. If the gap with the latest version exceeds the threshold, mon will send the fullosdmap instead of incremental osdmap","fromName":"simon gao","fromEmail":"simon29rock@gmail.com","sentAt":"2020-07-11T01:59:53Z","receivedAt":"2020-07-11T01:59:12Z","isPatch":true,"sender":{"key":"simon29rock@gmail.com","avatar":null},"body":"Fix: https://tracker.ceph.com/issues/43421\nSigned-off-by: simon gao <simon29rock@gmail.com>\n---\n include/linux/ceph/ceph_fs.h | 1 +\n net/ceph/mon_client.c        | 3 ++-\n 2 files changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h\nindex ebf5ba6..9dcc132 100644\n--- a/include/linux/ceph/ceph_fs.h\n+++ b/include/linux/ceph/ceph_fs.h\n@@ -208,6 +208,7 @@ struct ceph_client_mount {\n } __attribute__ ((packed));\n \n #define CEPH_SUBSCRIBE_ONETIME    1  /* i want only 1 update after have */\n+#define CEPH_SUBSCRIBE_LATEST_OSDMAP   2  /* i want the latest fullmap, for client */ \n \n struct ceph_mon_subscribe_item {\n \t__le64 start;\ndiff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c\nindex 3d8c801..8d67671 100644\n--- a/net/ceph/mon_client.c\n+++ b/net/ceph/mon_client.c\n@@ -349,7 +349,8 @@ static bool __ceph_monc_want_map(struct ceph_mon_client *monc, int sub,\n {\n \t__le64 start = cpu_to_le64(epoch);\n \tu8 flags = !continuous ? CEPH_SUBSCRIBE_ONETIME : 0;\n-\n+\tif (CEPH_SUB_OSDMAP == sub)\n+            flags |= CEPH_SUBSCRIBE_LATEST_OSDMAP;\n \tdout(\"%s %s epoch %u continuous %d\\n\", __func__, ceph_sub_str[sub],\n \t     epoch, continuous);\n \n-- \n1.8.3.1\n\n"}]}