Skip to content

Balance management, kernel side

Hugo Mills linux-btrfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/22 patches 11 repliesIn review
  2. v2 posting 1/23 patches 0 repliesSuperseded
  3. v12 patches 2 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Balance progress monitoring.fs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/ioctl.c +2 more+111 -20 replies
2/2Cancel filesystem balance.fs/btrfs/ctree.h fs/btrfs/ioctl.c fs/btrfs/ioctl.h +1 more+37 -29 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] Balance management, kernel side

These two patches give a degree of control over balance operations.
The first makes it possible to get an idea of how much work remains to do, by tracking the number of block groups (chunks) that need to be moved/rewritten. The second patch allows a running balance operation to be cancelled when the current block group has been moved.

Since the last version, I've added some more locking (assigning to
a u64 isn't atomic on non-64-bit architectures). I've not added the sysfs bits, as I haven't had a chance to try out Goffredo's sysfs code yet. I've also not implemented liubo's suggestion of tracking the current block group ID (I'll take that discussion up with him separately -- basically it's not a good fit with the "polling" method required by this ioctl).

Hugo Mills (2):
Balance progress monitoring.
Cancel filesystem balance.

 fs/btrfs/ctree.h   |   10 ++++++++
 fs/btrfs/disk-io.c |    2 +
 fs/btrfs/ioctl.c   |   62 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/ioctl.h   |    8 ++++++
 fs/btrfs/volumes.c |   66 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 146 insertions(+), 2 deletions(-)