• Josef Bacik's avatar
    Btrfs: make sure we wait on logged extents when fsycning two subvols · 9dba8cf1
    Josef Bacik authored
    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: default avatarJosef Bacik <jbacik@fb.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    9dba8cf1
tree-log.c 119 KB