diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-12-16 17:53:59 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:33 -0400 |
commit | 22502ac23a2eaa3714b77d4a9242df352a9cd0c0 (patch) | |
tree | bb4b1a751942623c49d507ef00d6ab28667d1695 /fs/bcachefs/bcachefs_format.h | |
parent | 184b1dc1a6bf4bc53a1c71bf14120498aad67ff5 (diff) | |
download | lwn-22502ac23a2eaa3714b77d4a9242df352a9cd0c0.tar.gz lwn-22502ac23a2eaa3714b77d4a9242df352a9cd0c0.zip |
bcachefs: Redo filesystem usage ioctls
When disk space accounting was changed to be tracked by replicas entry,
the ioctl interface was never update: this patch finally does that.
Aditionally, the BCH_IOCTL_USAGE ioctl is now broken out into separate
ioctls for filesystem and device usage.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs_format.h')
-rw-r--r-- | fs/bcachefs/bcachefs_format.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h index e3004593874c..9b8fc265a5c0 100644 --- a/fs/bcachefs/bcachefs_format.h +++ b/fs/bcachefs/bcachefs_format.h @@ -1084,6 +1084,9 @@ struct bch_replicas_entry { __u8 devs[]; } __attribute__((packed)); +#define replicas_entry_bytes(_i) \ + (offsetof(typeof(*(_i)), devs) + (_i)->nr_devs) + struct bch_sb_field_replicas { struct bch_sb_field field; struct bch_replicas_entry entries[]; |