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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Sep 2019 07:08:02 +0000 (09:08 +0200)
commitfae7ff46beb2445153ba500c134dba606b81ea20
tree4460acb16c19d57288478d6be92f75490f845a54
parentf37ed9bc10eca7e771ad3c14bfd04bdd29bcf37a
btrfs: compression: add helper for type to string conversion

commit e128f9c3f7242318e1c76d204c7ae32bc878b8c7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/compression.c
fs/btrfs/compression.h