projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Btrfs: add sanity tests for new qgroup accounting code
[linux-2.6-block.git]
/
fs
/
btrfs
/
ctree.c
diff --git
a/fs/btrfs/ctree.c
b/fs/btrfs/ctree.c
index bbbe4f1c5086cd82e1fffd0e72f3acc2528928b2..d99d9651dd58dc2e04ba9b2fdefc8b309bf31943 100644
(file)
--- a/
fs/btrfs/ctree.c
+++ b/
fs/btrfs/ctree.c
@@
-1506,6
+1506,10
@@
static inline int should_cow_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct extent_buffer *buf)
{
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+ if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state)))
+ return 0;
+#endif
/* ensure we can see the force_cow */
smp_rmb();