diff options
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 280165581c57..ac23476beb6e 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -645,7 +645,8 @@ again: | |||
645 | * we haven't filled the empty size and the window is | 645 | * we haven't filled the empty size and the window is |
646 | * very large. reset and try again | 646 | * very large. reset and try again |
647 | */ | 647 | */ |
648 | if (next->offset - window_start > (bytes + empty_size) * 2) { | 648 | if (next->offset - (last->offset + last->bytes) > 128 * 1024 || |
649 | next->offset - window_start > (bytes + empty_size) * 2) { | ||
649 | entry = next; | 650 | entry = next; |
650 | window_start = entry->offset; | 651 | window_start = entry->offset; |
651 | window_free = entry->bytes; | 652 | window_free = entry->bytes; |