Alex Elder
ce2c8903e7
libceph: start tracking connection socket state
...
Start explicitly keeping track of the state of a ceph connection's
socket, separate from the state of the connection itself. Create
placeholder functions to encapsulate the state transitions.
--------
| NEW* | transient initial state
--------
| con_sock_state_init()
v
----------
| CLOSED | initialized, but no socket (and no
---------- TCP connection)
^ \
| \ con_sock_state_connecting()
| ----------------------
| \
+ con_sock_state_closed() \
|\ \
| \ \
| ----------- \
| | CLOSING | socket event; \
| ----------- await close \
| ^ |
| | |
| + con_sock_state_closing() |
| / \ |
| / --------------- |
| / \ v
| / --------------
| / -----------------| CONNECTING | socket created, TCP
| | / -------------- connect initiated
| | | con_sock_state_connected()
| | v
-------------
| CONNECTED | TCP connection established
-------------
Make the socket state an atomic variable, reinforcing that it's a
distinct transtion with no possible "intermediate/both" states.
This is almost certainly overkill at this point, though the
transitions into CONNECTED and CLOSING state do get called via
socket callback (the rest of the transitions occur with the
connection mutex held). We can back out the atomicity later.
Signed-off-by: Alex Elder <elder@inktank.com >
Reviewed-by: Sage Weil<sage@inktank.com >
2012-06-01 08:37:56 -05:00
..
2012-02-23 22:07:55 +00:00
2012-01-17 09:54:08 -05:00
2012-06-01 08:37:56 -05:00
2012-05-07 15:39:35 -07:00
2012-01-04 17:30:20 -02:00
2012-01-09 00:37:40 +01:00
2011-12-30 15:25:52 -08:00
2012-01-13 09:32:20 +10:30
2012-02-03 19:03:44 +01:00
2012-01-22 15:08:43 -05:00
2012-02-13 20:39:05 -05:00
2012-02-04 07:17:47 -08:00
2012-01-16 14:01:23 +01:00
2012-02-21 13:29:06 +01:00
2011-09-13 22:44:10 -04:00
2012-01-09 14:21:03 -08:00
2012-01-06 05:22:21 +04:00
2011-12-23 10:17:51 +11:00
2011-12-13 15:30:49 -05:00
2012-01-14 12:26:41 -08:00
2012-02-10 14:24:31 -08:00
2008-06-16 10:20:58 -07:00
2008-02-06 10:41:02 -08:00
2011-12-13 15:07:49 +00:00
2012-01-17 04:35:20 -05:00
2012-01-18 15:51:48 -08:00
2009-03-26 18:14:14 +01:00
2012-01-08 19:14:59 -05:00
2005-06-21 19:07:41 -07:00
2011-03-15 02:42:32 -04:00
2005-04-16 15:20:36 -07:00
2009-09-15 09:50:47 -07:00
2012-01-17 16:17:03 -05:00
2009-01-08 08:31:12 -08:00
2010-12-06 15:58:43 -05:00
2011-10-31 00:33:36 +08:00
2011-09-14 18:09:38 -07:00
2005-04-16 15:20:36 -07:00
2012-02-06 15:15:20 -08:00
2012-01-13 08:15:33 +01:00
2012-02-18 15:24:05 -08:00
2008-06-06 11:29:10 -07:00
2012-02-07 07:51:30 +01:00
2009-01-04 13:33:20 -08:00
2008-11-28 12:38:38 +01:00
2010-06-24 21:30:09 -07:00
2010-03-03 11:25:58 +01:00
2012-01-14 18:36:33 -08:00
2011-03-31 11:26:23 -03:00
2012-02-08 20:03:14 +01:00
2011-11-22 15:22:23 -05:00
2012-01-09 12:59:24 -08:00
2009-12-04 15:39:55 +01:00
2011-10-13 14:36:58 +01:00
2012-02-26 09:44:55 -08:00
2012-01-10 16:30:42 -08:00
2007-10-17 08:42:47 -07:00
2012-01-10 16:30:42 -08:00
2005-04-16 15:20:36 -07:00
2008-04-30 08:29:54 -07:00
2012-01-03 22:54:57 -05:00
2012-01-13 09:32:20 +10:30
2008-06-04 14:56:12 +01:00
2012-01-07 12:03:30 -08:00
2012-01-18 15:51:48 -08:00
2012-01-12 20:13:11 -08:00
2012-01-05 18:52:59 -05:00
2011-11-06 19:44:47 -08:00
2011-08-06 22:12:37 -07:00
2012-03-04 15:51:42 -08:00
2011-06-06 22:55:11 -07:00
2011-07-26 16:49:47 -07:00
2012-01-08 12:19:57 -08:00
2011-11-07 23:54:53 +01:00
2012-01-24 10:47:41 -08:00
2008-10-13 09:51:43 -07:00
2012-02-20 19:46:36 +11:00
2011-06-10 14:55:36 +02:00
2008-08-28 11:49:15 -05:00
2012-01-04 08:56:31 -06:00
2011-10-31 20:21:24 +00:00
2011-12-16 08:49:57 -08:00
2012-01-06 10:20:21 +00:00
2009-04-15 12:22:37 +02:00
2011-12-23 21:33:15 +05:30
2007-02-09 17:39:36 -05:00
2011-10-31 17:30:44 -07:00
2011-02-25 12:00:34 -08:00
2009-11-04 09:50:58 -08:00
2010-08-05 17:17:51 +00:00
2011-11-29 12:46:19 -05:00
2011-12-09 17:35:51 -08:00
2012-02-08 09:19:42 +01:00
2010-05-21 20:29:10 -07:00
2011-03-22 17:44:11 -07:00
2007-06-01 08:18:29 -07:00
2012-01-04 14:10:28 -05:00
2012-01-12 20:13:04 -08:00
2011-09-14 15:24:51 -04:00
2012-01-03 22:54:58 -05:00
2011-07-07 08:18:18 +02:00
2008-11-20 20:29:48 -08:00
2011-01-09 15:42:55 -08:00
2009-12-03 12:14:36 -08:00
2011-07-16 07:24:32 +02:00
2011-07-26 16:49:47 -07:00
2007-05-08 11:15:31 -07:00
2012-01-29 20:35:52 +01:00
2008-08-23 12:14:12 -07:00
2012-02-13 20:45:38 -05:00
2012-01-07 17:26:49 -05:00
2009-06-18 13:04:05 -07:00
2011-08-03 11:15:57 -04:00
2011-07-25 14:30:23 -04:00
2012-03-02 10:38:33 +01:00
2012-01-10 16:30:43 -08:00
2012-01-11 09:23:05 +00:00
2012-02-01 09:13:11 -08:00
2011-08-17 13:00:20 -07:00
2012-01-09 11:24:59 +01:00
2011-06-27 16:06:19 -07:00
2012-01-12 20:13:08 -08:00
2012-02-02 14:35:12 -05:00
2012-01-06 11:42:52 -08:00
2007-01-30 08:26:45 -08:00
2009-11-04 09:50:58 -08:00
2010-11-19 17:47:57 +08:00
2011-12-05 18:27:56 -05:00
2012-02-21 16:56:45 -05:00
2012-01-24 15:51:00 -05:00
2010-05-03 12:33:13 +03:00
2011-11-13 16:10:10 -05:00
2008-08-02 18:36:10 +01:00
2011-07-18 12:29:38 -04:00
2011-08-26 12:02:50 -04:00
2012-01-11 12:56:06 -08:00
2011-02-18 12:42:28 -08:00
2012-01-09 12:59:24 -08:00
2012-01-13 09:32:18 +10:30
2011-01-31 21:17:41 -08:00
2011-10-28 14:25:01 -07:00
2011-10-28 05:54:23 -07:00
2010-07-09 11:42:03 -07:00
2012-02-15 09:45:53 +01:00
2005-04-16 15:20:36 -07:00
2012-01-09 13:06:28 +01:00
2007-04-25 22:25:31 -07:00
2012-01-03 22:55:17 -05:00
2009-04-21 13:41:48 -07:00
2011-12-11 18:25:16 -05:00
2007-09-16 21:13:58 -07:00
2012-01-09 13:52:09 +01:00
2011-02-17 11:12:40 -08:00
2007-07-31 15:39:40 -07:00
2011-12-06 09:06:38 +01:00
2012-01-12 20:13:03 -08:00
2010-02-16 16:01:21 -08:00
2012-01-23 08:38:48 -08:00
2012-01-19 16:17:35 +11:00
2012-03-05 15:49:42 -08:00
2010-03-15 15:29:39 +01:00
2012-01-17 15:40:51 -08:00
2011-09-16 19:20:20 -04:00
2010-05-26 17:34:16 +01:00
2012-01-10 16:30:49 -08:00
2012-01-12 20:13:03 -08:00
2009-06-16 19:47:57 -07:00
2009-06-13 12:28:57 +02:00
2012-02-02 15:43:40 -08:00
2008-02-06 10:41:01 -08:00
2011-05-24 10:01:37 +02:00
2011-11-02 16:06:59 -07:00
2010-05-25 08:07:09 -07:00
2012-03-05 15:49:43 -08:00
2012-01-10 16:30:45 -08:00
2012-01-23 08:38:47 -08:00
2012-01-23 08:38:47 -08:00
2012-01-13 10:12:23 -08:00
2012-01-12 20:13:10 -08:00
2012-01-12 20:13:03 -08:00
2012-01-11 19:12:10 -08:00
2010-08-09 20:44:58 -07:00
2005-04-16 15:20:36 -07:00
2012-01-12 20:13:10 -08:00
2012-01-03 22:57:13 -05:00
2012-01-20 17:38:58 +00:00
2012-01-13 09:32:14 +10:30
2012-01-13 09:32:28 +10:30
2012-01-03 22:57:12 -05:00
2012-02-02 00:23:14 +11:00
2012-01-06 12:10:25 -08:00
2011-07-26 16:49:47 -07:00
2011-11-16 17:43:12 -05:00
2012-01-09 14:46:52 -08:00
2011-07-03 20:02:07 -07:00
2011-08-26 12:02:50 -04:00
2012-01-04 14:30:43 -05:00
2012-01-05 11:59:18 -05:00
2012-01-07 13:22:46 -05:00
2012-02-03 18:50:34 -05:00
2011-12-21 14:48:43 -08:00
2012-02-15 13:10:15 -07:00
2012-01-12 20:13:06 -08:00
2011-12-03 09:35:17 -08:00
2011-11-04 22:28:13 +01:00
2012-01-12 20:13:07 -08:00
2012-01-10 16:30:42 -08:00
2012-01-12 20:13:10 -08:00
2011-12-13 15:07:49 +00:00
2011-01-16 13:47:07 -05:00
2012-01-06 12:11:40 -08:00
2012-01-11 18:50:26 -08:00
2012-01-06 12:10:26 -08:00
2012-01-06 12:15:21 -08:00
2012-03-04 09:34:15 -08:00
2012-01-27 12:06:39 +01:00
2005-04-16 15:20:36 -07:00
2012-01-12 15:23:04 -08:00
2012-01-10 16:30:54 -08:00
2011-05-26 17:12:37 -07:00
2012-01-12 20:05:28 -08:00
2012-01-08 13:10:57 -08:00
2011-08-25 15:34:19 +02:00
2012-02-04 22:23:17 +01:00
2011-12-01 21:46:42 +01:00
2012-01-04 09:09:35 +04:00
2011-01-13 08:03:21 -08:00
2012-01-12 20:13:13 -08:00
2012-01-10 16:30:54 -08:00
2012-02-01 16:53:46 +08:00
2011-05-23 13:01:00 -07:00
2011-05-23 13:01:00 -07:00
2012-01-17 16:41:31 -08:00
2012-01-12 13:09:09 +01:00
2012-01-12 20:13:12 -08:00
2010-02-08 18:19:41 -06:00
2012-01-03 22:55:07 -05:00
2011-10-28 05:29:07 -07:00
2009-06-11 08:51:08 -07:00
2010-09-08 18:16:55 -07:00
2011-07-25 20:57:14 -07:00
2012-03-02 11:38:15 -08:00
2012-01-06 23:20:13 -05:00
2012-01-06 23:20:13 -05:00
2012-01-03 22:54:56 -05:00
2012-01-22 15:08:46 -05:00
2011-04-19 15:38:02 -04:00
2010-11-15 13:24:06 -05:00
2012-01-12 20:13:06 -08:00
2011-05-12 08:28:47 -07:00
2011-07-26 14:50:01 -07:00
2012-02-21 16:56:45 -05:00
2010-03-13 01:21:21 +01:00
2011-09-13 11:11:59 +02:00
2009-09-15 02:44:17 -07:00
2012-01-06 06:13:35 +04:00
2006-04-26 12:56:16 +01:00
2012-03-05 15:49:42 -08:00
2012-01-14 18:36:33 -08:00
2012-01-14 13:05:21 -08:00
2012-02-01 22:23:53 +05:30
2012-01-09 09:33:57 +09:00
2012-01-23 08:38:48 -08:00
2011-12-09 07:50:27 -08:00
2012-01-10 16:30:54 -08:00
2012-02-24 11:42:50 -08:00
2012-02-23 16:50:45 -05:00
2012-01-09 14:19:33 -08:00
2012-01-22 15:08:44 -05:00
2005-04-16 15:20:36 -07:00
2011-07-26 16:49:47 -07:00
2007-05-08 11:15:18 -07:00
2011-10-31 17:30:47 -07:00
2009-04-10 15:48:52 +02:00
2012-01-19 23:25:33 +01:00
2012-01-23 08:38:48 -08:00
2012-02-21 17:24:20 -08:00
2012-01-03 22:55:12 -05:00
2012-01-03 22:54:56 -05:00
2010-12-22 19:43:34 -08:00
2012-02-28 15:06:33 -05:00
2008-10-13 09:51:40 -07:00
2012-01-23 03:15:25 -05:00
2009-02-15 22:43:32 -08:00
2011-02-02 15:28:18 +01:00
2011-05-10 16:03:56 -04:00
2011-06-27 20:30:08 +02:00
2006-09-28 17:53:59 -07:00
2012-01-17 10:30:38 -08:00
2012-01-08 13:21:22 -08:00
2011-05-25 19:56:23 -04:00
2012-01-04 22:19:55 -08:00
2012-01-24 12:25:14 -08:00
2009-12-10 22:55:37 +01:00
2011-11-02 16:07:02 -07:00
2012-01-15 12:49:56 -08:00
2012-01-12 15:44:42 +10:30
2012-01-12 15:44:44 +10:30
2011-07-25 20:57:15 -07:00
2011-12-21 10:07:39 +01:00
2012-01-06 15:22:04 +01:00
2012-03-02 10:51:00 +01:00
2012-01-10 16:59:59 -08:00
2006-06-22 15:05:58 -07:00