]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: zoned: show statistics about zoned filesystems in mountstats
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 17 Dec 2025 13:41:37 +0000 (14:41 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:49:12 +0000 (07:49 +0100)
commit6a5ac228d4ad05c250de0bf06713d81bfb70c714
treee5692a3dcf5ddb9e92c69d72037b954d7e061955
parent68d4ece9c30e966ebb92798ea54a7777daff384b
btrfs: zoned: show statistics about zoned filesystems in mountstats

Add statistics output to /proc/<pid>/mountstats for zoned BTRFS, similar
to the zoned statistics from XFS in mountstats.

The output for /proc/<pid>/mountstats on an example filesystem will be as
follows:

  device /dev/vda mounted on /mnt with fstype btrfs
    zoned statistics:
          active block-groups: 7
            reclaimable: 0
            unused: 5
            need reclaim: false
          data relocation block-group: 1342177280
          active zones:
            start: 1073741824, wp: 268419072 used: 0, reserved: 268419072, unusable: 0
            start: 1342177280, wp: 0 used: 0, reserved: 0, unusable: 0
            start: 1610612736, wp: 49152 used: 16384, reserved: 16384, unusable: 16384
            start: 1879048192, wp: 950272 used: 131072, reserved: 622592, unusable: 196608
            start: 2147483648, wp: 212238336 used: 0, reserved: 212238336, unusable: 0
            start: 2415919104, wp: 0 used: 0, reserved: 0, unusable: 0
            start: 2684354560, wp: 0 used: 0, reserved: 0, unusable: 0

Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c
fs/btrfs/zoned.c
fs/btrfs/zoned.h