Skip to content

Commit

Permalink
Updated the lz4 decompressor
Browse files Browse the repository at this point in the history
As an experiment, I stole the lz4 decompressor from
upstream lz4 (1.9.3), and landed it.

Feedback suggested that keeping the vendor lz4 code isolated and
unlinted was probably reasonable, so I lobbed it into its own file.

It also seemed reasonable to put the mostly-untouched* code into
lz4.c proper, and relegate the integrated and ZFS-specific code to
lz4_zfs.c.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes #12805
  • Loading branch information
rincebrain authored Jan 7, 2022
1 parent 862d5df commit d6c1bbd
Show file tree
Hide file tree
Showing 7 changed files with 1,726 additions and 883 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ cstyle:
! -name 'zfs_config.*' ! -name '*.mod.c' \
! -name 'opt_global.h' ! -name '*_if*.h' \
! -path './module/zstd/lib/*' \
! -path './module/zfs/lz4.c' \
$(cstyle_line)

filter_executable = -exec test -x '{}' \; -print
Expand Down
1 change: 1 addition & 0 deletions config/ax_code_coverage.m4
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
# Ignore tmp and tests themselves
CODE_COVERAGE_IGNORE_PATTERN ?= "/tmp/*" "*/tests/*"
CODE_COVERAGE_IGNORE_PATTERN += "*/module/zstd/lib/*"
CODE_COVERAGE_IGNORE_PATTERN += "*/module/zfs/lz4.c"
GITIGNOREFILES ?=
GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
Expand Down
1 change: 1 addition & 0 deletions lib/libzpool/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ KERNEL_C = \
gzip.c \
hkdf.c \
lz4.c \
lz4_zfs.c \
lzjb.c \
metaslab.c \
mmp.c \
Expand Down
3 changes: 2 additions & 1 deletion module/Makefile.bsd
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ SRCS+= abd.c \
gzip.c \
lzjb.c \
lz4.c \
lz4_zfs.c \
metaslab.c \
mmp.c \
multilist.c \
Expand Down Expand Up @@ -352,7 +353,7 @@ CFLAGS.dsl_deadlist.c= -Wno-cast-qual
CFLAGS.dsl_prop.c= -Wno-cast-qual
CFLAGS.edonr.c=-Wno-cast-qual
CFLAGS.fm.c= -Wno-cast-qual
CFLAGS.lz4.c= -Wno-cast-qual
CFLAGS.lz4_zfs.c= -Wno-cast-qual
CFLAGS.spa.c= -Wno-cast-qual
CFLAGS.spa_misc.c= -Wno-cast-qual
CFLAGS.sysctl_os.c= -include ../zfs_config.h
Expand Down
1 change: 1 addition & 0 deletions module/zfs/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ $(MODULE)-objs += fm.o
$(MODULE)-objs += gzip.o
$(MODULE)-objs += hkdf.o
$(MODULE)-objs += lz4.o
$(MODULE)-objs += lz4_zfs.o
$(MODULE)-objs += lzjb.o
$(MODULE)-objs += metaslab.o
$(MODULE)-objs += mmp.o
Expand Down
Loading

0 comments on commit d6c1bbd

Please sign in to comment.