btrfs: compression: attach workspace manager to the ops
There's a lot of indirection when the generic code calls into algo-specific callbacks to reach the private workspace manager structure and back to the generic code. To simplify that, export the workspace manager for heuristic, LZO and ZLIB, while ZSTD is going to use it's own manager. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -920,6 +920,7 @@ fail:
|
||||
}
|
||||
|
||||
const struct btrfs_compress_op btrfs_heuristic_compress = {
|
||||
.workspace_manager = &heuristic_wsm,
|
||||
.init_workspace_manager = heuristic_init_workspace_manager,
|
||||
.cleanup_workspace_manager = heuristic_cleanup_workspace_manager,
|
||||
.get_workspace = heuristic_get_workspace,
|
||||
|
Reference in New Issue
Block a user