Skip to content
  • NeilBrown's avatar
    LU-12542 handles: discard h_owner in favour of h_ops · 9bda0a5c
    NeilBrown authored
    
    
    lustre_handles assigned a 64bit unique identifier (a 'cookie') to
    objects of various types and stored them in a hash table, allowing
    them to be accessed by the cookie.
    
    There is a facility for type checking by recording an 'owner' for each
    object, and checking the owner on lookup. Unfortunately this is not
    used - owner is always zero for the client.
    
    Each object also contains an h_ops pointer which can be used to
    reliably identify an owner.
    
    So discard h_owner, pass and 'ops' pointer to class_handle2object(),
    and only return objects for which the h_ops matches.
    
    Note: this h_owner is now quiet different from the similar h_owner
    in the server code.  When the server code is merged the "med" pointer
    should be stored in the "mfd" and validated separately.
    
    This reduces the size of the portals_handle by one pointer, which
    benefits various other structures including struct ldlm_lock which can
    be very populous and so is best keep small.
    
    Change-Id: I9cf2b32f8b0ea7c188888301fb6130818b3d5ae9
    Signed-off-by: default avatarNeilBrown <neilb@suse.com>
    Reviewed-on: https://review.whamcloud.com/35739
    
    
    Tested-by: default avatarjenkins <devops@whamcloud.com>
    Reviewed-by: default avatarAndreas Dilger <adilger@whamcloud.com>
    Tested-by: default avatarMaloo <maloo@whamcloud.com>
    Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
    9bda0a5c