bcachefs: Update sysfs compression_stats for snapshots
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 28 Dec 2021 00:58:12 +0000 (19:58 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:20 +0000 (17:09 -0400)
commit862bfd5062a0a512369ae647b94310ee873f95f3
tree53e708206fcd12899992fe45c68f75e1b484c70f
parent13f914ecb99b84e6c10cbbeba375e41735239828
bcachefs: Update sysfs compression_stats for snapshots

 - BTREE_ITER_ALL_SNAPSHOTS flag is required here
 - change it to also walk the reflink btree
 - change it to accumulate stats for all pointers in an extent
 - change it to account for incompressible data

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/sysfs.c