• Matias Bjørling's avatar
    lightnvm: remove nested lock conflict with mm · 5cd90785
    Matias Bjørling authored
    If a media manager tries to initialize it targets upon media manager
    initialization, the media manager will need to know which target types
    are available in LightNVM. The lists of which managers and target types
    are available shares the same lock.
    
    Therefore, on initialization, the nvm_lock is taken by LightNVM core,
    which later leads to a deadlock when target types are enumerated by the
    media manager.
    
    Add an exclusive lock for target types to resolve this conflict.
    Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    5cd90785
core.c 26 KB