diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-01-24 17:54:51 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:15 -0400 |
commit | 3ccc5c50f29fb6934fb71e12983f1f2beabe29b9 (patch) | |
tree | c2c01b1592b4a0420e1c525d2fc3b8d4b933188d /fs/bcachefs/replicas.h | |
parent | 2c5af169f72c1018e83b79ac82ffe387534910e8 (diff) |
bcachefs: Write out fs usage
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/replicas.h')
-rw-r--r-- | fs/bcachefs/replicas.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/replicas.h b/fs/bcachefs/replicas.h index 4fabe0372ec3..35164887dffb 100644 --- a/fs/bcachefs/replicas.h +++ b/fs/bcachefs/replicas.h @@ -57,6 +57,11 @@ unsigned bch2_dev_has_data(struct bch_fs *, struct bch_dev *); int bch2_replicas_gc_end(struct bch_fs *, int); int bch2_replicas_gc_start(struct bch_fs *, unsigned); +#define for_each_cpu_replicas_entry(_r, _i) \ + for (_i = (_r)->entries; \ + (void *) (_i) < (void *) (_r)->entries + (_r)->nr * (_r)->entry_size;\ + _i = (void *) (_i) + (_r)->entry_size) + /* iterate over superblock replicas - used by userspace tools: */ #define replicas_entry_bytes(_i) \ |