]> git.hungrycats.org Git - linux/commit
Btrfs: ensure send always works on roots without orphans
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Oct 2014 10:11:41 +0000 (11:11 +0100)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 23 Jan 2015 13:17:54 +0000 (08:17 -0500)
commit8e19968561ab8c99d2b6d4c48a66b5bfa7386205
treed0e03e29045c6c3c9bda651fb309650309f63b34
parent3f9633eadb4f642ebbc7abafeeca861e5f94f623
Btrfs: ensure send always works on roots without orphans

Move the logic from the snapshot creation ioctl into send. This avoids
doing the transaction commit if send isn't used, and ensures that if
a crash/reboot happens after the transaction commit that created the
snapshot and before the transaction commit that switched the commit
root, send will not get a commit root that differs from the main root
(that has orphan items).

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit e5fa8f865b3324aebd055e4054bf479cbab37e5a)
fs/btrfs/ioctl.c
fs/btrfs/send.c