diff options
author | Josef Bacik <jbacik@fb.com> | 2018-11-30 17:52:13 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:48 +0100 |
commit | 83354f0772cd07828b0fcdf1ef2872fd2032acb8 (patch) | |
tree | d552f12d1a5870ce7be0c6fceff361f558b96265 /fs/btrfs/ctree.h | |
parent | btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down (diff) | |
download | linux-83354f0772cd07828b0fcdf1ef2872fd2032acb8.tar.xz linux-83354f0772cd07828b0fcdf1ef2872fd2032acb8.zip |
btrfs: catch cow on deleting snapshots
When debugging some weird extent reference bug I suspected that we were
changing a snapshot while we were deleting it, which could explain my
bug. This was indeed what was happening, and this patch helped me
verify my theory. It is never correct to modify the snapshot once it's
being deleted, so mark the root when we are deleting it and make sure we
complain about it when it happens.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 6520e8e70b09..f031a447a047 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1197,6 +1197,7 @@ enum { BTRFS_ROOT_FORCE_COW, BTRFS_ROOT_MULTI_LOG_TASKS, BTRFS_ROOT_DIRTY, + BTRFS_ROOT_DELETING, }; /* |