btrfs: compression: add helper for type to string conversion
authorDavid Sterba <dsterba@suse.com>
Tue, 31 Oct 2017 16:24:26 +0000 (17:24 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:16 +0000 (16:08 +0100)
commite128f9c3f7242318e1c76d204c7ae32bc878b8c7
treef481867c52ea0a6889aead29b254782b23f5e055
parentbf8d32b9b3c5fb183aa4ac5cb7bae9580dcb0dfb
btrfs: compression: add helper for type to string conversion

There are several places opencoding this conversion, add a helper now
that we have 3 compression algorithms.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/compression.h