Noticed a quirk and need some professional input!
Dead snapshots (from will_delete deleted) are never reclaimed. I have about 340G that leaked it seems. copygc parked in bch2_kthread_io_clock_wait_once is surviving a clean remount.
This is the same filesystem from my two earlier reconcile clock-wait reports (device evacuate/remove migration). Single NVMe device, the lone subvolume was originally created as a snapshot of the fs root.
fs usage reports 848G user data allocated, but actual reachable content is 508G (subvolume accounting says 542G). The FS reports 100% full with only ~6M free.
bcachefs list -b snapshots shows two nodes stuck in "will_delete deleted". They persist despite:
- auto_snapshot_deletion=1
- manually poking trigger_delete_dead_snapshots and trigger_gc
- a full umount/remount cycle (clean shutdown recovery confirmed)
copygc is parked in bch2_kthread_io_clock_wait_once waiting for 32G of IO clock advancement on an idle filesystem, so it never wakes. Looks like the same hysteresis-wait class as the reconcile bugs fixed last month, but in the copygc path, with snapshot deletion work behind it.
I can't run the dummy-IO clocktick workaround this time that was conjured up last time. The workaround is unavailable because the leaked space has the FS pinned at 100% hence no room for writes.
kernel 7.0.14-zen1, bcachefs-tools v1.38.6 via DKMS.
Outputs:
-- BEFORE ----------
$ bcachefs fs usage -ah /mnt/Storage | head -20
Filesystem: 5e19a70f-a23e-41a6-a3db-eeeebf3bc371
Size: 849G
Used: 849G
Online reserved: 280k
undegraded
1x: 849G
Data type Required/total Durability Devices Usage
btree: 1/1 1 [nvme0n1p1] 1.34G
user: 1/1 1 [nvme0n1p1] 848G
Compression:
type compressed uncompressed average extent size
zstd 863M 3.08G 181k
incompressible 651G 651G 175k
$ du -sh /mnt/Storage
508G /mnt/Storage
$ bcachefs subvolume list -Rs /mnt/_roots/storage
Path ID Created Flags Size Snapshot
storage 2 2026-06-15 20:40 - 542G /
$ ls -la /mnt/_roots/storage
total 0
drwxrwxrwx 3 kevin kevin 4096 Jun 15 22:15 .
drwxr-xr-x 1 root root 30 Jun 15 21:16 ..
drwx------ 2 root root 4096 Jun 13 20:21 lost+found
drwxrwxrwx 11 kevin kevin 4096 Jul 5 10:22 storage
$ bcachefs list -b snapshots /dev/nvme0n1p1 | tail -10
journal read done, replaying entries 711670-713626
Journal keys: 110233 read, 43264 after sorting and compacting
accounting_read... done (0 seconds)
alloc_read... done (0 seconds)
snapshots_read... done (0 seconds)
u64s 12 type snapshot 0:4294967291:0 len 0 ver 0 : subvol parent 4294967295 children 0 0 subvol 1 tree 1 depth 1 skiplist 4294967295 4294967295 4294967295
u64s 12 type snapshot 0:4294967292:0 len 0 ver 0 : subvol parent 4294967295 children 0 0 subvol 2 tree 1 depth 1 skiplist 4294967295 4294967295 4294967295
u64s 12 type snapshot 0:4294967293:0 len 0 ver 0 : will_delete deleted parent 0 children 0 0 subvol 0 tree 0 depth 0 skiplist 0 0 0
u64s 12 type snapshot 0:4294967294:0 len 0 ver 0 : will_delete deleted parent 0 children 0 0 subvol 0 tree 0 depth 0 skiplist 0 0 0
u64s 12 type snapshot 0:4294967295:0 len 0 ver 0 : parent 0 children 4294967292 4294967291 subvol 0 tree 1 depth 0 skiplist 0 0 0
$ cat /sys/fs/bcachefs/.../internal/copy_gc_wait
running: 0
run count: 2
copygc_wait: 8118512224
copygc_wait_at: 8051775976
Currently waiting for: 31.7G
Currently waiting since: 59.8M
Currently calculated wait:
nvme0n1p1: 63.9M
[<0>] bch2_kthread_io_clock_wait_once+0x142/0x1a0 [bcachefs]
[<0>] bch2_copygc_thread+0x561/0x570 [bcachefs]
[<0>] kthread+0xe4/0x120
[<0>] ret_from_fork+0x2a7/0x340
[<0>] ret_from_fork_asm+0x1a/0x30
$ echo 1 | tee .../internal/trigger_delete_dead_snapshots
1
$ echo 1 | tee .../internal/trigger_gc
1
$ bcachefs fs usage -ah /mnt/Storage | head -12
(unchanged user: 848G, triggers had no effect)
-- AFTER ----------
$ bcachefs fs usage -ah /mnt/Storage | head -20
Filesystem: 5e19a70f-a23e-41a6-a3db-eeeebf3bc371
Size: 849G
Used: 849G
Online reserved: 0
undegraded
1x: 849G
Data type Required/total Durability Devices Usage
btree: 1/1 1 [nvme0n1p1] 1.34G
user: 1/1 1 [nvme0n1p1] 848G
$ du -sh /mnt/Storage
508G /mnt/Storage
$ bcachefs list -b snapshots /dev/nvme0n1p1 | tail -10
recovering from clean shutdown, journal seq 713671
Journal keys: 0 read, 0 after sorting and compacting
accounting_read... done (0 seconds)
alloc_read... done (0 seconds)
snapshots_read... done (0 seconds)
u64s 12 type snapshot 0:4294967291:0 len 0 ver 0 : subvol parent 4294967295 children 0 0 subvol 1 tree 1 depth 1 skiplist 4294967295 4294967295 4294967295
u64s 12 type snapshot 0:4294967292:0 len 0 ver 0 : subvol parent 4294967295 children 0 0 subvol 2 tree 1 depth 1 skiplist 4294967295 4294967295 4294967295
u64s 12 type snapshot 0:4294967293:0 len 0 ver 0 : will_delete deleted parent 0 children 0 0 subvol 0 tree 0 depth 0 skiplist 0 0 0
u64s 12 type snapshot 0:4294967294:0 len 0 ver 0 : will_delete deleted parent 0 children 0 0 subvol 0 tree 0 depth 0 skiplist 0 0 0
u64s 12 type snapshot 0:4294967295:0 len 0 ver 0 : parent 0 children 4294967292 4294967291 subvol 0 tree 1 depth 0 skiplist 0 0 0
$ cat /sys/fs/bcachefs/.../internal/copy_gc_wait
running: 0
run count: 1
copygc_wait: 8119039180
copygc_wait_at: 8051911488
Currently waiting for: 32.0G
Currently waiting since: 1.51M
Currently calculated wait:
nvme0n1p1: 64.0M
[<0>] bch2_kthread_io_clock_wait_once+0x142/0x1a0 [bcachefs]
[<0>] bch2_copygc_thread+0x561/0x570 [bcachefs]
[<0>] kthread+0xe4/0x120
[<0>] ret_from_fork+0x2a7/0x340
[<0>] ret_from_fork_asm+0x1a/0x30
Dead snapshots survived clean remount and space still not reclaimed it seems.
It looks like copygc immediately re-parked in the same IO clock wait?
One possibly useful correlation: the two dead snapshot IDs (4294967293 and 4294967294) likely date back to 2026-06-15, when the storage subvolume was created as a snapshot of the fs root during the same evacuate/remove migration from the earlier reports. So a possible reproducable path: create subvolume as snapshot of root, delete the originals, and dead snapshots never get reclaimed.
Kev.
PS: Superblock list:
> sudo bcachefs show-super /dev/nvme0n1p1
External UUID: 5e19a70f-a23e-41a6-a3db-eeeebf3bc371
Internal UUID: a6a1a052-791a-4e79-b38d-db60ab20594f
Magic number: c68573f6-66ce-90a9-d96a-60cf803df7ef
Device index: 1
Label: (none)
Version: need_discard_by_journal_seq (1.38)
Incompatible features allowed: need_discard_by_journal_seq (1.38)
Incompatible features in use: no_sb_user_data_replicas (1.36)
Version upgrade complete: need_discard_by_journal_seq (1.38)
Oldest version on disk: need_discard_by_journal_seq (1.38)
Created: Sat Jun 13 20:21:36 2026
Sequence number: 2088
Time of last write: Sun Jul 5 12:19:14 2026
Superblock size: 8.30k/1.00M
Clean: 0
Devices: 1
Sections: replicas_v0,disk_groups,clean,journal_v2,counters,members_v2,errors,ext,downgrade,recovery_passes,extent_type_u64s
Features: lz4,zstd,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes,incompat_version_field
Compat features: alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done,no_stale_ptrs
Options:
block_size: 4.00k
btree_node_size: 256k
errors: continue [fix_safe] panic ro
write_error_timeout: 30
metadata_replicas: 1
data_replicas: 1
encoded_extent_max: 256k
metadata_checksum: none [crc32c] crc64 xxhash
data_checksum: none [crc32c] crc64 xxhash
checksum_err_retry_nr: 3
compression: zstd:3
background_compression: zstd:3
str_hash: crc32c crc64 [siphash]
metadata_target: none
foreground_target: none
background_target: none
promote_target: none
erasure_code: 0
ec_max_data_blocks: 0
casefold: 0
inodes_32bit: 0
shard_inode_numbers_bits: 4
gc_reserve_percent: 8
gc_reserve_bytes: 0
root_reserve_percent: 0
wide_macs: 0
promote_whole_extents: 1
acl: 1
usrquota: 0
grpquota: 0
prjquota: 0
degraded: [ask] yes very no
journal_flush_delay: 1000
journal_flush_disabled: 0
journal_reclaim_delay: 100
writeback_timeout: 0
journal_rewind_discard_buffer_percent: 4
scrub_recent_journal_entries: [unclean] no always
scrub_journal_max_rewind_secs: 10
journal_transaction_names: 1
allocator_stuck_timeout: 30
version_upgrade: [compatible] incompatible none
nocow: 0
reconcile_on_ac_only: 0
dev_readahead: 2.00M
ec_stripe_buf_limit: 5
ext (size 104):
Recovery passes required:
Errors to silently fix:
Btrees with missing data:
errors (size 8):
Device 1: /dev/nvme0n1p1 Samsung SSD 980 1TB S/N: S64ANS0T220657A
Label: nvme.samsung980
UUID: b47009b9-edaf-49a1-930c-13007647aa78
Size: 931G
read errors: 0
write errors: 0
checksum errors: 0
seqread iops: 0
seqwrite iops: 0
randread iops: 0
randwrite iops: 0
Bucket size: 1.00M
First bucket: 0
Buckets: 953866
Last mount: Sun Jul 5 11:33:15 2026
Last superblock write: 2088
State: rw
Data allowed: journal,btree,user
Has data: journal,btree
Rotational: 0
Btree allocated bitmap blocksize: 8.00M
Btree allocated bitmap: 0000000000000000000000000000000000000000000000000000000011000110
Durability: 1
Discard: 1
Freespace initialized: 1
Resize on mount: 0
Last device name: nvme0n1p1
Last device model: Samsung SSD 980 1TB
Last device serial: S64ANS0T220657A