]> git.hungrycats.org Git - btrfs-progs/commit
btrfs-progs: scrub: keep the progress socket of a background scrub topics/scrub-progress-socket
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 30 Oct 2026 05:04:01 +0000 (01:04 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 30 Oct 2026 05:04:01 +0000 (01:04 -0400)
commit37cc6ecb63f75d08913183387116f1ea7ecc05e0
tree0520e83171598f7f50e2c08d91ec1245cfbc10a3
parent305e8f89779e5c4be0f74d4730fe995419829b89
btrfs-progs: scrub: keep the progress socket of a background scrub

A background scrub start creates and binds the progress socket, then
forks.  The child scrubs and answers on the socket, but the parent
leaves through the common exit path, which closes the socket and
removes it from the file system.  Nothing can connect to the child
after that: "btrfs scrub status" falls back to the status file, which
is written every 5 seconds, and the check for a running scrub in
another "btrfs scrub start -f" does not see the background scrub.

Close the parent's copy of the socket without removing it.  The child
removes it when the scrub is finished.

Fixes: 4ba165318745 ("btrfs-progs: scrub userland implementation")
Assisted-by: Claude:claude-opus-5-5
cmds/scrub.c