Skip to content

ceph: messenger cleanups and fixes

Alex Elder ceph-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16libceph: don't reset kvec in prepare_write_banner()net/ceph/messenger.c+1 -30 replies
2/16ceph: messenger: reset connection kvec callernet/ceph/messenger.c+5 -10 replies
3/16ceph: messenger: send banner in process_connect()net/ceph/messenger.c+7 -90 replies
4/16ceph: drop msgr argument from prepare_write_connect()net/ceph/messenger.c+11 -140 replies
5/16ceph: don't set WRITE_PENDING too earlynet/ceph/messenger.c+5 -10 replies
6/16ceph: messenger: check prepare_write_connect() resultnet/ceph/messenger.c+12 -40 replies
7/16ceph: messenger: rework prepare_connect_authorizer()net/ceph/messenger.c+19 -90 replies
8/16ceph: messenger: check return from get_authorizernet/ceph/messenger.c+7 -30 replies
9/16ceph: define ceph_auth_handshake typefs/ceph/mds_client.c fs/ceph/mds_client.h include/linux/ceph/auth.h +2 more+47 -410 replies
10/16ceph: messenger: reduce args to create_authorizerfs/ceph/mds_client.c include/linux/ceph/auth.h net/ceph/auth_none.c +2 more+39 -500 replies
11/16ceph: ensure auth ops are defined before usefs/ceph/mds_client.c net/ceph/osd_client.c+16 -130 replies
12/16ceph: have get_authorizer methods return pointersfs/ceph/mds_client.c include/linux/ceph/messenger.h net/ceph/messenger.c +1 more+34 -210 replies
13/16ceph: use info returned by get_authorizerfs/ceph/mds_client.c include/linux/ceph/messenger.h net/ceph/messenger.c +1 more+8 -90 replies
14/16ceph: return pointer from prepare_connect_authorizer()net/ceph/messenger.c+9 -90 replies
15/16ceph: rename prepare_connect_authorizer()net/ceph/messenger.c+7 -60 replies
16/16ceph: add auth buf in prepare_write_connect()net/ceph/messenger.c+0 -00 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by.

PatchSage Weil
1/16R-b
2/16R-b
3/16R-b
4/16R-b
5/16R-b
6/16R-b
7/16R-b
8/16R-b
9/16R-b
10/16R-b
11/16R-b
12/16R-b
13/16R-b
14/16R-b
15/16R-b
16/16R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/16] ceph: messenger cleanups and fixes

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