linux-stable/net/ceph
Alex Elder ab166d5aa3 libceph: separate banner and connect writes
There are two phases in the process of linking together the two ends
of a ceph connection.  The first involves exchanging a banner and
IP addresses, and if that is successful a second phase exchanges
some detail about each side's connection capabilities.

When initiating a connection, the client side now queues to send
its information for both phases of this process at the same time.
This is probably a bit more efficient, but it is slightly messier
from a layering perspective in the code.

So rearrange things so that the client doesn't send the connection
information until it has received and processed the response in the
initial banner phase (in process_banner()).

Move the code (in the (con->sock == NULL) case in try_write()) that
prepares for writing the connection information, delaying doing that
until the banner exchange has completed.  Move the code that begins
the transition to this second "NEGOTIATING" phase out of
process_banner() and into its caller, so preparing to write the
connection information and preparing to read the response are
adjacent to each other.

Finally, preparing to write the connection information now requires
the output kvec to be reset in all cases, so move that into the
prepare_write_connect() and delete it from all callers.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-07-05 21:14:29 -07:00
..
crush Merge git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2012-05-30 11:17:19 -07:00
armor.c libceph: Fix base64-decoding when input ends in newline. 2011-03-15 09:14:02 -07:00
auth.c ceph: Move secret key parsing earlier. 2011-03-29 12:11:16 -07:00
auth_none.c ceph: messenger: reduce args to create_authorizer 2012-05-17 08:18:12 -05:00
auth_none.h
auth_x.c ceph: messenger: reduce args to create_authorizer 2012-05-17 08:18:12 -05:00
auth_x.h net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
auth_x_protocol.h
buffer.c net: allow GFP_HIGHMEM in __vmalloc() 2010-11-21 10:04:04 -08:00
ceph_common.c Linux 3.5-rc1 2012-06-15 12:32:04 -07:00
ceph_fs.c ceph: fix file mode calculation 2011-07-19 11:25:04 -07:00
ceph_hash.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
ceph_strings.c
crypto.c ceph: Use kmemdup rather than duplicating its implementation 2012-01-10 08:56:54 -08:00
crypto.h libceph: Create a new key type "ceph". 2011-03-29 12:11:24 -07:00
debugfs.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
Kconfig ceph: use kernel DNS resolver 2011-10-25 16:10:16 -07:00
Makefile Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-08 13:47:38 -08:00
messenger.c libceph: separate banner and connect writes 2012-07-05 21:14:29 -07:00
mon_client.c Linux 3.5-rc1 2012-06-15 12:32:04 -07:00
msgpool.c libceph: don't complain on msgpool alloc failures 2011-10-25 16:10:15 -07:00
osd_client.c Linux 3.5-rc1 2012-06-15 12:32:04 -07:00
osdmap.c Linux 3.5-rc1 2012-06-15 12:32:04 -07:00
pagelist.c ceph: fix num_pages_free accounting in pagelist 2010-10-20 15:38:23 -07:00
pagevec.c libceph: fix handling of short returns from get_user_pages 2011-03-03 13:47:39 -08:00