aboutsummaryrefslogtreecommitdiff
path: root/libnetfs/dir-lookup.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-12 21:22:12 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-12 21:22:12 +0200
commit6f5bf154ba60bc5067760fcaf52a222ee7e2bc2e (patch)
treeef72fd17d730d46241aa138e3ef38c4049336f99 /libnetfs/dir-lookup.c
parentf6a589a59ea88c895d35a595c3d0580495dbc548 (diff)
downloadhurd-6f5bf154ba60bc5067760fcaf52a222ee7e2bc2e.tar.gz
hurd-6f5bf154ba60bc5067760fcaf52a222ee7e2bc2e.tar.bz2
hurd-6f5bf154ba60bc5067760fcaf52a222ee7e2bc2e.zip
file-syncfs: Avoid deadlock
This is a four-player problem (here for diskfs): - One runs sync, which calls diskfs_S_file_syncfs, which triggers fsys_syncfs on all active translators, while keeping the translator_ihash_lock lock. - One of the active translators is hung, for some reason - Another ext2fs thread is trying to call fshelp_set_active_translator from dir_lookup. It is stuck on trying to acquire translator_ihash_lock, and it holds the np. - The ext2fs thread running diskfs_sync_everything tries to lock that np, while holding the nodecache_lock. In the end everything is locked. While diskfs_S_file_syncfs can as well just atomically get the list of active translators, and then call fsys_syncfs without keeping translator_ihash_lock held.
Diffstat (limited to 'libnetfs/dir-lookup.c')
0 files changed, 0 insertions, 0 deletions