aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-09-23 13:14:13 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:07 -0400
commit1c2308f8e7d8491467e0095af2b01500f1b70819 (patch)
tree598504d248cbd8b0b2a5ea90468db6e7076c92cc /fs
parentce3ed71a58094544da1e1dc4723f1f553bb5b2d5 (diff)
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: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent-tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 813566acc5d3..558fbe407368 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2365,6 +2365,9 @@ int btrfs_alloc_reserved_extent(struct btrfs_trans_handle *trans,
2365 struct btrfs_key *ins) 2365 struct btrfs_key *ins)
2366{ 2366{
2367 int ret; 2367 int ret;
2368
2369 if (root_objectid == BTRFS_TREE_LOG_OBJECTID)
2370 return 0;
2368 maybe_lock_mutex(root); 2371 maybe_lock_mutex(root);
2369 ret = __btrfs_alloc_reserved_extent(trans, root, root_objectid, 2372 ret = __btrfs_alloc_reserved_extent(trans, root, root_objectid,
2370 ref_generation, owner, 2373 ref_generation, owner,