• Lars Ellenberg's avatar
    drbd: disconnect, if the wrong UUIDs are attached on a connected peer · 5c857f01
    Lars Ellenberg authored
    [ Upstream commit b17b59602b6dcf8f97a7dc7bc489a48388d7063a ]
    
    With "on-no-data-accessible suspend-io", DRBD requires the next attach
    or connect to be to the very same data generation uuid tag it lost last.
    
    If we first lost connection to the peer,
    then later lost connection to our own disk,
    we would usually refuse to re-connect to the peer,
    because it presents the wrong data set.
    
    However, if the peer first connects without a disk,
    and then attached its disk, we accepted that same wrong data set,
    which would be "unexpected" by any user of that DRBD
    and cause "undefined results" (read: very likely data corruption).
    
    The fix is to forcefully disconnect as soon as we notice that the peer
    attached to the "wrong" dataset.
    Signed-off-by: 's avatarLars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: 's avatarJens Axboe <axboe@kernel.dk>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    5c857f01
drbd_receiver.c 162 KB