Skip to content

Commit

Permalink
Add check for tree-log roots in btrfs_alloc_reserved_extents
Browse files Browse the repository at this point in the history
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: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent ce3ed71 commit 1c2308f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2365,6 +2365,9 @@ int btrfs_alloc_reserved_extent(struct btrfs_trans_handle *trans,
struct btrfs_key *ins)
{
int ret;

if (root_objectid == BTRFS_TREE_LOG_OBJECTID)
return 0;
maybe_lock_mutex(root);
ret = __btrfs_alloc_reserved_extent(trans, root, root_objectid,
ref_generation, owner,
Expand Down

0 comments on commit 1c2308f

Please sign in to comment.