Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
messenger.c File Reference
#include <linux/ceph/ceph_debug.h>
#include <linux/crc32c.h>
#include <linux/ctype.h>
#include <linux/highmem.h>
#include <linux/inet.h>
#include <linux/kthread.h>
#include <linux/net.h>
#include <linux/slab.h>
#include <linux/socket.h>
#include <linux/string.h>
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/dns_resolver.h>
#include <net/tcp.h>
#include <linux/ceph/libceph.h>
#include <linux/ceph/messenger.h>
#include <linux/ceph/decode.h>
#include <linux/ceph/pagelist.h>
#include <linux/export.h>

Go to the source code of this file.

Macros

#define CON_SOCK_STATE_NEW   0 /* -> CLOSED */
 
#define CON_SOCK_STATE_CLOSED   1 /* -> CONNECTING */
 
#define CON_SOCK_STATE_CONNECTING   2 /* -> CONNECTED or -> CLOSING */
 
#define CON_SOCK_STATE_CONNECTED   3 /* -> CLOSING or -> CLOSED */
 
#define CON_SOCK_STATE_CLOSING   4 /* -> CLOSED */
 
#define CON_STATE_CLOSED   1 /* -> PREOPEN */
 
#define CON_STATE_PREOPEN   2 /* -> CONNECTING, CLOSED */
 
#define CON_STATE_CONNECTING   3 /* -> NEGOTIATING, CLOSED */
 
#define CON_STATE_NEGOTIATING   4 /* -> OPEN, CLOSED */
 
#define CON_STATE_OPEN   5 /* -> STANDBY, CLOSED */
 
#define CON_STATE_STANDBY   6 /* -> PREOPEN, CLOSED */
 
#define CON_FLAG_LOSSYTX
 
#define CON_FLAG_KEEPALIVE_PENDING   1 /* we need to send a keepalive */
 
#define CON_FLAG_WRITE_PENDING   2 /* we have data ready to send */
 
#define CON_FLAG_SOCK_CLOSED   3 /* socket state changed to closed */
 
#define CON_FLAG_BACKOFF   4 /* need to retry queuing delayed work */
 
#define SKIP_BUF_SIZE   1024
 
#define ADDR_STR_COUNT_LOG   5 /* log2(# address strings in array) */
 
#define ADDR_STR_COUNT   (1 << ADDR_STR_COUNT_LOG)
 
#define ADDR_STR_COUNT_MASK   (ADDR_STR_COUNT - 1)
 
#define MAX_ADDR_STR_LEN   64 /* 54 is enough */
 

Functions

const charceph_pr_addr (const struct sockaddr_storage *ss)
 
 EXPORT_SYMBOL (ceph_pr_addr)
 
void _ceph_msgr_exit (void)
 
int ceph_msgr_init (void)
 
 EXPORT_SYMBOL (ceph_msgr_init)
 
void ceph_msgr_exit (void)
 
 EXPORT_SYMBOL (ceph_msgr_exit)
 
void ceph_msgr_flush (void)
 
 EXPORT_SYMBOL (ceph_msgr_flush)
 
void ceph_con_close (struct ceph_connection *con)
 
 EXPORT_SYMBOL (ceph_con_close)
 
void ceph_con_open (struct ceph_connection *con, __u8 entity_type, __u64 entity_num, struct ceph_entity_addr *addr)
 
 EXPORT_SYMBOL (ceph_con_open)
 
bool ceph_con_opened (struct ceph_connection *con)
 
void ceph_con_init (struct ceph_connection *con, void *private, const struct ceph_connection_operations *ops, struct ceph_messenger *msgr)
 
 EXPORT_SYMBOL (ceph_con_init)
 
int ceph_parse_ips (const char *c, const char *end, struct ceph_entity_addr *addr, int max_count, int *count)
 
 EXPORT_SYMBOL (ceph_parse_ips)
 
void ceph_messenger_init (struct ceph_messenger *msgr, struct ceph_entity_addr *myaddr, u32 supported_features, u32 required_features, bool nocrc)
 
 EXPORT_SYMBOL (ceph_messenger_init)
 
void ceph_con_send (struct ceph_connection *con, struct ceph_msg *msg)
 
 EXPORT_SYMBOL (ceph_con_send)
 
void ceph_msg_revoke (struct ceph_msg *msg)
 
void ceph_msg_revoke_incoming (struct ceph_msg *msg)
 
void ceph_con_keepalive (struct ceph_connection *con)
 
 EXPORT_SYMBOL (ceph_con_keepalive)
 
struct ceph_msgceph_msg_new (int type, int front_len, gfp_t flags, bool can_fail)
 
 EXPORT_SYMBOL (ceph_msg_new)
 
void ceph_msg_kfree (struct ceph_msg *m)
 
void ceph_msg_last_put (struct kref *kref)
 
 EXPORT_SYMBOL (ceph_msg_last_put)
 
void ceph_msg_dump (struct ceph_msg *msg)
 
 EXPORT_SYMBOL (ceph_msg_dump)
 

Macro Definition Documentation

#define ADDR_STR_COUNT   (1 << ADDR_STR_COUNT_LOG)

Definition at line 123 of file messenger.c.

#define ADDR_STR_COUNT_LOG   5 /* log2(# address strings in array) */

Definition at line 122 of file messenger.c.

#define ADDR_STR_COUNT_MASK   (ADDR_STR_COUNT - 1)

Definition at line 124 of file messenger.c.

#define CON_FLAG_BACKOFF   4 /* need to retry queuing delayed work */

Definition at line 97 of file messenger.c.

#define CON_FLAG_KEEPALIVE_PENDING   1 /* we need to send a keepalive */

Definition at line 94 of file messenger.c.

#define CON_FLAG_LOSSYTX
Value:
0 /* we can close channel or drop
* messages on errors */

Definition at line 93 of file messenger.c.

#define CON_FLAG_SOCK_CLOSED   3 /* socket state changed to closed */

Definition at line 96 of file messenger.c.

#define CON_FLAG_WRITE_PENDING   2 /* we have data ready to send */

Definition at line 95 of file messenger.c.

#define CON_SOCK_STATE_CLOSED   1 /* -> CONNECTING */

Definition at line 75 of file messenger.c.

#define CON_SOCK_STATE_CLOSING   4 /* -> CLOSED */

Definition at line 78 of file messenger.c.

#define CON_SOCK_STATE_CONNECTED   3 /* -> CLOSING or -> CLOSED */

Definition at line 77 of file messenger.c.

#define CON_SOCK_STATE_CONNECTING   2 /* -> CONNECTED or -> CLOSING */

Definition at line 76 of file messenger.c.

#define CON_SOCK_STATE_NEW   0 /* -> CLOSED */

Definition at line 74 of file messenger.c.

#define CON_STATE_CLOSED   1 /* -> PREOPEN */

Definition at line 83 of file messenger.c.

#define CON_STATE_CONNECTING   3 /* -> NEGOTIATING, CLOSED */

Definition at line 85 of file messenger.c.

#define CON_STATE_NEGOTIATING   4 /* -> OPEN, CLOSED */

Definition at line 86 of file messenger.c.

#define CON_STATE_OPEN   5 /* -> STANDBY, CLOSED */

Definition at line 87 of file messenger.c.

#define CON_STATE_PREOPEN   2 /* -> CONNECTING, CLOSED */

Definition at line 84 of file messenger.c.

#define CON_STATE_STANDBY   6 /* -> PREOPEN, CLOSED */

Definition at line 88 of file messenger.c.

#define MAX_ADDR_STR_LEN   64 /* 54 is enough */

Definition at line 125 of file messenger.c.

#define SKIP_BUF_SIZE   1024

Definition at line 112 of file messenger.c.

Function Documentation

void _ceph_msgr_exit ( void  )

Definition at line 173 of file messenger.c.

void ceph_con_close ( struct ceph_connection con)

Definition at line 532 of file messenger.c.

void ceph_con_init ( struct ceph_connection con,
void private,
const struct ceph_connection_operations ops,
struct ceph_messenger msgr 
)

Definition at line 587 of file messenger.c.

void ceph_con_keepalive ( struct ceph_connection con)

Definition at line 2598 of file messenger.c.

void ceph_con_open ( struct ceph_connection con,
__u8  entity_type,
__u64  entity_num,
struct ceph_entity_addr addr 
)

Definition at line 556 of file messenger.c.

bool ceph_con_opened ( struct ceph_connection con)

Definition at line 579 of file messenger.c.

void ceph_con_send ( struct ceph_connection con,
struct ceph_msg msg 
)

Definition at line 2481 of file messenger.c.

void ceph_messenger_init ( struct ceph_messenger msgr,
struct ceph_entity_addr myaddr,
u32  supported_features,
u32  required_features,
bool  nocrc 
)

Definition at line 2440 of file messenger.c.

void ceph_msg_dump ( struct ceph_msg msg)

Definition at line 2842 of file messenger.c.

void ceph_msg_kfree ( struct ceph_msg m)

Definition at line 2799 of file messenger.c.

void ceph_msg_last_put ( struct kref kref)

Definition at line 2812 of file messenger.c.

struct ceph_msg* ceph_msg_new ( int  type,
int  front_len,
gfp_t  flags,
bool  can_fail 
)
read

Definition at line 2615 of file messenger.c.

void ceph_msg_revoke ( struct ceph_msg msg)

Definition at line 2523 of file messenger.c.

void ceph_msg_revoke_incoming ( struct ceph_msg msg)

Definition at line 2558 of file messenger.c.

void ceph_msgr_exit ( void  )

Definition at line 203 of file messenger.c.

void ceph_msgr_flush ( void  )

Definition at line 211 of file messenger.c.

int ceph_msgr_init ( void  )

Definition at line 186 of file messenger.c.

int ceph_parse_ips ( const char c,
const char end,
struct ceph_entity_addr addr,
int  max_count,
int count 
)

Definition at line 1390 of file messenger.c.

const char* ceph_pr_addr ( const struct sockaddr_storage ss)

Definition at line 132 of file messenger.c.

EXPORT_SYMBOL ( ceph_pr_addr  )
EXPORT_SYMBOL ( ceph_msgr_init  )
EXPORT_SYMBOL ( ceph_msgr_exit  )
EXPORT_SYMBOL ( ceph_msgr_flush  )
EXPORT_SYMBOL ( ceph_con_close  )
EXPORT_SYMBOL ( ceph_con_open  )
EXPORT_SYMBOL ( ceph_con_init  )
EXPORT_SYMBOL ( ceph_parse_ips  )
EXPORT_SYMBOL ( ceph_messenger_init  )
EXPORT_SYMBOL ( ceph_con_send  )
EXPORT_SYMBOL ( ceph_con_keepalive  )
EXPORT_SYMBOL ( ceph_msg_new  )
EXPORT_SYMBOL ( ceph_msg_last_put  )
EXPORT_SYMBOL ( ceph_msg_dump  )