summaryrefslogtreecommitdiff
path: root/fs/btrfs/compression.h
diff options
context:
space:
mode:
authorDennis Zhou <dennis@kernel.org>2019-02-04 15:19:59 -0500
committerDavid Sterba <dsterba@suse.com>2019-02-25 14:13:31 +0100
commitca4ac360af94964906149efe166453ac83ae7c43 (patch)
tree7f236453654db2b790e84bbf978260416a1f01bc /fs/btrfs/compression.h
parentacce85de12e68baaef77719685dd8d026a94e7dc (diff)
btrfs: manage heuristic workspace as index 0
While the heuristic workspaces aren't really compression workspaces, they use the same interface for managing them. So rather than branching, let's just handle them once again as the index 0 compression type. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Dennis Zhou <dennis@kernel.org> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.h')
-rw-r--r--fs/btrfs/compression.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h
index 004db0b3111b..9a0e73c65b87 100644
--- a/fs/btrfs/compression.h
+++ b/fs/btrfs/compression.h
@@ -132,6 +132,10 @@ struct btrfs_compress_op {
void (*set_level)(struct list_head *ws, unsigned int type);
};
+/* The heuristic workspaces are managed via the 0th workspace manager */
+#define BTRFS_NR_WORKSPACE_MANAGERS (BTRFS_COMPRESS_TYPES + 1)
+
+extern const struct btrfs_compress_op btrfs_heuristic_compress;
extern const struct btrfs_compress_op btrfs_zlib_compress;
extern const struct btrfs_compress_op btrfs_lzo_compress;
extern const struct btrfs_compress_op btrfs_zstd_compress;