summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-09-23 17:14:13 (GMT)
committerChris Mason <chris.mason@oracle.com>2008-09-25 15:04:07 (GMT)
commit1c2308f8e7d8491467e0095af2b01500f1b70819 (patch)
tree598504d248cbd8b0b2a5ea90468db6e7076c92cc
parentce3ed71a58094544da1e1dc4723f1f553bb5b2d5 (diff)
downloadlinux-1c2308f8e7d8491467e0095af2b01500f1b70819.tar.xz
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>
-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 813566a..558fbe4 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,
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,