Canop / Canop/dysk

dysk stalls ~10s on Arch Linux with Btrfs since kernel 6.16.4

Open
#96 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2.9k
Forks
59
Avg merge
1d 19h
Merged PRs (30d)
1

Description

On Arch Linux with Btrfs, dysk takes about 10 seconds before printing any output.
This affects all commands that actually enumerate mounts, e.g.:

```
time dysk -c fs+type+size+used
time dysk -a

```

…but not dysk --help, which is instant.
The delay started suddenly after upgrading from kernel 6.16.3 → 6.16.4.
It persists in 6.16.6. It happens with both dysk 3.0.0 and 3.1.0, so it seems kernel-related rather than a dysk version change.

### Environment

- Distro: Arch Linux
- dysk: 3.0.0-1 and 3.1.0-1 (both tested)
- Kernel: 6.16.6-arch1-1 (regression appears between 6.16.3 and 6.16.4)
- Filesystem: Btrfs root with quotas enabled, multiple subvolumes (@, @home, @log, @pkg)
- systemd: 257.9-1

### Steps to reproduce
1. On Arch with Btrfs and kernel ≥ 6.16.4, run:
`time dysk -c fs+type+size+used
`
2. Observe ~10 second stall before output.

### Expected behavior

Output should be displayed instantly, as it was before kernel 6.16.4.

### Actual behavior

Consistent ~10s delay, even with filters or --remote-stats=no.

**Notes**
```

- dysk --help is instant (so startup overhead is not the issue).
- df -h and lsblk remain instant.
- Disabling quotas (sudo btrfs quota disable /) may help, but not confirmed.
- Possibly due to how dysk probes Btrfs mounts via statfs/statvfs.
- This regression only appeared after the kernel update, but affects dysk specifically.

**Repro commands / timings**
$ time dysk -c fs+type+size+used
┌──────────────┬─────┬────┬────┐
│ filesystem │type │size│used│
├──────────────┼─────┼────┼────┤
│/dev/nvme0n1p2│btrfs│511G│ 49G│
│/dev/nvme0n1p1│vfat │1.1G│280M│
└──────────────┴─────┴────┴────┘

real 0m10.188s
user 0m0.000s
sys 0m0.010s

$ time df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 476G 45G 431G 10% /

real 0m0.007s
user 0m0.003s
sys 0m0.004s
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the delay with `dysk -c fs+type+size+used` and `dysk -a` on Arch Linux with Btrfs, comparing kernels 6.16.3 and 6.16.4 or later. Start by tracing the mount-enumeration path and the mentioned statfs/statvfs probing, then compare it with `df -h` and `--remote-stats=no`. Done means identifying the responsible operation and documenting or resolving the regression.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.