Commit 1c2308f8 authored by Chris Mason's avatar Chris Mason

Add check for tree-log roots in btrfs_alloc_reserved_extents

Tree log blocks are only reserved, and should not ever get fully
allocated on disk.  This check makes sure they stay out of the
extent tree.
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent ce3ed71a
...@@ -2365,6 +2365,9 @@ int btrfs_alloc_reserved_extent(struct btrfs_trans_handle *trans, ...@@ -2365,6 +2365,9 @@ int btrfs_alloc_reserved_extent(struct btrfs_trans_handle *trans,
struct btrfs_key *ins) struct btrfs_key *ins)
{ {
int ret; int ret;
if (root_objectid == BTRFS_TREE_LOG_OBJECTID)
return 0;
maybe_lock_mutex(root); maybe_lock_mutex(root);
ret = __btrfs_alloc_reserved_extent(trans, root, root_objectid, ret = __btrfs_alloc_reserved_extent(trans, root, root_objectid,
ref_generation, owner, ref_generation, owner,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment