Whamcloud - gitweb
EX-7601 obd: move type switching to alloc_compr callers
The code is much cleaner if we can eliminated applied type
and handle that issue once per compression or decompression
rather than for every chunk. This requires moving the type
switching inside alloc_compr. (Also improve some error
messages - alloc_compr can fail with ENOMEM as well.)
The compression code currently allocates a transform for
every chunk on the client. This is relatively cheap, but
it also complicates the code by repeatedly checking if a
particular compression type is supported (this is the
"applied type" code).
Moving alloc_compr to compress/decompress request makes the
code much simpler.
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I162e81577db721a9715d57b3f262fcabbcbf308a
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53103
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>