mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-14 00:55:17 -04:00
libceph: embed ceph messenger structure in ceph_client
A ceph client has a pointer to a ceph messenger structure in it. There is always exactly one ceph messenger for a ceph client, so there is no need to allocate it separate from the ceph client structure. Switch the ceph_client structure to embed its ceph_messenger structure. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
e22004235a
commit
15d9882c33
7 changed files with 26 additions and 45 deletions
|
@ -131,7 +131,7 @@ struct ceph_client {
|
|||
u32 supported_features;
|
||||
u32 required_features;
|
||||
|
||||
struct ceph_messenger *msgr; /* messenger instance */
|
||||
struct ceph_messenger msgr; /* messenger instance */
|
||||
struct ceph_mon_client monc;
|
||||
struct ceph_osd_client osdc;
|
||||
|
||||
|
|
|
@ -211,10 +211,11 @@ extern int ceph_msgr_init(void);
|
|||
extern void ceph_msgr_exit(void);
|
||||
extern void ceph_msgr_flush(void);
|
||||
|
||||
extern struct ceph_messenger *ceph_messenger_create(
|
||||
struct ceph_entity_addr *myaddr,
|
||||
u32 features, u32 required);
|
||||
extern void ceph_messenger_destroy(struct ceph_messenger *);
|
||||
extern void ceph_messenger_init(struct ceph_messenger *msgr,
|
||||
struct ceph_entity_addr *myaddr,
|
||||
u32 supported_features,
|
||||
u32 required_features,
|
||||
bool nocrc);
|
||||
|
||||
extern void ceph_con_init(struct ceph_messenger *msgr,
|
||||
struct ceph_connection *con);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue