Skip to content

feat(xfs): add Linux 7.0 XFS statistics fields#810

Open
dongjiang1989 wants to merge 1 commit intoprometheus:masterfrom
dongjiang1989:updata-xfs-for-7.0
Open

feat(xfs): add Linux 7.0 XFS statistics fields#810
dongjiang1989 wants to merge 1 commit intoprometheus:masterfrom
dongjiang1989:updata-xfs-for-7.0

Conversation

@dongjiang1989
Copy link
Copy Markdown
Contributor

ref: https://elixir.bootlin.com/linux/v7.0/source/fs/xfs/xfs_stats.c

Summary

  • Update XFS statistics parsing to match the Linux 7.0 kernel (fs/xfs/xfs_stats.c)
  • Add support for 9 new btree stat groups: fibt2, rmapbt, refcntbt, rmapbt_mem, rcbagbt, rtrmapbt, rtrmapbt_mem, rtrefcntbt, rtrefcntbt — each with 15
    counters (lookup, compare, insrec, delrec, newroot, killroot, increment, decrement, lshift, rshift, split, join, alloc, free, moves)
  • Add 2 new stat groups: zoned (gc_read_calls, gc_bytes) and metafile (inodes, meta)
  • Add defer_relog (uint64) and gc xpc (uint64) extended precision counters
  • Add trailing comments with proc label names to all Stats struct fields for easier reference
  • Update test fixtures (proc and sys) to include all new fields
  • Add unit tests for all new stat groups (happy path + invalid count cases)

Test plan

  • go vet ./xfs/... passes
  • go test ./xfs/... passes (TestParseStats, TestReadProcStat, TestReadSysStats)
  • New inline tests cover bad/good cases for: fibt2, rmapbt, refcntbt, rmapbt_mem, rcbagbt, rtrmapbt, rtrmapbt_mem, rtrefcntbt, zoned, metafile, defer_relog, gc xpc

@dongjiang1989
Copy link
Copy Markdown
Contributor Author

Hi @SuperQ , PTAL, thanks.

Signed-off-by: dongjiang <dongjiang1989@126.com>
@dongjiang1989
Copy link
Copy Markdown
Contributor Author

@discordianfish, @SuperQ Hi, I would appreciate your review of this PR. Thank you.

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