ceph: messenger cleanups and fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest16 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | libceph: don't reset kvec in prepare_write_banner()net/ | +1 | 0 replies | |
| 2/16 | ceph: messenger: reset connection kvec callernet/ | +5 | 0 replies | |
| 3/16 | ceph: messenger: send banner in process_connect()net/ | +7 | 0 replies | |
| 4/16 | ceph: drop msgr argument from prepare_write_connect()net/ | +11 | 0 replies | |
| 5/16 | ceph: don't set WRITE_PENDING too earlynet/ | +5 | 0 replies | |
| 6/16 | ceph: messenger: check prepare_write_connect() resultnet/ | +12 | 0 replies | |
| 7/16 | ceph: messenger: rework prepare_connect_authorizer()net/ | +19 | 0 replies | |
| 8/16 | ceph: messenger: check return from get_authorizernet/ | +7 | 0 replies | |
| 9/16 | ceph: define ceph_auth_handshake typefs/ fs/ include/ +2 more | +47 | 0 replies | |
| 10/16 | ceph: messenger: reduce args to create_authorizerfs/ include/ net/ +2 more | +39 | 0 replies | |
| 11/16 | ceph: ensure auth ops are defined before usefs/ net/ | +16 | 0 replies | |
| 12/16 | ceph: have get_authorizer methods return pointersfs/ include/ net/ +1 more | +34 | 0 replies | |
| 13/16 | ceph: use info returned by get_authorizerfs/ include/ net/ +1 more | +8 | 0 replies | |
| 14/16 | ceph: return pointer from prepare_connect_authorizer()net/ | +9 | 0 replies | |
| 15/16 | ceph: rename prepare_connect_authorizer()net/ | +7 | 0 replies | |
| 16/16 | ceph: add auth buf in prepare_write_connect()net/ | +0 | 0 replies |
Reviews trailers per patch
All 16 patches have a Reviewed-by or Acked-by.
| Patch | Sage Weil |
|---|---|
| 1/16 | R-b |
| 2/16 | R-b |
| 3/16 | R-b |
| 4/16 | R-b |
| 5/16 | R-b |
| 6/16 | R-b |
| 7/16 | R-b |
| 8/16 | R-b |
| 9/16 | R-b |
| 10/16 | R-b |
| 11/16 | R-b |
| 12/16 | R-b |
| 13/16 | R-b |
| 14/16 | R-b |
| 15/16 | R-b |
| 16/16 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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