diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-10-26 15:58:25 +0100 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-03 12:13:50 +0100 |
commit | 062e4fee4400f283307cf8ac1b7931c939010229 (patch) | |
tree | cacea4a2f65688ad02fa572060155783c4f0377c /fs/ubifs/ubifs-media.h | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog (diff) | |
download | linux-062e4fee4400f283307cf8ac1b7931c939010229.tar.xz linux-062e4fee4400f283307cf8ac1b7931c939010229.zip |
UBIFS: slight compression optimization
If data does not compress, it is better to leave it uncompressed
because we'll read it faster then. So do not compress data if we
save less than 64 bytes.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs-media.h')
-rw-r--r-- | fs/ubifs/ubifs-media.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ubifs/ubifs-media.h b/fs/ubifs/ubifs-media.h index 0b378042a3a2..b25fc36cf72f 100644 --- a/fs/ubifs/ubifs-media.h +++ b/fs/ubifs/ubifs-media.h @@ -51,6 +51,13 @@ */ #define UBIFS_MIN_COMPR_LEN 128 +/* + * If compressed data length is less than %UBIFS_MIN_COMPRESS_DIFF bytes + * shorter than uncompressed data length, UBIFS preferes to leave this data + * node uncompress, because it'll be read faster. + */ +#define UBIFS_MIN_COMPRESS_DIFF 64 + /* Root inode number */ #define UBIFS_ROOT_INO 1 |