CEPH filesystem development
 help / color / mirror / Atom feed
From: Alex Elder <elder@inktank.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH 00/16] ceph: messenger cleanups and fixes
Date: Thu, 17 May 2012 08:54:49 -0500	[thread overview]
Message-ID: <4FB50329.7010206@inktank.com> (raw)

This series culminates in fixing a bug in which ceph connection
header might get sent over the wire before its associated authorizer
structure has been fully prepared.  More info is found here:
     http://tracker.newdream.net/issues/2424

Sage preemptively reviewed them before I got them posted to the
list, and the patches that follow indicate that.  These patches are
being tested now, and unless I get actionable feedback (and if they
successfully pass testing) I'll be committing them as-is.

Along the way a few other small bugs are fixed (or avoided) and some
data structures and interfaces are modified a bit to simplify
things.  Here is a bit of summary information about them.

These first four rearrange some places where a connection's out_kvec
fields get reset, and where/when a banner gets put out prior to a
connection header.  A couple of functions can then eliminate a
parameter as a result.
     libceph: don't reset kvec in prepare_write_banner()
     ceph: messenger: reset connection kvec caller
     ceph: messenger: send banner in process_connect()
     ceph: drop msgr argument from prepare_write_connect()

This defers setting WRITE_PENDING when a connection header has been
queued to write but not its associated authorizer buffer.
     ceph: don't set WRITE_PENDING too early

These add error checking in two spots, and rearranges a function so
a simple case can be handled without dropping a connection's mutex.
     ceph: messenger: check prepare_write_connect() result
     ceph: messenger: rework prepare_connect_authorizer()
     ceph: messenger: check return from get_authorizer

This defines a type to group some authorizer-related fields, then
uses it to simplify some function interfaces.  It also adds some
additional checking before using method function pointers.
     ceph: define ceph_auth_handshake type
     ceph: messenger: reduce args to create_authorizer
     ceph: ensure auth ops are defined before use
     ceph: have get_authorizer methods return pointers
     ceph: use info returned by get_authorizer
     ceph: return pointer from prepare_connect_authorizer()

These final two implement the final fix for bug 2424 mentioned
above.  It doesn't place the connection header into out_kvec until
it is fully initialized, and then ensures the associated authorizer
buffer is also added before marking the WRITE_PENDING flag on the
connection (and also before dropping the connection mutex).
     ceph: rename prepare_connect_authorizer()
     ceph: add auth buf in prepare_write_connect()

					-Alex

             reply	other threads:[~2012-05-17 13:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 13:54 Alex Elder [this message]
2012-05-17 14:03 ` [PATCH 01/16] libceph: don't reset kvec in prepare_write_banner() Alex Elder
2012-05-17 14:04 ` [PATCH 02/16] ceph: messenger: reset connection kvec caller Alex Elder
2012-05-17 14:04 ` [PATCH 03/16] ceph: messenger: send banner in process_connect() Alex Elder
2012-05-17 14:04 ` [PATCH 04/16] ceph: drop msgr argument from prepare_write_connect() Alex Elder
2012-05-17 14:04 ` [PATCH 05/16] ceph: don't set WRITE_PENDING too early Alex Elder
2012-05-17 14:04 ` [PATCH 06/16] ceph: messenger: check prepare_write_connect() result Alex Elder
2012-05-17 14:04 ` [PATCH 07/16] ceph: messenger: rework prepare_connect_authorizer() Alex Elder
2012-05-17 14:04 ` [PATCH 08/16] ceph: messenger: check return from get_authorizer Alex Elder
2012-05-17 14:04 ` [PATCH 09/16] ceph: define ceph_auth_handshake type Alex Elder
2012-05-17 14:04 ` [PATCH 10/16] ceph: messenger: reduce args to create_authorizer Alex Elder
2012-05-17 14:05 ` [PATCH 11/16] ceph: ensure auth ops are defined before use Alex Elder
2012-05-17 14:05 ` [PATCH 12/16] ceph: have get_authorizer methods return pointers Alex Elder
2012-05-17 14:05 ` [PATCH 13/16] ceph: use info returned by get_authorizer Alex Elder
2012-05-17 14:05 ` [PATCH 14/16] ceph: return pointer from prepare_connect_authorizer() Alex Elder
2012-05-17 14:05 ` [PATCH 15/16] ceph: rename prepare_connect_authorizer() Alex Elder
2012-05-17 14:05 ` [PATCH 16/16] ceph: add auth buf in prepare_write_connect() Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FB50329.7010206@inktank.com \
    --to=elder@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox