Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275851
b: refs/heads/master
c: 0f0fbf1
h: refs/heads/master
i:
  275849: f55bcdf
  275847: f2ce2eb
v: v3
  • Loading branch information
Li Zefan authored and Chris Mason committed Nov 20, 2011
1 parent 62e5757 commit 44049db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32240a913d9f3a5aad42175d7696590ea1bfdb08
refs/heads/master: 0f0fbf1d0e188d129756e9508090af4bdbfde00b
12 changes: 12 additions & 0 deletions trunk/fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2453,10 +2453,22 @@ setup_cluster_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *entry;
struct rb_node *node;
int ret = -ENOSPC;
u64 bitmap_offset = offset_to_bitmap(ctl, offset);

if (ctl->total_bitmaps == 0)
return -ENOSPC;

/*
* The bitmap that covers offset won't be in the list unless offset
* is just its start offset.
*/
entry = list_first_entry(bitmaps, struct btrfs_free_space, list);
if (entry->offset != bitmap_offset) {
entry = tree_search_offset(ctl, bitmap_offset, 1, 0);
if (entry && list_empty(&entry->list))
list_add(&entry->list, bitmaps);
}

/*
* First check our cached list of bitmaps and see if there is an entry
* here that will work.
Expand Down

0 comments on commit 44049db

Please sign in to comment.