diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-09-11 15:54:42 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:07 -0400 |
commit | d00aff00139b40f2e9c60299d76aac29d72e48ba (patch) | |
tree | 3ef3d84c42dc809cd92ab6339abd968fdede357d /fs/btrfs/disk-io.c | |
parent | 3a5f1d458ad1610a06e38f0be2fbc6ac215439c0 (diff) |
Btrfs: Optimize tree log block allocations
Since tree log blocks get freed every transaction, they never really
need to be written to disk. This skips the step where we update
metadata to record they were allocated.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 7c06eb4ecfdd..5edb7f885799 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -829,9 +829,8 @@ int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, | |||
829 | WARN_ON(btrfs_header_level(eb) != 0); | 829 | WARN_ON(btrfs_header_level(eb) != 0); |
830 | WARN_ON(btrfs_header_nritems(eb) != 0); | 830 | WARN_ON(btrfs_header_nritems(eb) != 0); |
831 | 831 | ||
832 | ret = btrfs_free_extent(trans, fs_info->tree_root, | 832 | ret = btrfs_free_reserved_extent(fs_info->tree_root, |
833 | eb->start, eb->len, | 833 | eb->start, eb->len); |
834 | BTRFS_TREE_LOG_OBJECTID, 0, 0, 0, 1); | ||
835 | BUG_ON(ret); | 834 | BUG_ON(ret); |
836 | 835 | ||
837 | free_extent_buffer(eb); | 836 | free_extent_buffer(eb); |