summaryrefslogtreecommitdiff
path: root/fs/bcachefs/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-09-27 21:08:39 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2018-10-12 15:11:05 -0400
commit1d9d943f38eccda1412a557bf37b7ee8457da513 (patch)
tree38eabb6d34c6fbc469bac23949dcb2acd490ef3b /fs/bcachefs/sysfs.c
parent00b09c7893c267f649982fef9b7134269f6061ff (diff)
bcachefs: extent_for_each_ptr_decode()
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r--fs/bcachefs/sysfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 3038b455209f..481269201389 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -282,19 +282,19 @@ static ssize_t bch2_compression_stats(struct bch_fs *c, char *buf)
for_each_btree_key(&iter, c, BTREE_ID_EXTENTS, POS_MIN, 0, k)
if (k.k->type == BCH_EXTENT) {
struct bkey_s_c_extent e = bkey_s_c_to_extent(k);
- const struct bch_extent_ptr *ptr;
- struct bch_extent_crc_unpacked crc;
+ const union bch_extent_entry *entry;
+ struct extent_ptr_decoded p;
- extent_for_each_ptr_crc(e, ptr, crc) {
- if (crc.compression_type == BCH_COMPRESSION_NONE) {
+ extent_for_each_ptr_decode(e, p, entry) {
+ if (p.crc.compression_type == BCH_COMPRESSION_NONE) {
nr_uncompressed_extents++;
uncompressed_sectors += e.k->size;
} else {
nr_compressed_extents++;
compressed_sectors_compressed +=
- crc.compressed_size;
+ p.crc.compressed_size;
compressed_sectors_uncompressed +=
- crc.uncompressed_size;
+ p.crc.uncompressed_size;
}
/* only looking at the first ptr */