btrfs: add sanity check when resuming balance after mount
authorDavid Sterba <dsterba@suse.com>
Tue, 20 Mar 2018 19:07:58 +0000 (20:07 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:25 +0000 (18:07 +0200)
commiteee95e3fb0c3bcda4e85fc219964f2f69a218f03
treedbdd460255f4ea9a0f6e21b95303403d0853cc0f
parent010a47bde94201d9abdab7ff04bedc17b6e8c357
btrfs: add sanity check when resuming balance after mount

Replace a WARN_ON with a proper check and message in case something goes
really wrong and resumed balance cannot set up its exclusive status.
The check is a user friendly assertion, I don't expect to ever happen
under normal circumstances.

Also document that the paused balance starts here and owns the exclusive
op status.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c