]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephfs-tool: Add filesystem statistics reporting before and after benchmark runs
authorEdwin Rodriguez <edwin.rodriguez1@ibm.com>
Thu, 18 Jun 2026 14:14:43 +0000 (10:14 -0400)
committerEdwin Rodriguez <edwin.rodriguez1@ibm.com>
Wed, 1 Jul 2026 13:11:15 +0000 (09:11 -0400)
commitc8d115ee5d8f780d41764154dcce211e59e401fa
tree25fbed6048df13f8158880f4f2313371780b61af
parentd9dbfde2b7df6f1eaa3aa8ef93a01d456c0f45a9
cephfs-tool: Add filesystem statistics reporting before and after benchmark runs

Added filesystem stats reporting to cephfs-tool.cc.

Helper functions
• fetch_statvfs() — uses ceph_ll_statfs on the root inode when --async-io
  is set, otherwise ceph_statfs on mount_root
• report_fs_stats() — prints and optionally JSON-encodes:
  • Total / free blocks
  • File count

When it runs
• Before the iteration loop (after the bench directory is created)
• After all iterations finish (before the final report and optional cleanup)

Console output example

Filesystem statistics (before iterations):
  Total blocks:      ...
  Free blocks:       ...
  Files:             ...

JSON output (when --json is used) adds a filesystem_stats section with before
and after objects containing the same fields.

Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
src/tools/cephfs/cephfs-tool.cc