Skip to content

bcachefs: regression tests for tools#1125 - #143

Closed
aderk wants to merge 11 commits into
koverstreet:masterfrom
aderk:hunt-upstream
Closed

aderk wants to merge 11 commits into
koverstreet:masterfrom
aderk:hunt-upstream

Conversation

@aderk

@aderk aderk commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Tests for koverstreet/bcachefs-tools#1125, one commit per fix, each in its area's existing file. Each fails on testing 9dbd7f860 and passes with its fix.

  • single_device: quota_chown_counts_once, quota_snapshot_inode_uncounted, fallocate_pagecache_reserved, passes_no_ratelimit_set, passes_exclude_bitmask, sysfs_fail_next_write_ref
  • tier: label_change_rescans_device, reflink_may_update_disk_res
  • replication: reconcile_btree_ptr_metadata_cookie, btree_scrub_stale_replica
  • reconcile-restart: reconcile_pending_cookie_kept (adds two 4G scratch devices; timing-dependent)

The quota tests are in single_device.ktest because quota.ktest doesn't start: since 992232f, require-git clones linuxquota into $ktest_deps_dir, but require-make still looks for it next to the test file.

aderk added 11 commits October 7, 2026 20:59
…o ratelimit)

bch2_recovery_pass_set_no_ratelimit() wrote false, so the flag never reached
the superblock. Fixed by bcachefs-tools "passes:
bch2_recovery_pass_set_no_ratelimit() never sets the flag".
…uested pass

recovery_passes_exclude was masked with a pass number, so excluding
scan_for_btree_nodes didn't stop it. Fixed by bcachefs-tools "passes:
recovery_passes_exclude is masked with a pass number".
…d folios isn't counted twice

bch2_mark_pagecache_reserved() marked nothing, so i_blocks grew a second time.
Fixed by bcachefs-tools "fallocate: bch2_mark_pagecache_reserved() marks
nothing".
…roup's usage once

bch2_quota_transfer() counted the destination's usage twice and refused a
chgrp that fit. Fixed by bcachefs-tools "quota: a transfer's limit check
counts the destination's usage twice".
… quota usage

Deleting a file in a snapshot hit a BUG_ON in the quota code: snapshot
inodes were charged at runtime but never counted. Fixed by bcachefs-tools
"quota: snapshot inodes are charged at runtime but never counted".
…rite doesn't hang umount

The EINVAL return leaked a c->writes ref, and umount waited for it forever.
Fixed by bcachefs-tools "sysfs: a bad logged_op_fail_next write leaks
c->writes, then umount hangs".
…e target moves its data

A label change queued only a pending scan, which never looked at the
device's data. Fixed by bcachefs-tools "opts: a device label change never
rescans the device's data".
…s while a metadata scan is pending

The btree ptr opts check read the cookie at the node key's inode field, so
fsck reported every ptr. Fixed by bcachefs-tools "reconcile: a btree ptr's
opt check reads the inode cookie".
…a disk reservation

The reflink_p update committed without a disk reservation and warned under
BCACHEFS_DEBUG. Fixed by bcachefs-tools "ioctl:
set_reflink_p_may_update_opts commits without a reservation".
…e pending scan cookie

The pending scan cookie was deleted in the scan phase, so stopping the pass
before its pending phases lost the work. Fixed by bcachefs-tools "reconcile:
the pending scan cookie is deleted before the pending phases run".
…ica with the wrong seq

Btree node scrub checked only checksums and called a stale replica good.
Fixed by bcachefs-tools "btree node scrub: a stale or torn replica passes".
@koverstreet

Copy link
Copy Markdown
Owner

Applied to master (through bb50556), all eleven. Thanks!

@koverstreet koverstreet closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants