]> git.baikalelectronics.ru Git - kernel.git/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)
committerChris Mason <clm@fb.com>
Tue, 25 Nov 2014 15:41:23 +0000 (07:41 -0800)
commitc7cdae358c9f99f12e725b3eae14f44afff60a9c
treee30b50c0b5143544ca2aa4205b151a70fe9ea1e2
parentb8daadc4462dbee0e2ee9ffde98fb2c970d4e7d0
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>
fs/btrfs/ioctl.c
fs/btrfs/send.c