STRUCT CEPH_SUBVOLUME_METRICS_TRACKER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

struct ceph_subvolume_metrics_tracker(9) πŸ’…

okay so this is the Kernel API Manual, bestie, and today's main character is a struct that literally keeps receipts on your per-subvolume I/O. no cap, it's giving accounting-department-but-make-it-glam. ✨


🌸 NAME 🌸

struct ceph_subvolume_metrics_tracker β€” tracks per-subvolume I/O metrics πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ceph_subvolume_metrics_tracker {
    spinlock_t lock;
    struct rb_root_cached tree;
    u32 nr_entries;
    bool enabled;
    atomic64_t snapshot_attempts;
    atomic64_t snapshot_empty;
    atomic64_t snapshot_failures;
    atomic64_t record_calls;
    atomic64_t record_disabled;
    atomic64_t record_no_subvol;
    atomic64_t total_read_ops;
    atomic64_t total_read_bytes;
    atomic64_t total_write_ops;
    atomic64_t total_write_bytes;
 };

like, look at her. so organized. so many counters. she's booked and busy πŸ’œ


πŸ‘‘ Members πŸ‘‘

  • lock β€” the bouncer at the door 🫢 protects tree and nr_entries during concurrent access, so nobody's out here writing while someone else is reading. we love a safety queen.
  • tree β€” a red-black tree of per-subvolume entries, keyed by subvolume_id. literally the whole point of the struct, she holds everyone's little folder πŸ“
  • nr_entries β€” the number of entries currently in tree. simple. iconic. a headcount.
  • enabled β€” whether collection is enabled (and yeah, it requires MDS feature support β€” no feature, no vibes πŸ’€).
  • snapshot_attempts β€” debug counter: total ceph_subvolume_metrics_snapshot calls. she be counting attempts fr fr.
  • snapshot_empty β€” debug counter: snapshots that found no data to report. the "nothing to see here" count πŸ™ˆ
  • snapshot_failures β€” debug counter: snapshots that failed to allocate memory. 😭 the sad ones.
  • record_calls β€” debug counter: total ceph_subvolume_metrics_record calls.
  • record_disabled β€” debug counter: record calls skipped because disabled. not her fault, she was literally off duty.
  • record_no_subvol β€” debug counter: record calls skipped (no subvolume_id). no id, no entry, that's the rule bestie ✨
  • total_read_ops β€” cumulative read ops across all snapshots (never reset β€” like, ever. periodt.)
  • total_read_bytes β€” cumulative bytes read across all snapshots (never reset πŸ’…)
  • total_write_ops β€” cumulative write ops across all snapshots (never reset πŸ”₯)
  • total_write_bytes β€” cumulative bytes written across all snapshots (never reset πŸ‘‘)
ngl the four total_* counters are the real ones β€” they never reset, so they just keep climbing forever. respect the grind. 🌈

πŸ’– SEE ALSO πŸ’–

  • Kernel file ./fs/ceph/subvolume_metrics.h struct
  • ceph_subvol_metric_snapshot(9)

go read those too, iykyk 🧚


and that's the whole page, bestie! this lil beauty lives in ./fs/ceph and the version vibes are dated October 2026 β€” see you in the future, mwah! πŸ’•πŸŽ€πŸ¦‹πŸŒΊπŸ“β­πŸ’œ

πŸ“¦ where this page comes from