}
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,
void (*free_workspace)(struct list_head *workspace);
+ struct workspace_manager *workspace_manager;
/* Maximum level supported by the compression algorithm */
unsigned int max_level;
unsigned int default_level;
}
const struct btrfs_compress_op btrfs_lzo_compress = {
+ .workspace_manager = &wsm,
.init_workspace_manager = lzo_init_workspace_manager,
.cleanup_workspace_manager = lzo_cleanup_workspace_manager,
.get_workspace = lzo_get_workspace,
}
const struct btrfs_compress_op btrfs_zlib_compress = {
+ .workspace_manager = &wsm,
.init_workspace_manager = zlib_init_workspace_manager,
.cleanup_workspace_manager = zlib_cleanup_workspace_manager,
.get_workspace = zlib_get_workspace,
}
const struct btrfs_compress_op btrfs_zstd_compress = {
+ /* ZSTD uses own workspace manager */
+ .workspace_manager = NULL,
.init_workspace_manager = zstd_init_workspace_manager,
.cleanup_workspace_manager = zstd_cleanup_workspace_manager,
.get_workspace = zstd_get_workspace,