bcachefs: BCH_IOCTL_DEV_USAGE_V2
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 24 Nov 2023 00:26:27 +0000 (19:26 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:38 +0000 (11:47 -0500)
commite6674decb2195999ae9fe074bf048ba91e336144
treed348698f40080701cfa63b5c98a8d6a4e0095709
parent3b05b8e08292eafec277e8780d79b2a2d8584af2
bcachefs: BCH_IOCTL_DEV_USAGE_V2

BCH_IOCTL_DEV_USAGE mistakenly put the per-data-type array in struct
bch_ioctl_dev_usage; since ioctl numbers encode the size of the arg,
that means adding new data types breaks the ioctl.

This adds a new version that includes the number of data types as a
parameter: the old version is fixed at 10 so as to not break when adding
new types.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs_ioctl.h
fs/bcachefs/chardev.c