diff options
author | Josef Bacik <jbacik@fb.com> | 2015-03-16 21:38:52 (GMT) |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2015-03-17 20:36:31 (GMT) |
commit | 6a3891c551268dd4ff0969b883c4c8b8d974db8f (patch) | |
tree | e9727d171e09a8468fc8ac759de743b84e018ad6 /fs/btrfs/extent-tree.c | |
parent | bcb7e449ec6350121ac7ca138c0b050ba7caca47 (diff) | |
download | linux-6a3891c551268dd4ff0969b883c4c8b8d974db8f.tar.xz |
Btrfs: add sanity test for outstanding_extents accounting
I introduced a regression wrt outstanding_extents accounting. These are tricky
areas that aren't easily covered by xfstests as we could change MAX_EXTENT_SIZE
at any time. So add sanity tests to cover the various conditions that are
tricky in order to make sure we don't introduce regressions in the future.
Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 3ac3fef..d1ca86e 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -5285,6 +5285,9 @@ void btrfs_delalloc_release_metadata(struct inode *inode, u64 num_bytes) if (dropped > 0) to_free += btrfs_calc_trans_metadata_size(root, dropped); + if (btrfs_test_is_dummy_root(root)) + return; + trace_btrfs_space_reservation(root->fs_info, "delalloc", btrfs_ino(inode), to_free, 0); if (root->fs_info->quota_enabled) { |