]> 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)
commitb59e8bfb6bebc5b9bb60407fd487eb7e83cf1f42
tree8a07f41ad72da9d493281cc54f583e94859b0a8d
parenta6c4dbd3e3c73f5b267f7daf5ec8af3395a9b16d
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
aee834836cbc6f ("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 c15568e67accf3
("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