* [PATCH] 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
@ 2020-07-10 10:39 simon gao
0 siblings, 0 replies; 2+ messages in thread
From: simon gao @ 2020-07-10 10:39 UTC (permalink / raw)
To: git; +Cc: simon gao
Fix: https://tracker.ceph.com/issues/43421
Signed-off-by: simon gao <simon29rock@gmail.com>
---
include/linux/ceph/ceph_fs.h | 1 +
net/ceph/mon_client.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index ebf5ba6..9dcc132 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -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;
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 3d8c801..b0d1ce6 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -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
dout("%s %s epoch %u continuous %d\n", __func__, ceph_sub_str[sub],
epoch, continuous);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] 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
@ 2020-07-10 10:41 simon gao
0 siblings, 0 replies; 2+ messages in thread
From: simon gao @ 2020-07-10 10:41 UTC (permalink / raw)
To: git; +Cc: simon gao
Fix: https://tracker.ceph.com/issues/43421
Signed-off-by: simon gao <simon29rock@gmail.com>
---
include/linux/ceph/ceph_fs.h | 1 +
net/ceph/mon_client.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index ebf5ba6..9dcc132 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -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;
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 3d8c801..8d67671 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -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;
dout("%s %s epoch %u continuous %d\n", __func__, ceph_sub_str[sub],
epoch, continuous);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-10 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 10:39 [PATCH] 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 simon gao
2020-07-10 10:41 simon gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).