]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: assert that relocation is protected with sb_start_write()
authorNaohiro Aota <naohiro.aota@wdc.com>
Tue, 29 Mar 2022 06:56:00 +0000 (15:56 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:10 +0000 (17:03 +0200)
commit9bf4bc06f633b65c3040b4de6744380923fcc980
tree5eacf6d28a3167b16dcde194cc7b82714a4f06b6
parent2af8cd6a31366381db0f85e956676f13e3dea23f
btrfs: assert that relocation is protected with sb_start_write()

Relocation of a data block group creates ordered extents. They can cause
a hang when a process is trying to thaw the filesystem.

We should have called sb_start_write(), so the filesystem is not being
frozen. Add an ASSERT to check it is protected.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
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/relocation.c