Skip to content

fix(goclusterfs): log failed lock releases and rollback frees; enforce errcheck in the package - #125

Merged
mattmattox merged 3 commits into
mainfrom
claude/errcheck-goclusterfs
Nov 13, 2026
Merged

mattmattox merged 3 commits into
mainfrom
claude/errcheck-goclusterfs

Conversation

@mattmattox

Copy link
Copy Markdown
Contributor

Part of the errcheck rollout; deletes the internal/goclusterfs rule. 21 findings in fs.go, 43 in its tests.

fs.go (data path):

  • All lock releases go through FS.release: ErrNotLockOwner logs [ERROR] (double release or lock bookkeeping bug), other failures [WARN]. Previously several were dropped or -debug only. A failed release leaves this node's claim on disk, so other nodes wait on it.
  • Rollback frees of unmapped blocks and never-referenced new inodes log failures (leaks) instead of dropping them; this includes four existing _ = bitmapMgr.Free in the SFB migration.
  • Unlink's block free after the inode free, and Setattr's intent close before a retry, now log failures.

Tests: operations a test crashes on purpose, and device closes that simulate a crash, discard results; helper lock releases report failures.

A -race run of the package on .68 before the main merge logged no new release/free warnings. Conflicts in .golangci.yml with #124 (neighboring rule).

🤖 Generated with Claude Code

mattmattox and others added 3 commits November 13, 2026 16:06
…e errcheck in fs.go

Lock releases go through FS.release, which logs ErrNotLockOwner as
[ERROR] and other failures as [WARN]. Rollback frees of blocks and new
inodes log a failure instead of dropping it, as does the Setattr intent
close before a retry and the block free after an unlink. Only the
package's tests stay excluded from errcheck.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the whole package

Operations a test crashes on purpose, and device closes that simulate a
crash, discard their results. Lock releases in test helpers report a
failure. writeImageRange returns its close error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox merged commit ecc3f9d into main Nov 13, 2026
17 checks passed
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.

1 participant