[PATCH 0/3] better error messages for ioctls

Kent Overstreet
2025-08-29T06:54:18Z

This fixes a common user complaint - uninformative error messages from
various bcachefs-tools commands.

Add v2 versions of various ioctls that include a 'struct
bch_ioctl_err_mesg', a pointer to a userspace buffer for an error
message - and plumb a printbuf through various code for returning
errors.

Kent Overstreet (3):
bcachefs: Add v2 ioctls that return error strings
bcachefs: v2 versions of subvolume ioctls
bcachefs: Plumb error messages through data drop paths

fs/bcachefs/bcachefs_ioctl.h | 87 ++++++++++++++-----
fs/bcachefs/chardev.c | 159 +++++++++++++++++++++++++++++++++--
fs/bcachefs/chardev.h | 3 +
fs/bcachefs/ec.c | 23 +++--
fs/bcachefs/ec.h | 5 +-
fs/bcachefs/fs-ioctl.c | 91 ++++++++++++++++++--
fs/bcachefs/migrate.c | 55 ++++++------
fs/bcachefs/migrate.h | 4 +-
fs/bcachefs/super.c | 6 +-
9 files changed, 359 insertions(+), 74 deletions(-)

--
2.50.1