]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: mark resumed async balance as writing
authorNaohiro Aota <naohiro.aota@wdc.com>
Tue, 29 Mar 2022 06:55:58 +0000 (15:55 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 5 Apr 2022 22:49:50 +0000 (00:49 +0200)
commit2f45799a02908dbf8edcdcbd165d71608cb25596
tree996c090e12c2bbe40b8ecf9f311d5608fae67f4b
parent5852bfd3ea0fa507aed1ef9fcaf96a30a1960c22
btrfs: mark resumed async balance as writing

When btrfs balance is interrupted with umount, the background balance
resumes on the next mount. There is a potential deadlock with FS freezing
here like as described in commit 26559780b953 ("btrfs: zoned: mark
relocation as writing"). Mark the process as sb_writing to avoid it.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
CC: stable@vger.kernel.org # 4.9+
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c