• Alex Elder's avatar
    ceph: don't set WRITE_PENDING too early · e10c758e
    Alex Elder authored
    prepare_write_connect() prepares a connect message, then sets
    WRITE_PENDING on the connection.  Then *after* this, it calls
    prepare_connect_authorizer(), which updates the content of the
    connection buffer already queued for sending.  It's also possible it
    will result in prepare_write_connect() returning -EAGAIN despite the
    WRITE_PENDING big getting set.
    
    Fix this by preparing the connect authorizer first, setting the
    WRITE_PENDING bit only after that is done.
    
    Partially addresses http://tracker.newdream.net/issues/2424Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarSage Weil <sage@inktank.com>
    e10c758e
messenger.c 63.1 KB