• David Howells's avatar
    afs: Fix the by-UUID server tree to allow servers with the same UUID · 3c4c4075
    David Howells authored
    Whilst it shouldn't happen, it is possible for multiple fileservers to
    share a UUID, particularly if an entire cell has been duplicated, UUIDs and
    all.  In such a case, it's not necessarily possible to map the effect of
    the CB.InitCallBackState3 incoming RPC to a specific server unambiguously
    by UUID and thus to a specific cell.
    
    Indeed, there's a problem whereby multiple server records may need to
    occupy the same spot in the rb_tree rooted in the afs_net struct.
    
    Fix this by allowing servers to form a list, with the head of the list in
    the tree.  When the front entry in the list is removed, the second in the
    list just replaces it.  afs_init_callback_state() then just goes down the
    line, poking each server in the list.
    
    This means that some servers will be unnecessarily poked, unfortunately.
    An alternative would be to route by call parameters.
    Reported-by: default avatarJeffrey Altman <jaltman@auristor.com>
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    Fixes: d2ddc776 ("afs: Overhaul volume and server record caching and fileserver rotation")
    3c4c4075
callback.c 4.58 KB