nodemap_del() holds active_config_lock across its call to lprocfs_nodemap_remove(), which ends up in debugfs_remove_recursive(). That helper waits until every reader currently executing one of the nodemap files has left.
Such a reader is pinned by the debugfs full-proxy file operations for the whole duration of the ->show() callback, and every nodemap handler acquires active_config_lock: nodemap_ranges_show() and nodemap_ban_ranges_show() take it directly, while all the other handlers take it through nodemap_lookup_unlocked(), which locks and unlocks it internally.
So a "lctl nodemap_del" racing with a reader of any file below /sys/kernel/debug/lustre/nodemap/<name>/ deadlocks: the reader blocks on the mutex the deleter holds, and the deleter blocks waiting for that reader to drop its file reference.
- is related to
-
LU-20796 sanity-sec: 'Timeout occurred after 249 minutes, last suite running was sanity-sec'
-
- Open
-