diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-28 20:00:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-28 20:00:19 -0500 |
commit | 67d2433ee7aa631bc3ab14c2af6bbc1d44d13a00 (patch) | |
tree | eb29e1489f9f4a99308e08568328de73fb89fc2e /fs/btrfs/free-space-cache.c | |
parent | 1c36ab1a318ab5b3b502e7e4fff3628d1a97861f (diff) | |
parent | 9998eb703490589c3e8f1bf09b15203156776edb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: fix reservations in btrfs_page_mkwrite
Btrfs: advance window_start if we're using a bitmap
btrfs: mask out gfp flags in releasepage
Btrfs: fix enospc error caused by wrong checks of the chunk
Btrfs: do not defrag a file partially
Btrfs: fix warning for 32-bit build of fs/btrfs/check-integrity.c
Btrfs: use cluster->window_start when allocating from a cluster bitmap
Btrfs: Check for NULL page in extent_range_uptodate
btrfs: Fix busyloops in transaction waiting code
Btrfs: make sure a bitmap has enough bytes
Btrfs: fix uninit warning in backref.c
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index d20ff87ca603..c2f20594c9f7 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -2242,7 +2242,7 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group, | |||
2242 | if (entry->bitmap) { | 2242 | if (entry->bitmap) { |
2243 | ret = btrfs_alloc_from_bitmap(block_group, | 2243 | ret = btrfs_alloc_from_bitmap(block_group, |
2244 | cluster, entry, bytes, | 2244 | cluster, entry, bytes, |
2245 | min_start); | 2245 | cluster->window_start); |
2246 | if (ret == 0) { | 2246 | if (ret == 0) { |
2247 | node = rb_next(&entry->offset_index); | 2247 | node = rb_next(&entry->offset_index); |
2248 | if (!node) | 2248 | if (!node) |
@@ -2251,6 +2251,7 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group, | |||
2251 | offset_index); | 2251 | offset_index); |
2252 | continue; | 2252 | continue; |
2253 | } | 2253 | } |
2254 | cluster->window_start += bytes; | ||
2254 | } else { | 2255 | } else { |
2255 | ret = entry->offset; | 2256 | ret = entry->offset; |
2256 | 2257 | ||
@@ -2475,7 +2476,7 @@ setup_cluster_bitmap(struct btrfs_block_group_cache *block_group, | |||
2475 | } | 2476 | } |
2476 | 2477 | ||
2477 | list_for_each_entry(entry, bitmaps, list) { | 2478 | list_for_each_entry(entry, bitmaps, list) { |
2478 | if (entry->bytes < min_bytes) | 2479 | if (entry->bytes < bytes) |
2479 | continue; | 2480 | continue; |
2480 | ret = btrfs_bitmap_cluster(block_group, entry, cluster, offset, | 2481 | ret = btrfs_bitmap_cluster(block_group, entry, cluster, offset, |
2481 | bytes, cont1_bytes, min_bytes); | 2482 | bytes, cont1_bytes, min_bytes); |