Commit 0cabbd94 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

libceph: fsmap.user subscription support

Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent f49d1e05
...@@ -121,6 +121,7 @@ struct ceph_dir_layout { ...@@ -121,6 +121,7 @@ struct ceph_dir_layout {
/* client <-> mds */ /* client <-> mds */
#define CEPH_MSG_MDS_MAP 21 #define CEPH_MSG_MDS_MAP 21
#define CEPH_MSG_FS_MAP_USER 103
#define CEPH_MSG_CLIENT_SESSION 22 #define CEPH_MSG_CLIENT_SESSION 22
#define CEPH_MSG_CLIENT_RECONNECT 23 #define CEPH_MSG_CLIENT_RECONNECT 23
......
...@@ -95,7 +95,7 @@ struct ceph_mon_client { ...@@ -95,7 +95,7 @@ struct ceph_mon_client {
struct ceph_mon_subscribe_item item; struct ceph_mon_subscribe_item item;
bool want; bool want;
u32 have; /* epoch */ u32 have; /* epoch */
} subs[3]; } subs[4];
int fs_cluster_id; /* "mdsmap.<id>" sub */ int fs_cluster_id; /* "mdsmap.<id>" sub */
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
...@@ -111,9 +111,10 @@ extern int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl); ...@@ -111,9 +111,10 @@ extern int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl);
extern void ceph_monc_stop(struct ceph_mon_client *monc); extern void ceph_monc_stop(struct ceph_mon_client *monc);
enum { enum {
CEPH_SUB_MDSMAP = 0, CEPH_SUB_MONMAP = 0,
CEPH_SUB_MONMAP,
CEPH_SUB_OSDMAP, CEPH_SUB_OSDMAP,
CEPH_SUB_FSMAP,
CEPH_SUB_MDSMAP,
}; };
extern const char *ceph_sub_str[]; extern const char *ceph_sub_str[];
......
...@@ -227,9 +227,10 @@ static void __schedule_delayed(struct ceph_mon_client *monc) ...@@ -227,9 +227,10 @@ static void __schedule_delayed(struct ceph_mon_client *monc)
} }
const char *ceph_sub_str[] = { const char *ceph_sub_str[] = {
[CEPH_SUB_MDSMAP] = "mdsmap",
[CEPH_SUB_MONMAP] = "monmap", [CEPH_SUB_MONMAP] = "monmap",
[CEPH_SUB_OSDMAP] = "osdmap", [CEPH_SUB_OSDMAP] = "osdmap",
[CEPH_SUB_FSMAP] = "fsmap.user",
[CEPH_SUB_MDSMAP] = "mdsmap",
}; };
/* /*
...@@ -1193,6 +1194,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con, ...@@ -1193,6 +1194,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,
case CEPH_MSG_MON_MAP: case CEPH_MSG_MON_MAP:
case CEPH_MSG_MDS_MAP: case CEPH_MSG_MDS_MAP:
case CEPH_MSG_OSD_MAP: case CEPH_MSG_OSD_MAP:
case CEPH_MSG_FS_MAP_USER:
m = ceph_msg_new(type, front_len, GFP_NOFS, false); m = ceph_msg_new(type, front_len, GFP_NOFS, false);
if (!m) if (!m)
return NULL; /* ENOMEM--return skip == 0 */ return NULL; /* ENOMEM--return skip == 0 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment