Previously, device options had a fair bit of special casing - superblock
getter/setters, sysfs code.

This does a fair bit of cleanup and unifying, to fix a couple things

- discard option should now be working properly in all cases, i.e. when
  set at format time
- with the latest tools, all the device options can be set at device add
  time, in particular data_allowed and state (for spare/ro)

The io path option state changes are still a bit more "special" than I'd
like, but foreground_target now also triggers a rebalance when
necessary.

Kent Overstreet (5):
  bcachefs: Kill BCH_DEV_OPT_SETTERS()
  bcachefs: Device options now use standard sysfs code
  bcachefs: Setting foreground_target at runtime now triggers rebalance
  bcachefs: Device state is now a runtime option
  bcachefs: Filesystem discard option now propagates to devices

 fs/bcachefs/alloc_background.c  |  15 +++-
 fs/bcachefs/bcachefs.h          |   3 +-
 fs/bcachefs/fs.c                |   3 +
 fs/bcachefs/opts.c              | 117 +++++++++++++++--------------
 fs/bcachefs/opts.h              |  52 ++++++-------
 fs/bcachefs/sb-members_format.h |   1 +
 fs/bcachefs/super-io.c          |   8 +-
 fs/bcachefs/super.c             |   6 +-
 fs/bcachefs/sysfs.c             | 126 ++++++++++++++++++--------------
 fs/bcachefs/sysfs.h             |   5 +-
 fs/bcachefs/xattr.c             |   2 +-
 11 files changed, 187 insertions(+), 151 deletions(-)

-- 
2.49.0


Reply via email to