Add check for tree-log roots in btrfs_alloc_reserved_extents
authorChris Mason <chris.mason@oracle.com>
Tue, 23 Sep 2008 17:14:13 +0000 (13:14 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:07 +0000 (11:04 -0400)
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>
fs/btrfs/extent-tree.c

index 813566acc5d3aef1e6aa671d6c4ec21310b50dfe..558fbe40736870e1f4f1cf4c5bf327540e8fb8bc 100644 (file)
@@ -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,