]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: heuristic: add byte set calculation
authorTimofey Titovets <nefelim4ag@gmail.com>
Thu, 28 Sep 2017 14:33:40 +0000 (17:33 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 1 Nov 2017 19:45:36 +0000 (20:45 +0100)
commitea3c7792f254daa6cba26198bbfe06bc1a2eb7ff
treed305a7ac88dfe4507782d0b7f92f244087c36fb5
parent05b26451e71f81baadd307a1108981ee0c5bb163
Btrfs: heuristic: add byte set calculation

Calculate byte set size for data sample:
- calculate how many unique bytes have been in the sample
- for all bytes count > 0, check if we're still in the low count range
  (~25%), such data are easily compressible, otherwise furhter analysis
  is needed

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update comments ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c