Skip to content

device option handling improvements

Kent Overstreet linux-bcachefs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5bcachefs: Kill BCH_DEV_OPT_SETTERS()fs/bcachefs/opts.c fs/bcachefs/opts.h fs/bcachefs/sb-members_format.h +1 more+80 -870 replies
2/5bcachefs: Device options now use standard sysfs codefs/bcachefs/opts.c fs/bcachefs/opts.h fs/bcachefs/super.c +3 more+69 -630 replies
3/5bcachefs: Setting foreground_target at runtime now triggers rebalancefs/bcachefs/sysfs.c+1 -00 replies
4/5bcachefs: Device state is now a runtime optionfs/bcachefs/opts.c fs/bcachefs/opts.h fs/bcachefs/sysfs.c+11 -10 replies
5/5bcachefs: Filesystem discard option now propagates to devicesfs/bcachefs/alloc_background.c fs/bcachefs/bcachefs.h fs/bcachefs/fs.c +1 more+28 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] device option handling improvements

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(-)
Signature · 1 line
2.49.0