summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik2018-11-30 17:52:13 +0100
committerDavid Sterba2018-12-17 14:51:48 +0100
commit83354f0772cd07828b0fcdf1ef2872fd2032acb8 (patch)
treed552f12d1a5870ce7be0c6fceff361f558b96265 /fs/btrfs/ctree.h
parentbtrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down (diff)
downloadkernel-qcow2-linux-83354f0772cd07828b0fcdf1ef2872fd2032acb8.tar.gz
kernel-qcow2-linux-83354f0772cd07828b0fcdf1ef2872fd2032acb8.tar.xz
kernel-qcow2-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.h1
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,
};
/*