diff options
author | Josef Bacik <jbacik@fb.com> | 2015-10-02 22:09:42 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-22 03:55:40 +0200 |
commit | cef404837002103584c7c82f1e3fc3ec5961f47b (patch) | |
tree | 85707bf5ecc1a773cddbf47e152eb41741b52619 /fs/btrfs/free-space-cache.h | |
parent | Btrfs: don't keep trying to build clusters if we are fragmented (diff) | |
download | linux-cef404837002103584c7c82f1e3fc3ec5961f47b.tar.xz linux-cef404837002103584c7c82f1e3fc3ec5961f47b.zip |
Btrfs: keep track of largest extent in bitmaps
We can waste a lot of time searching through bitmaps when we are heavily
fragmented trying to find large contiguous areas that don't exist in the bitmap.
So keep track of the max extent size when we do a full search of a bitmap so
that next time around we can just skip the expensive searching if our max size
is less than what we are looking for. Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
-rw-r--r-- | fs/btrfs/free-space-cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h index a16a029ad3b1..f251865eb6f3 100644 --- a/fs/btrfs/free-space-cache.h +++ b/fs/btrfs/free-space-cache.h @@ -23,6 +23,7 @@ struct btrfs_free_space { struct rb_node offset_index; u64 offset; u64 bytes; + u64 max_extent_size; unsigned long *bitmap; struct list_head list; }; |