]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/compress.c
Update bcachefs sources to a1b6677dca57 bcachefs: Fix looping around bch2_propagate_k...
[bcachefs-tools-debian] / libbcachefs / compress.c
index 6b17f7cc5860aacdbcd7a389444bfcee38dd1840..1480b64547b0c961d7a62f06071e8bffcf7e35a8 100644 (file)
@@ -3,7 +3,6 @@
 #include "checksum.h"
 #include "compress.h"
 #include "extents.h"
-#include "io.h"
 #include "super-io.h"
 
 #include <linux/lz4.h>
@@ -571,7 +570,6 @@ void bch2_fs_compress_exit(struct bch_fs *c)
 static int __bch2_fs_compress_init(struct bch_fs *c, u64 features)
 {
        size_t decompress_workspace_size = 0;
-       bool decompress_workspace_needed;
        ZSTD_parameters params = zstd_get_params(zstd_max_clevel(),
                                                 c->opts.encoded_extent_max);
        struct {
@@ -581,7 +579,8 @@ static int __bch2_fs_compress_init(struct bch_fs *c, u64 features)
                size_t                          decompress_workspace;
        } compression_types[] = {
                { BCH_FEATURE_lz4, BCH_COMPRESSION_TYPE_lz4,
-                       max_t(size_t, LZ4_MEM_COMPRESS, LZ4HC_MEM_COMPRESS) },
+                       max_t(size_t, LZ4_MEM_COMPRESS, LZ4HC_MEM_COMPRESS),
+                       0 },
                { BCH_FEATURE_gzip, BCH_COMPRESSION_TYPE_gzip,
                        zlib_deflate_workspacesize(MAX_WBITS, DEF_MEM_LEVEL),
                        zlib_inflate_workspacesize(), },
@@ -620,9 +619,6 @@ static int __bch2_fs_compress_init(struct bch_fs *c, u64 features)
                if (!(features & (1 << i->feature)))
                        continue;
 
-               if (i->decompress_workspace)
-                       decompress_workspace_needed = true;
-
                if (mempool_initialized(&c->compress_workspace[i->type]))
                        continue;