• Alexander Aring's avatar
    dlm: move lkb xarray lookup out of lock · c846f732
    Alexander Aring authored
    This patch moves the xarray lookup functionality for the lkb out of the
    ls_lkbxa_lock read lock handling. We can do that as the xarray should be
    possible to access lockless in case of reader like xa_load(). We confirm
    under ls_lkbxa_lock that the lkb is still part of the data structure and
    take a reference when its still part of ls_lkbxa to avoid being freed
    after doing the lookup. To do a check if the lkb is still part of the
    ls_lkbxa data structure we use a kref_read() as the last put will remove
    it from the ls_lkbxa data structure and any reference taken means it is
    still part of ls_lkbxa.
    
    A similar approach was done with the DLM rsb rhashtable just with a flag
    instead of the refcounter because the refcounter has a slightly
    different meaning.
    Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
    Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
    c846f732
dlm_internal.h 22.5 KB