Re: [PATCH] btrfs: fix return value when race occur between balance and cancel/pause

From: xiaoshoukui
Date: Thu Aug 10 2023 - 22:35:55 EST


The first thought to solve the problem was to use locks, but after practice,
it turn it out that this would made the original code even more complex.

The way of tracking status may just a workaround solution. The better solution
may is to refactor balance relevant code.

I think interface provided to the user is very important for reliability.
Looking forward to a better solution, If needed, I can take some effort
for testing and reproducing.