[RFC PATCH v4 2/2] Btrfs: add heuristic method for make decision compress or not compress

2017-07-01 Thread Timofey Titovets
Add a heuristic computation before compression, for avoiding load resource heavy compression workspace, if data are probably can't be compressed Signed-off-by: Timofey Titovets --- fs/btrfs/Makefile| 2 +- fs/btrfs/heuristic.c | 336

[RFC PATCH v4 1/2] Btrfs: add precomputed log2()

2017-07-01 Thread Timofey Titovets
Heuristic code compute shannon entropy in cases when other methods can't make clear decision For realization that calculation it's needs floating point, but as this doesn't possible to use floating point, lets just precalculate all our input/output values Signed-off-by: Timofey Titovets

[RFC PATCH v4 0/2] Btrfs: add compression heuristic

2017-07-01 Thread Timofey Titovets
Today btrfs use simple logic to make decision compress data or not: Selected compression algorithm try compress data and if this save some space store that extent as compressed. It's Reliable way to detect uncompressible data but it's will waste/burn cpu time for bad/un-compressible data and add

Re: Very slow balance / btrfs-transaction

2017-07-01 Thread Sidney San Martín
February 3, 2017 11:26 PM, "Goldwyn Rodrigues" wrote: > On 02/03/2017 04:13 PM, j...@capsec.org wrote: > > Hi, > > > > > > I'm currently running a balance (without any filters) on a 4 drives raid1 > > filesystem. The array contains 3 3TB drives and one 6TB drive; I'm

Btrfs check reports errors, filesystem seems fine

2017-07-01 Thread Filippe LeMarchand
Hello everyone. I have an btrfs root partition on Intel 530 ssd, which mounts without errors and seem to work fine, but `btrfs check` gives me foloowing output (and --repair doesn't remove errors): enabling repair mode Checking filesystem on /dev/sda2 UUID: 12c84aa3-ce65-4390-807e-a72cc8a7445e