Skip to content

balance: check balance errors on background

Marcos Paulo de Souza linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: balance: Don't set stderr to /dev/null on balance_startcmds/balance.c+0 -20 replies
2/2btrfs-progs: balance: Verify EINPROGRESS on background balancecmds/balance.c+15 -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 btrfs-progs 0/2] balance: check balance errors on background

From: Marcos Paulo de Souza <[email protected]>

The first patch removes the close/open operation of stderr, so we can receive errors of balance when starting in the background.

The second patch waits up to three seconds after started the balance process, to check is some problem happened to the balance process. This is done only when the user issues the "balance start" in background mode.

This was tested by issuing running "btrfs balance start --background --full-balance <path>", when the balance started, issue the same command again in the same terminal:

# ./btrfs balance start --background --full-balance /mnt
# ./btrfs balance start --background --full-balance /mnt
ERROR: error during balancing '/mnt': Operation now in progress

These two patches together fixes the issue 167[1].

Please review,
Thanks.

[1]: https://github.com/kdave/btrfs-progs/issues/167

Marcos Paulo de Souza (2):
btrfs-progs: balance: Don't set stderr to /dev/null on balance_start
btrfs-progs: balance: Verify EINPROGRESS on background balance

 cmds/balance.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
Signature · 1 line
2.23.0