net : client only want latest osdmap. If the gap with the latest version exceeds the threshold, mon will send the fullosdmap instead of incremental osdmap
PATCH 1/1 net : client only want latest osdmap. If the gap with the latest version exceeds the threshold, mon will send the fullosdmap instead of incremental osdmap
Fix: https://tracker.ceph.com/issues/43421
Signed-off-by simon gao <[email protected]>
--- include/linux/ceph/ceph_fs.h | 1 + net/ceph/mon_client.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
include/linux/ceph/ceph_fs.h +1 -0
@@ -208,6 +208,7 @@ struct ceph_client_mount { } __attribute__ ((packed));#define CEPH_SUBSCRIBE_ONETIME 1/* i want only 1 update after have */ +#define CEPH_SUBSCRIBE_LATEST_OSDMAP 2 /* i want the latest fullmap, for client */ struct ceph_mon_subscribe_item {__le64 start;
net/ceph/mon_client.c +2 -1
@@ -349,7 +349,8 @@ static bool __ceph_monc_want_map(struct ceph_mon_client *monc, int sub, {__le64 start =cpu_to_le64 (epoch);u8 flags = !continuous ?CEPH_SUBSCRIBE_ONETIME :0 ; - +if (CEPH_SUB_OSDMAP == sub) + flags |= CEPH_SUBSCRIBE_LATEST_OSDMAPdout ("%s %s epoch %u continuous %d\n" , __func__, ceph_sub_str[sub], epoch, continuous);
Signature · 1 line
1.8.3.1
Ilya Dryomov
maintainerQuoted 13 lines · simon gao
Fix: https://tracker.ceph.com/issues/43421
Signed-off-by simon gao <[email protected]>--- include/linux/ceph/ceph_fs.h | 1 + net/ceph/mon_client.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)include/linux/ceph/ceph_fs.h +0
-0
include/linux/ceph/ceph_fs.h struct ceph_client_mount { · line 211
Quoted 4 lines
include/linux/ceph/ceph_fs.h +1
-0@@ -208,6 +208,7 @@ struct ceph_client_mount { } __attribute__ ((packed));#define CEPH_SUBSCRIBE_ONETIME 1/* i want only 1 update after have */ +#define CEPH_SUBSCRIBE_LATEST_OSDMAP 2/* i want the latest fullmap, for client */
Hi Simon,
Where is this flag introduced? Looks like it is mentioned in the comments of https://github.com/ceph/ceph/pull/32422, but it is not actually added anywhere I can see.
Quoted 8 lines
include/linux/ceph/ceph_fs.h +0
-0struct ceph_mon_subscribe_item {__le64 start;net/ceph/mon_client.c +0
-0
net/ceph/mon_client.c static bool __ceph_monc_want_map(struct ceph_mon_client *monc, int sub, · line 353
Quoted 6 lines
net/ceph/mon_client.c +2
-1@@ -349,7 +349,8 @@ static bool __ceph_monc_want_map(struct ceph_mon_client *monc, int sub, {__le64 start =cpu_to_le64 (epoch);u8 flags = !continuous ?CEPH_SUBSCRIBE_ONETIME :0 ; - +if (CEPH_SUB_OSDMAP == sub) + flags |=CEPH_SUBSCRIBE_LATEST_OSDMAP
This won't compile because of the missing semicolon.
Thanks,
Ilya