]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: do not start and wait for delalloc on snapshot roots on transaction commit
authorFilipe Manana <fdmanana@suse.com>
Tue, 27 Oct 2020 12:40:06 +0000 (12:40 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:53:43 +0000 (15:53 +0100)
commitdd5d3c0c09dcabb8839755a0faf842a19d711983
tree8a07f41ad72da9d493281cc54f583e94859b0a8d
parent731044a9800193848e5fc6ae35c4618723cc9c9a
btrfs: do not start and wait for delalloc on snapshot roots on transaction commit

We do not need anymore to start writeback for delalloc of roots that are
being snapshotted and wait for it to complete. This was done in commit
0ac3a13debc50c ("Btrfs: fix file corruption after snapshotting due to mix
of buffered/DIO writes") to fix a type of file corruption where files in a
snapshot end up having their i_size updated in a non-ordered way, leaving
implicit file holes, when buffered IO writes that increase a file's size
are followed by direct IO writes that also increase the file's size.

This is not needed anymore because we now have a more generic mechanism
to prevent a non-ordered i_size update since commit 1503497a6777b8
("btrfs: use the file extent tree infrastructure"), which addresses this
scenario involving snapshots as well.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c