mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-11 18:42:29 +00:00
a5bbb32eb91e4f4e80ff434edecb5a3e9da6ed45
A failed mount tears down with scoutfs_put_super(), which calls scoutfs_srch_destroy() first. srch_destroy() does cancel_work_sync() on the srch compact worker, but that worker can be parked in an uninterruptible scoutfs_net_sync_request() to a server that will never respond (e.g. the server is stuck in recovery). Nothing completes the request: the forced-unmount drain in the net shutdown path only runs for umount -f, and a failed mount never calls ->umount_begin, so the request sits on the resend queue and cancel_work_sync() waits forever. The result is an unkillable D-state mount that survives the SIGKILL a mount timeout sends, and only clears on reboot: systemd[1]: data-archive.mount: Killing process 15740 (mount) with signal SIGKILL. systemd[1]: data-archive.mount: Mount process still around after SIGKILL. Ignoring. cat /proc/26717/stack [<0>] __flush_work+0x16f/0x240 [<0>] __cancel_work_sync+0x135/0x1a0 [<0>] scoutfs_srch_destroy+0x33/0x70 [scoutfs] [<0>] scoutfs_put_super+0x4f/0x1a0 [scoutfs] [<0>] scoutfs_fill_super+0x260/0x520 [scoutfs] [<0>] mount_bdev+0xf9/0x150 [<0>] do_new_mount+0x17a/0x310 [<0>] __x64_sys_mount+0x107/0x140 The worker it waits on, blocked in the sync request that never returns: task:kworker/u269:1 state:D Workqueue: scoutfs_srch_compact scoutfs_srch_compact_worker [scoutfs] Call Trace: __wait_for_common+0x90/0x1d0 scoutfs_net_sync_request+0xdb/0xf0 [scoutfs] scoutfs_client_srch_get_compact+0x2e/0x40 [scoutfs] scoutfs_srch_compact_worker+0x64/0x3d0 [scoutfs] On the fill_super error path, mark forced_unmount and shut the client connection down before teardown. That drains pending requests with -ECONNABORTED so the worker returns and srch_destroy()'s cancel_work_sync completes. It is done for any failure, before the direct put_super call and before returning to generic_shutdown_super (which calls put_super when s_root was set), so both teardown paths are covered. sbi is allocated before any goto out, and scoutfs_client_net_shutdown() is a no-op when the client or connection was never set up, so early failures are safe. Signed-off-by: Auke Kok <auke.kok@versity.com>
Introduction
scoutfs is a clustered in-kernel Linux filesystem designed to support large archival systems. It features additional interfaces and metadata so that archive agents can perform their maintenance workflows without walking all the files in the namespace. Its cluster support lets deployments add nodes to satisfy archival tier bandwidth targets.
The design goal is to reach file populations in the trillions, with the archival bandwidth to match, while remaining operational and responsive.
Highlights of the design and implementation include:
- Fully consistent POSIX semantics between nodes
- Atomic transactions to maintain consistent persistent structures
- Integrated archival metadata replaces syncing to external databases
- Dynamic seperation of resources lets nodes write in parallel
- 64bit throughout; no limits on file or directory sizes or counts
- Open GPLv2 implementation
Community Mailing List
Please join us on the open scoutfs-devel@scoutfs.org mailing list hosted on Google Groups
Description
Languages
C
86.3%
Shell
10%
Roff
2.5%
TeX
0.8%
Makefile
0.4%