Revert "Btrfs: race free update of commit root for ro snapshots"
This reverts commit 9c3b306e. Switching only one commit root during a transaction is wrong because it leads the fs into an inconsistent state. All commit roots should be switched at once, at transaction commit time, otherwise backref walking can often miss important references that were only accessible through the old commit root. Plus, the root item for the snapshot's root wasn't getting updated and preventing the next transaction commit to do it. This made several users get into random corruption issues after creation of readonly snapshots. A regression test for xfstests will follow soon. Cc: firstname.lastname@example.org # 3.17 Signed-off-by: Filipe Manana <email@example.com> Signed-off-by: Chris Mason <firstname.lastname@example.org>
Showing with 33 additions and 36 deletions