diff options
author | Ilya Dryomov | 2020-11-09 14:59:02 +0100 |
---|---|---|
committer | Ilya Dryomov | 2020-12-14 23:21:49 +0100 |
commit | 6d7f62bfb5b5da6b0b37174c1fd32545f3b5b90d (patch) | |
tree | 02abcb74d00b9a06d50f3a43403dff1ac0b8db74 /include | |
parent | 30be780a87211de75b93935c20a0913e46744a3f (diff) |
libceph: rename and export con->state states
In preparation for msgr2, rename msgr1 specific states and move the
defines to the header file.
Also drop state transition comments. They don't cover all possible
transitions (e.g. NEGOTIATING -> STANDBY, etc) and currently do more
harm than good.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ceph/messenger.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index f053de4f46dd..e6be85b67c6c 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h @@ -239,6 +239,16 @@ struct ceph_msg { struct ceph_msgpool *pool; }; +/* + * connection states + */ +#define CEPH_CON_S_CLOSED 1 +#define CEPH_CON_S_PREOPEN 2 +#define CEPH_CON_S_V1_BANNER 3 +#define CEPH_CON_S_V1_CONNECT_MSG 4 +#define CEPH_CON_S_OPEN 5 +#define CEPH_CON_S_STANDBY 6 + /* ceph connection fault delay defaults, for exponential backoff */ #define BASE_DELAY_INTERVAL (HZ / 4) #define MAX_DELAY_INTERVAL (15 * HZ) @@ -257,7 +267,7 @@ struct ceph_connection { struct ceph_messenger *msgr; - int state; + int state; /* CEPH_CON_S_* */ atomic_t sock_state; struct socket *sock; struct ceph_entity_addr peer_addr; /* peer address */ |