Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128542
b: refs/heads/master
c: 5cf6642
h: refs/heads/master
v: v3
  • Loading branch information
Yan authored and Chris Mason committed Sep 25, 2008
1 parent 13cfc25 commit d8e8ceb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e5745dcaf73c5860a16c09572d59383ecee6d28
refs/heads/master: 5cf664263b05beb080bf95037e4c3bd50c80b096
10 changes: 3 additions & 7 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,9 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(struct
return NULL;

block_group = (struct btrfs_block_group_cache *)(unsigned long)ptr;


if (block_group->key.objectid <= bytenr && bytenr <=
if (block_group->key.objectid <= bytenr && bytenr <
block_group->key.objectid + block_group->key.offset)
return block_group;

return NULL;
}
static u64 find_search_start(struct btrfs_root *root,
Expand Down Expand Up @@ -195,7 +192,7 @@ static u64 find_search_start(struct btrfs_root *root,
continue;
}
if (data != BTRFS_BLOCK_GROUP_MIXED &&
start + num >= cache->key.objectid + cache->key.offset)
start + num > cache->key.objectid + cache->key.offset)
goto new_group;
return start;
}
Expand Down Expand Up @@ -1088,9 +1085,8 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root

if (ins->objectid + num_bytes >= search_end)
goto enospc;

if (!full_scan && data != BTRFS_BLOCK_GROUP_MIXED &&
ins->objectid + num_bytes >= block_group->
ins->objectid + num_bytes > block_group->
key.objectid + block_group->key.offset) {
search_start = block_group->key.objectid +
block_group->key.offset;
Expand Down

0 comments on commit d8e8ceb

Please sign in to comment.