Btrfs: compression: separate heuristic/compression workspaces
authorTimofey Titovets <nefelim4ag@gmail.com>
Thu, 28 Sep 2017 14:33:36 +0000 (17:33 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 1 Nov 2017 19:45:35 +0000 (20:45 +0100)
commit4e439a0b184f014a5833fa468af36cc9f59b8fb1
treecaf20ea247d44cfb0aa65421d0e41c93d8b7964a
parentddfae63cc8e03ef48622cb780e6c66367b2d4f1a
Btrfs: compression: separate heuristic/compression workspaces

Compression heuristic itself is not a compression type, as current
infrastructure provides workspaces for several compression types, it's
difficult to just add heuristic workspace.

Just refactor the code to support compression/heuristic workspaces with
maximum code sharing and minimum changes in it.

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