diff options
author | Timofey Titovets <nefelim4ag@gmail.com> | 2017-07-17 16:52:58 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-08-16 16:12:04 +0200 |
commit | c2fcdcdf36bba08c5d2fbf4f17c2d8a944bfd4df (patch) | |
tree | 3d7ef1596b198197daa7039ee50fd6ee98321e81 /fs/btrfs/compression.h | |
parent | 131ce4367a8f37c6609148117a051d86cd55a5d9 (diff) |
Btrfs: add skeleton code for compression heuristic
Add skeleton code for compresison heuristics. Now it iterates over all
the pages, but in the end always says "yes, compress please", ie it does
not change the current behaviour.
In the future we're going to add various heuristics to analyze the data.
This patch can be used as a baseline for measuring if the effectivness
and performance.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ enhanced changelog, modified comments ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.h')
-rw-r--r-- | fs/btrfs/compression.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index 87f6d3332163..8508ba6b9aef 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -129,4 +129,6 @@ struct btrfs_compress_op { extern const struct btrfs_compress_op btrfs_zlib_compress; extern const struct btrfs_compress_op btrfs_lzo_compress; +int btrfs_compress_heuristic(struct inode *inode, u64 start, u64 end); + #endif |