• Sagi Grimberg's avatar
    nvme-auth: convert dhchap_auth_list to an array · aa36d711
    Sagi Grimberg authored
    We know exactly how many dhchap contexts we will need, there is no need
    to hold a list that we need to protect with a mutex. Convert to
    a dynamically allocated array. And dhchap_context access state is
    maintained by the chap itself.
    
    Make dhchap_auth_mutex protect only the ctrl host_key and ctrl_key
    in a fine-grained lock such that there is no long lasting acquisition
    of the lock and no need to take/release this lock when flushing
    authentication works.
    Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    aa36d711
auth.c 27.3 KB