]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make sure we wait on logged extents when fsycning two subvols
authorJosef Bacik <jbacik@fb.com>
Thu, 6 Nov 2014 15:19:54 +0000 (10:19 -0500)
committerChris Mason <clm@fb.com>
Fri, 21 Nov 2014 01:20:10 +0000 (17:20 -0800)
commit6aec4a523233935c3b7d2608505f8adb32c77306
treec8ad17c372a4a8c8f8fdfd49c27cf93ab473fbbc
parenteb7370f635d1e0b5fb8a14ad336c29668ec39d63
Btrfs: make sure we wait on logged extents when fsycning two subvols

If we have two fsync()'s race on different subvols one will do all of its work
to get into the log_tree, wait on it's outstanding IO, and then allow the
log_tree to finish it's commit.  The problem is we were just free'ing that
subvols logged extents instead of waiting on them, so whoever lost the race
wouldn't really have their data on disk.  Fix this by waiting properly instead
of freeing the logged extents.  Thanks,

cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/tree-log.c