• A
    libceph: WARN, don't BUG on unexpected connection states · 122070a2
    Alex Elder 提交于
    A number of assertions in the ceph messenger are implemented with
    BUG_ON(), killing the system if connection's state doesn't match
    what's expected.  At this point our state model is (evidently) not
    well understood enough for these assertions to trigger a BUG().
    Convert all BUG_ON(con->state...) calls to be WARN_ON(con->state...)
    so we learn about these issues without killing the machine.
    
    We now recognize that a connection fault can occur due to a socket
    closure at any time, regardless of the state of the connection.  So
    there is really nothing we can assert about the state of the
    connection at that point so eliminate that assertion.
    Reported-by: NUgis <ugis22@gmail.com>
    Tested-by: NUgis <ugis22@gmail.com>
    Signed-off-by: NAlex Elder <elder@inktank.com>
    Reviewed-by: NSage Weil <sage@inktank.com>
    122070a2
messenger.c 70.7 KB