diff options
author | Bob Peterson | 2021-05-18 09:14:31 -0400 |
---|---|---|
committer | Andreas Gruenbacher | 2021-05-20 13:31:37 +0200 |
commit | 865cc3e9cc0b1d4b81c10d53174bced76decf888 (patch) | |
tree | 5e7fa93eed7f03facc4394f5993424f9e69d313e /kernel/kexec_elf.c | |
parent | 20265d9a67e40eafd39a8884658ca2e36f05985d (diff) |
gfs2: fix a deadlock on withdraw-during-mount
Before this patch, gfs2 would deadlock because of the following
sequence during mount:
mount
gfs2_fill_super
gfs2_make_fs_rw <--- Detects IO error with glock
kthread_stop(sdp->sd_quotad_process);
<--- Blocked waiting for quotad to finish
logd
Detects IO error and the need to withdraw
calls gfs2_withdraw
gfs2_make_fs_ro
kthread_stop(sdp->sd_quotad_process);
<--- Blocked waiting for quotad to finish
gfs2_quotad
gfs2_statfs_sync
gfs2_glock_wait <---- Blocked waiting for statfs glock to be granted
glock_work_func
do_xmote <---Detects IO error, can't release glock: blocked on withdraw
glops->go_inval
glock_blocked_by_withdraw
requeue glock work & exit <--- work requeued, blocked by withdraw
This patch makes a special exception for the statfs system inode glock,
which allows the statfs glock UNLOCK to proceed normally. That allows the
quotad daemon to exit during the withdraw, which allows the logd daemon
to exit during the withdraw, which allows the mount to exit.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'kernel/kexec_elf.c')
0 files changed, 0 insertions, 0 deletions