diff options
author | Josef Bacik <jbacik@fb.com> | 2014-05-08 01:06:09 +0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-06-10 04:20:49 +0400 |
commit | faa2dbf004e89e8f7ccd28fbe6f07c308417b8ae (patch) | |
tree | b700876fe08b8830d4e8686c039f4241cc9cb5e2 /fs/btrfs/backref.c | |
parent | fcebe4562dec83b3f8d3088d77584727b09130b2 (diff) |
Btrfs: add sanity tests for new qgroup accounting code
This exercises the various parts of the new qgroup accounting code. We do some
basic stuff and do some things with the shared refs to make sure all that code
works. I had to add a bunch of infrastructure because I needed to be able to
insert items into a fake tree without having to do all the hard work myself,
hopefully this will be usefull in the future. Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 10db21fa0926..f09aa18ab710 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -900,7 +900,11 @@ again: goto out; BUG_ON(ret == 0); +#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS + if (trans && likely(trans->type != __TRANS_DUMMY)) { +#else if (trans) { +#endif /* * look if there are updates for this ref queued and lock the * head |