Re: [syzbot] [zstd] UBSAN: array-index-out-of-bounds in FSE_decompress_wksp_body_bmi2

2023-10-12 Thread Nick Terrell
> On Oct 12, 2023, at 4:13 PM, Kees Cook wrote: > > !---| > This Message Is From an External Sender > > |---! > > On Thu, Oct 12, 2023 a

Re: [syzbot] [zstd] UBSAN: array-index-out-of-bounds in FSE_decompress_wksp_body_bmi2

2023-10-12 Thread Nick Terrell
FSE_DTable dtable[]; /* Dynamically sized */ > } FSE_DecompressWksp; Thanks Eric and Kees for the report and the fix! I am working on putting this patch up now, just need to test the fix myself to ensure I can reproduce the issue and the fix. In your opinion does this worth trying to get th

Re: [GIT PULL][PATCH v9 0/3] Update to zstd-1.4.10

2021-04-14 Thread Nick Terrell
On Wed, Apr 14, 2021 at 12:04 PM Eric Biggers wrote: > > On Wed, Apr 14, 2021 at 11:53:51AM -0700, Nick Terrell wrote: > > On Wed, Apr 14, 2021 at 11:35 AM Eric Biggers wrote: > > > > > > On Wed, Apr 14, 2021 at 11:01:29AM -0700, Nick Terrell wrote: > > > &

Re: [GIT PULL][PATCH v9 0/3] Update to zstd-1.4.10

2021-04-14 Thread Nick Terrell
On Wed, Apr 14, 2021 at 11:35 AM Eric Biggers wrote: > > On Wed, Apr 14, 2021 at 11:01:29AM -0700, Nick Terrell wrote: > > Hi all, > > > > I would really like to make some progress on this and get it merged. > > This patchset offsers: > > * 15-30% better decom

Re: [GIT PULL][PATCH v9 0/3] Update to zstd-1.4.10

2021-04-14 Thread Nick Terrell
k On Fri, Apr 9, 2021 at 2:39 PM Nick Terrell wrote: > > What can I do to help get this merged? > > Cristoph, is this new patch series with the kernel wrapper API satisfactory? > > Best, > Nick > > On Tue, Mar 30, 2021 at 3:45 PM Nick Terrell wrote: > > > >

Re: [GIT PULL][PATCH v9 0/3] Update to zstd-1.4.10

2021-04-09 Thread Nick Terrell
What can I do to help get this merged? Cristoph, is this new patch series with the kernel wrapper API satisfactory? Best, Nick On Tue, Mar 30, 2021 at 3:45 PM Nick Terrell wrote: > > From: Nick Terrell > > Please pull from > > g...@github.com:terrelln/linux.git tags/v9-

[PATCH v9 2/3] lib: zstd: Add decompress_sources.h for decompress_unzstd

2021-03-30 Thread Nick Terrell
From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Inste

[PATCH v9 1/3] lib: zstd: Add kernel-specific API

2021-03-30 Thread Nick Terrell
From: Nick Terrell This patch: - Moves `include/linux/zstd.h` -> `include/linux/zstd_lib.h` - Updates modified zstd headers to yearless copyright - Adds a new API in `include/linux/zstd.h` that is functionally equivalent to the in-use subset of the current API. Functions are renamed to av

[GIT PULL][PATCH v9 0/3] Update to zstd-1.4.10

2021-03-30 Thread Nick Terrell
From: Nick Terrell Please pull from g...@github.com:terrelln/linux.git tags/v9-zstd-1.4.10 to get these changes. Alternatively the patchset is included. This patchset upgrades the zstd library to the latest upstream release. The current zstd version in the kernel is a modified version of

Re: [PATCH v8 1/3] lib: zstd: Add kernel-specific API

2021-03-28 Thread Nick Terrell
On Sat, Mar 27, 2021 at 2:48 PM Oleksandr Natalenko wrote: > > Hello. > > On Sat, Mar 27, 2021 at 05:48:01PM +0800, kernel test robot wrote: > > >> ERROR: modpost: "ZSTD_maxCLevel" [fs/f2fs/f2fs.ko] undefined! > > Since f2fs can be built as a module, the following correction seems to > be needed:

Re: [PATCH v8 3/3] lib: zstd: Upgrade to latest upstream zstd version 1.4.10

2021-03-26 Thread Nick Terrell
url: > https://github.com/0day-ci/linux/commits/Nick-Terrell/Update-to-zstd-1-4-10/20210327-031827 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > config: um-allmodconfig (attached as .config) > compiler: gcc-9 (Debian 9

[PATCH v8 2/3] lib: zstd: Add decompress_sources.h for decompress_unzstd

2021-03-26 Thread Nick Terrell
From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Inste

[PATCH v8 0/3] Update to zstd-1.4.10

2021-03-26 Thread Nick Terrell
From: Nick Terrell Please pull from g...@github.com:terrelln/linux.git tags/v8-zstd-1.4.10 to get these changes. Alternatively the patchset is included. This patchset upgrades the zstd library to the latest upstream release. The current zstd version in the kernel is a modified version of

[PATCH v8 1/3] lib: zstd: Add kernel-specific API

2021-03-26 Thread Nick Terrell
From: Nick Terrell This patch: - Moves `include/linux/zstd.h` -> `include/linux/zstd_lib.h` - Adds a new API in `include/linux/zstd.h` that is functionally equivalent to the in-use subset of the current API. Functions are renamed to avoid symbol collisions with zstd, to make it clear it

Re: [PATCH v3 13/14] lib/zstd: Convert constants to defines

2021-01-23 Thread Nick Terrell
erSize_min ZSTD_FRAMEHEADERSIZE_MIN > +#define ZSTD_frameHeaderSize_max ZSTD_FRAMEHEADERSIZE_MAX > /* magic number + skippable frame length */ > -static const size_t ZSTD_skippableHeaderSize = 8; > +#define ZSTD_skippableHeaderSize 8 > > > /*-******

Re: [f2fs-dev] [PATCH v7 0/3] Update to zstd-1.4.6

2020-12-18 Thread Nick Terrell
> On Dec 16, 2020, at 5:23 PM, Michał Mirosław wrote: > > On Wed, Dec 16, 2020 at 10:07:38PM +0000, Nick Terrell wrote: > [...] >> It is very large. If it helps, in the commit message I’ve provided this link >> [0], >> which provides the diff between upstream zs

Re: [f2fs-dev] [PATCH v7 0/3] Update to zstd-1.4.6

2020-12-16 Thread Nick Terrell
> On Dec 16, 2020, at 10:50 AM, David Sterba wrote: > > On Wed, Dec 16, 2020 at 11:58:07AM +1100, Herbert Xu wrote: >> On Wed, Dec 16, 2020 at 12:48:51AM +0000, Nick Terrell wrote: >>> >>> Thanks for the advice! The first zstd patches went through Herbert’s

Re: [f2fs-dev] [PATCH v7 0/3] Update to zstd-1.4.6

2020-12-15 Thread Nick Terrell
> On Dec 15, 2020, at 4:58 PM, Herbert Xu wrote: > > On Wed, Dec 16, 2020 at 12:48:51AM +0000, Nick Terrell wrote: >> >> Thanks for the advice! The first zstd patches went through Herbert’s tree, >> which is >> why I’ve sent them this way. > > So

Re: [f2fs-dev] [PATCH v7 0/3] Update to zstd-1.4.6

2020-12-15 Thread Nick Terrell
> On Dec 15, 2020, at 4:00 PM, Eric Biggers wrote: > > On Tue, Dec 15, 2020 at 08:58:52PM +0000, Nick Terrell via Linux-f2fs-devel > wrote: >> >> >>> On Dec 3, 2020, at 12:51 PM, Nick Terrell wrote: >>> >>> From: Nick Terrell >>

Re: [PATCH v7 0/3] Update to zstd-1.4.6

2020-12-15 Thread Nick Terrell
> On Dec 3, 2020, at 12:51 PM, Nick Terrell wrote: > > From: Nick Terrell > > Please pull from > > g...@github.com:terrelln/linux.git tags/v7-zstd-1.4.6 > > to get these changes. Alternatively the patchset is included. Is it possible to get this patchset merg

Re: (2) [PATCH 1/4] zstd: pass pointer rathen than structure to functions

2019-06-06 Thread Nick Terrell
> On Jun 6, 2019, at 7:10 AM, Vaneet Narang wrote: > > Hi Andrew / David, > > >>> > > -ZSTD_parameters params = ZSTD_getParams(level, src_len, 0); >>> > > +static ZSTD_parameters params; >>> > >>> > > + >>> > > +params = ZSTD_getParams(level, src_len, 0); >>>

Re: [PATCH 00/11] btrfs: add zstd compression level support

2019-01-29 Thread Nick Terrell
> On Jan 29, 2019, at 9:18 AM, David Sterba wrote: > > On Mon, Jan 28, 2019 at 04:24:26PM -0500, Dennis Zhou wrote: >> As mentioned above, a requirement that differs zstd from zlib is that >> higher levels of compression require more memory. To manage this, each >> compression level has its ow

Re: [PATCH v7 0/2] btrfs: Add zstd support to grub btrfs

2018-11-26 Thread Nick Terrell
> On Nov 19, 2018, at 12:34 PM, Daniel Kiper wrote: > > On Mon, Nov 19, 2018 at 11:20:06AM -0800, Nick Terrell wrote: >> Hi all, >> >> This patch set imports the upstream zstd library, adds zstd support to the >> btrfs module, and adds a test case. I'v

[PATCH v7 2/2] btrfs: Add zstd support to grub btrfs

2018-11-19 Thread Nick Terrell
ssion. A test case was also added to the test suite that fails before the patch, and passes after. Signed-off-by: Nick Terrell Reviewed-by: Daniel Kiper --- v1 -> v2: - Fix comments from Daniel Kiper. v2 -> v3: - Use grub_error() to set grub_errno in grub_btrfs_zstd_decompress(). - Fi

[PATCH v7 0/2] btrfs: Add zstd support to grub btrfs

2018-11-19 Thread Nick Terrell
Hi all, This patch set imports the upstream zstd library, adds zstd support to the btrfs module, and adds a test case. I've also tested the patch set by storing my boot partition in btrfs with and without zstd compression and rebooting. Best, Nick Terrell Changelog: v1 -> v2: - S

Re: [PATCH v6 2/2] btrfs: Add zstd support to grub btrfs

2018-11-19 Thread Nick Terrell
> On Nov 19, 2018, at 7:11 AM, Daniel Kiper wrote: > >> On Mon, Nov 19, 2018 at 03:22:51PM +0100, Daniel Kiper wrote: >>> On Thu, Nov 15, 2018 at 02:36:03PM -0800, Nick Terrell wrote: >>> - Adds zstd support to the btrfs module. >>> - Adds a test cas

Re: [PATCH v2] btrfs: add zstd compression level support

2018-11-15 Thread Nick Terrell
> On Nov 13, 2018, at 5:29 AM, Timofey Titovets wrote: > > вт, 13 нояб. 2018 г. в 04:52, Nick Terrell : >> >> >> >>> On Nov 12, 2018, at 4:33 PM, David Sterba wrote: >>> >>> On Wed, Oct 31, 2018 at 11:11:08AM -0700, Nick Terrel

[PATCH v6 2/2] btrfs: Add zstd support to grub btrfs

2018-11-15 Thread Nick Terrell
ssion. A test case was also added to the test suite that fails before the patch, and passes after. Signed-off-by: Nick Terrell --- v1 -> v2: - Fix comments from Daniel Kiper. v2 -> v3: - Use grub_error() to set grub_errno in grub_btrfs_zstd_decompress(). - Fix style and formatting comments

[PATCH v6 0/2] btrfs: Add zstd support to grub btrfs

2018-11-15 Thread Nick Terrell
Hi all, This patch set imports the upstream zstd library, adds zstd support to the btrfs module, and adds a test case. I've also tested the patch set by storing my boot partition in btrfs with and without zstd compression and rebooting. Best, Nick Terrell Changelog: v1 -> v2: - S

Re: [PATCH v2] btrfs: add zstd compression level support

2018-11-12 Thread Nick Terrell
> On Nov 12, 2018, at 4:33 PM, David Sterba wrote: > > On Wed, Oct 31, 2018 at 11:11:08AM -0700, Nick Terrell wrote: >> From: Jennifer Liu >> >> Adds zstd compression level support to btrfs. Zstd requires >> different amounts of memory for each level, so th

[PATCH v5 2/2] btrfs: Add zstd support to grub btrfs

2018-11-12 Thread Nick Terrell
ssion. A test case was also added to the test suite that fails before the patch, and passes after. Signed-off-by: Nick Terrell --- v1 -> v2: - Fix comments from Daniel Kiper. v2 -> v3: - Use grub_error() to set grub_errno in grub_btrfs_zstd_decompress(). - Fix style and formatting comments

[PATCH v5 0/2] btrfs: Add zstd support to grub btrfs

2018-11-12 Thread Nick Terrell
Hi all, This patch set imports the upstream zstd library, adds zstd support to the btrfs module, and adds a test case. I've also tested the patch set by storing my boot partition in btrfs with and without zstd compression and rebooting. Best, Nick Terrell Changelog: v1 -> v2: - S

Re: [PATCH v4 1/2] Import upstream zstd-1.3.6

2018-11-06 Thread Nick Terrell
> On Nov 6, 2018, at 6:48 AM, Daniel Kiper wrote: > > On Wed, Oct 31, 2018 at 10:56:16AM -0700, Nick Terrell wrote: >> Import zstd-1.3.6 from upstream [1]. Only the files need for decompression >> are imported. Additionally makes zstd a module by adding module.c which &g

Re: [PATCH v2] btrfs: add zstd compression level support

2018-11-01 Thread Nick Terrell
> On Nov 1, 2018, at 5:57 AM, Timofey Titovets wrote: > > ср, 31 окт. 2018 г. в 21:12, Nick Terrell : >> >> From: Jennifer Liu >> >> Adds zstd compression level support to btrfs. Zstd requires >> different amounts of memory for each level, so th

[PATCH v2] btrfs: add zstd compression level support

2018-10-31 Thread Nick Terrell
2.9510 MB/s111 MB/s2.3 MB 14 2.997 MB/s110 MB/s2.6 MB 15 3.036 MB/s110 MB/s2.6 MB [0] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia Signed-off-by: Jennifer Liu Signed-off-by: Nick Terrell Reviewed-by: Omar Sandoval

[PATCH v4 2/2] btrfs: Add zstd support to grub btrfs

2018-10-31 Thread Nick Terrell
Adds zstd support to the btrfs module. Tested on Ubuntu-18.04 with a btrfs /boot partition with and without zstd compression. A test case was also added to the test suite that fails before the patch, and passes after. Signed-off-by: Nick Terrell --- v1 -> v2: - Fix comments from Daniel Ki

[PATCH v4 0/2] btrfs: Add zstd support to grub btrfs

2018-10-31 Thread Nick Terrell
"zstd-1.3.6/lib" DST_LIB="grub-core/lib/zstd" rm -rf $DST_LIB mkdir -p $DST_LIB cp $SRC_LIB/zstd.h $DST_LIB/ cp $SRC_LIB/common/*.[hc] $DST_LIB/ cp $SRC_LIB/decompress/*.[hc] $DST_LIB/ rm $DST_LIB/{pool.[hc],threading.[hc]} rm -rf zstd-1.3.6* echo SUCCESS! ``` Best, Nick Terrell

[PATCH] btrfs: add zstd compression level support

2018-10-30 Thread Nick Terrell
2.9510 MB/s111 MB/s2.3 MB 14 2.997 MB/s110 MB/s2.6 MB 15 3.036 MB/s110 MB/s2.6 MB [0] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia Signed-off-by: Jennifer Liu Signed-off-by: Nick Terrell --- fs/btrfs

Re: [PATCH V10] Add support for BTRFS raid5/6 to GRUB

2018-10-22 Thread Nick Terrell
> On Oct 22, 2018, at 4:02 AM, Daniel Kiper wrote: > > On Thu, Oct 18, 2018 at 07:55:32PM +0200, Goffredo Baroncelli wrote: >> >> Hi All, >> >> the aim of this patches set is to provide support for a BTRFS raid5/6 >> filesystem in GRUB. >> >> The first patch, implements the basic support fo

Re: [PATCH v3 0/2] btrfs: Add zstd support to grub btrfs

2018-10-11 Thread Nick Terrell
> On Oct 11, 2018, at 11:15 AM, Daniel Kiper wrote: > > Hi Nick, > > CC-ing Goffredo. > > On Tue, Oct 09, 2018 at 04:21:35PM -0700, Nick Terrell wrote: >> Hi all, >> >> This patch set imports the upstream zstd library, adds zstd support to the >

Re: [PATCH v3 2/2] btrfs: Add zstd support to grub btrfs

2018-10-11 Thread Nick Terrell
> On Oct 11, 2018, at 10:55 AM, Daniel Kiper wrote: > > On Tue, Oct 09, 2018 at 04:21:37PM -0700, Nick Terrell wrote: >> Adds zstd support to the btrfs module. >> >> Tested on Ubuntu-18.04 with a btrfs /boot partition with and without zstd >> compression.

Re: [PATCH v3 0/2] btrfs: Add zstd support to grub btrfs

2018-10-10 Thread Nick Terrell
> On Oct 10, 2018, at 12:34 AM, Paul Menzel wrote: > > Sorry for being ignorant, but you explain, why the library needs to be > imported and it is not enough to use that library as an external dependency? > > Importing the library means, it has to be maintained in the GRUB repository, > whi

[PATCH v3 2/2] btrfs: Add zstd support to grub btrfs

2018-10-09 Thread Nick Terrell
Adds zstd support to the btrfs module. Tested on Ubuntu-18.04 with a btrfs /boot partition with and without zstd compression. A test case was also added to the test suite that fails before the patch, and passes after. Signed-off-by: Nick Terrell --- v1 -> v2: - Fix comments from Daniel Ki

[PATCH v3 0/2] btrfs: Add zstd support to grub btrfs

2018-10-09 Thread Nick Terrell
"zstd-1.3.6/lib" DST_LIB="grub-core/lib/zstd" rm -rf $DST_LIB mkdir -p $DST_LIB cp $SRC_LIB/zstd.h $DST_LIB/ cp $SRC_LIB/common/*.[hc] $DST_LIB/ cp $SRC_LIB/decompress/*.[hc] $DST_LIB/ rm $DST_LIB/{pool.[hc],threading.[hc]} rm -rf zstd-1.3.6* echo SUCCESS! --- Best, Nick Terrell

Re: [PATCH v2 2/2] btrfs: Add zstd support to grub btrfs

2018-10-09 Thread Nick Terrell
> On Oct 9, 2018, at 12:07 PM, Daniel Kiper wrote: > On Mon, Oct 08, 2018 at 04:06:21PM -0700, Nick Terrell wrote: >> Adds zstd support to the btrfs module. I'm not sure that my changes to the >> Makefiles are correct, please let me know if I need to do something >>

[PATCH v2 2/2] btrfs: Add zstd support to grub btrfs

2018-10-08 Thread Nick Terrell
that fails before the patch, and passes after. Signed-off-by: Nick Terrell --- v1 -> v2: - Fix comments from Daniel Kiper Makefile.util.def| 10 +++- grub-core/Makefile.core.def | 10 +++- grub-core/fs/btrfs.c | 105 ++- grub-core/lib

[PATCH v2 0/2] btrfs: Add zstd support to grub btrfs

2018-10-08 Thread Nick Terrell
"zstd-1.3.6/lib" DST_LIB="grub-core/lib/zstd" rm -rf $DST_LIB mkdir -p $DST_LIB cp $SRC_LIB/zstd.h $DST_LIB/ cp $SRC_LIB/common/*.[hc] $DST_LIB/ cp $SRC_LIB/decompress/*.[hc] $DST_LIB/ rm $DST_LIB/{pool.[hc],threading.[hc]} rm -rf zstd-1.3.6* echo SUCCESS! --- Best, Nick Terrell

Re: [PATCH 1/3] btrfs: Import kernel zstd

2018-09-21 Thread Nick Terrell
> On Sep 21, 2018, at 11:10 AM, Daniel Kiper wrote: > > On Mon, Aug 27, 2018 at 06:36:52PM -0700, Nick Terrell wrote: >> Import xxhash and zstd from the upstream kernel as-is. This will not >> compile. The next patch in the series contains all the changes needed to &g

Re: Read before you deploy btrfs + zstd

2017-12-05 Thread Nick Terrell
> On Dec 5, 2017, at 7:54 AM, David Sterba wrote: > > I had a different branch with patches from openSUSE, so the diffs apply with > minimal efforts to the package. The branch btrfs-zstd has been synced up. The > ENOMEM error was not from the file decompression but from the zstdio.c module, > th

Re: [btrfs_mount] general protection fault: 0000 [#1] SMP

2017-11-29 Thread Nick Terrell
> On Nov 29, 2017, at 6:21 PM, Fengguang Wu wrote: > > Hello, > > FYI this happens in mainline kernel 4.15.0-rc1. > It looks like a new regression. Bisect is in progress. > > It occurs in 11 out of 11 xfstests run. > > [ 1456.361614] > [ 1456.918942] BTRFS info (device vdb): disk space cachin

Re: Read before you deploy btrfs + zstd

2017-11-28 Thread Nick Terrell
> On Nov 28, 2017, at 3:49 PM, David Sterba wrote: > > On Tue, Nov 28, 2017 at 09:31:57PM +0000, Nick Terrell wrote: >> >>> On Nov 21, 2017, at 8:22 AM, David Sterba wrote: >>> >>> On Wed, Nov 15, 2017 at 08:09:15PM +, Nick Terrell wrote: >&g

Re: Read before you deploy btrfs + zstd

2017-11-28 Thread Nick Terrell
> On Nov 21, 2017, at 8:22 AM, David Sterba wrote: > > On Wed, Nov 15, 2017 at 08:09:15PM +0000, Nick Terrell wrote: >> On 11/15/17, 6:41 AM, "David Sterba" wrote: >>> The branch is now in a state that can be tested. Turns out the memory >>> requ

Re: Btrfs progs pre-release 4.14-rc1

2017-11-17 Thread Nick Terrell
> On Nov 17, 2017, at 8:48 AM, Uli Heller wrote: > > I tried to compile these on ubuntu-14.04 running 4.4.0-98-generic > - I had to install libzstd-dev > - I had to disable the zstd tests > > Do you think this ends up in a working binary? Or am I doing something > strange? You'll need to inst

Re: [PATCH] btrfs: move some zstd work data from stack to workspace

2017-11-15 Thread Nick Terrell
sion test and everything worked. Is there a case where these 24 bytes matter, or is this just an easy optimization? Reviewed-by: Nick Terrell

Re: Read before you deploy btrfs + zstd

2017-11-15 Thread Nick Terrell
On 11/15/17, 6:41 AM, "David Sterba" wrote: > The branch is now in a state that can be tested. Turns out the memory > requirements are too much for grub, so the boot fails with "not enough > memory". The calculated value > > ZSTD_BTRFS_MAX_INPUT: 131072 > ZSTD_DStreamWorkspaceBound with ZSTD_BTRFS

Re: [PATCH] btrfs: fix default compression value when set by SETFLAGS ioctl

2017-10-31 Thread Nick Terrell
fo->compress_type=BTRFS_COMPRESS_NONE and the ioctl() call set the compression type to zstd before your patch, and zlib after, as expected. Tested-by: Nick Terrell > The incompat bit for zstd is not set, so this could lead to a filesystem > with a zstd compression in the extents but

Re: [PATCH preview] btrfs: allow to set compression level for zlib

2017-09-15 Thread Nick Terrell
On 9/15/17, 7:53 AM, "David Sterba" wrote: > On Sun, Aug 20, 2017 at 06:38:50PM -0600, Chris Murphy wrote: > > On Fri, Aug 18, 2017 at 10:08 AM, David Sterba wrote: > > > > > That's quite a lot, in kernel. IIRC zlib and lzo use less than 200kb, > > > zstd wants 800kb for level 1. And this needs

Re: [GIT PULL] zstd support (lib, btrfs, squashfs)

2017-09-08 Thread Nick Terrell
On 9/8/17, 6:36 PM, "Herbert Xu" wrote: > On Fri, Sep 08, 2017 at 03:33:05PM -0400, Chris Mason wrote: > > > > crypto/Kconfig |9 + > > crypto/Makefile|1 + > > crypto/testmgr.c | 10 + > > crypto/testmgr.h | 71 + > > crypto/zstd.c

[PATCH v2] btrfs-progs: Add zstd support

2017-09-08 Thread Nick Terrell
image with a zstd compressed file. The patch is also available in my fork of btrfs-progs [1], which passes Travis-CI with the new tests. The prebuilt binary is available there. I haven't updated Android.mk. [1] https://github.com/terrelln/btrfs-progs/tree/devel Signed-off-by: Nick Terrell ---

Re: [PATCH] btrfs-progs: Add zstd support

2017-09-06 Thread Nick Terrell
On 9/4/17, 11:03 AM, "linux-btrfs-ow...@vger.kernel.org on behalf of David Sterba" wrote: > On Wed, Aug 30, 2017 at 02:53:22PM -0700, Nick Terrell wrote: > > Adds zstd support to the btrfs program, and a dependency on libzstd >= > > 1.0.0. > > I'm afrai

Re: \o/ compsize

2017-09-05 Thread Nick Terrell
On 9/4/17, 8:12 AM, "Adam Borowski" wrote: > Hi! > Here's an utility to measure used compression type + ratio on a set of files > or directories: https://github.com/kilobyte/compsize > > It should be of great help for users, and also if you: > * muck with compression levels > * add new compressio

[PATCH] btrfs-progs: Add zstd support

2017-08-30 Thread Nick Terrell
d am not certain if it is used. [1] https://github.com/terrelln/btrfs-progs/tree/devel [2] https://gist.github.com/terrelln/4136a369c5d10092956781433eed0a23 Signed-off-by: Nick Terrell --- .travis.yml | 9 +++ Documentation/btrfs-filesystem.asciidoc | 2 +- Docum

Re: [PATCH v5 3/5] btrfs: Add zstd support

2017-08-10 Thread Nick Terrell
On 8/10/17, 7:13 PM, "Adam Borowski" wrote: > On Wed, Aug 09, 2017 at 07:39:02PM -0700, Nick Terrell wrote: >> Add zstd compression and decompression support to BtrFS. > > Re-tested on arm64, amd64 and i386, this time everything seems fine so far. > > As I

Re: [PATCH v5 2/5] lib: Add zstd modules

2017-08-10 Thread Nick Terrell
On 8/10/17, 10:48 AM, "Austin S. Hemmelgarn" wrote: >On 2017-08-10 13:24, Eric Biggers wrote: >>On Thu, Aug 10, 2017 at 07:32:18AM -0400, Austin S. Hemmelgarn wrote: >>>On 2017-08-10 04:30, Eric Biggers wrote: >>>>On Wed, Aug 09, 2017 at 07:35:53PM -0700

Re: [PATCH v5 2/5] lib: Add zstd modules

2017-08-10 Thread Nick Terrell
On 8/10/17, 1:30 AM, "Eric Biggers" wrote: > On Wed, Aug 09, 2017 at 07:35:53PM -0700, Nick Terrell wrote: >> >> It can compress at speeds approaching lz4, and quality approaching lzma. > > Well, for a very loose definition of "approaching", and certainly

[PATCH v5 3/5] btrfs: Add zstd support

2017-08-09 Thread Nick Terrell
[3] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia [4] https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.11.6.tar.xz zstd source repository: https://github.com/facebook/zstd Signed-off-by: Nick Terrell --- v2 -> v3: - Port upstream BtrFS commits e1ddce71d6, 389a6cfc2a, and 6acafd1

[PATCH v5 1/5] lib: Add xxhash module

2017-08-09 Thread Nick Terrell
repository: https://github.com/cyan4973/xxhash Signed-off-by: Nick Terrell --- v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const include/linux/xxhash.h | 236 +++ lib/Kconfig| 3 + lib/Makefile | 1 + lib/xxhash.c |

[PATCH v5 0/5] Add xxhash and zstd modules

2017-08-09 Thread Nick Terrell
Hi all, This patch set adds xxhash, zstd compression, and zstd decompression modules. It also adds zstd support to BtrFS and SquashFS. Each patch has relevant summaries, benchmarks, and tests. Best, Nick Terrell Changelog: v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const (1/5) -

Re: [PATCH preview] btrfs: allow to set compression level for zlib

2017-08-04 Thread Nick Terrell
On 8/4/17, 6:27 PM, "Adam Borowski" wrote: > On Fri, Aug 04, 2017 at 09:51:44PM +, Nick Terrell wrote: > > On 07/25/2017 01:29 AM, David Sterba wrote: > > > Preliminary support for setting compression level for zlib, the > > > following works: > >

Re: [PATCH v4 4/5] squashfs: Add zstd support

2017-08-04 Thread Nick Terrell
On 8/4/17, 3:10 PM, "linus...@gmail.com on behalf of Linus Torvalds" wrote: > On Fri, Aug 4, 2017 at 1:19 PM, Nick Terrell wrote: > > > > This patch was written by Sean Purcell , but I will be > > taking over the submission process. > > Please, if so, ge

Re: [PATCH preview] btrfs: allow to set compression level for zlib

2017-08-04 Thread Nick Terrell
On 07/25/2017 01:29 AM, David Sterba wrote: > Preliminary support for setting compression level for zlib, the > following works: Thanks for working on this, I think it is a great feature. I have a few comments relating to how it would work with zstd. > > $ mount -o compess=zlib #

[PATCH v4 5/5] crypto: Add zstd support

2017-08-04 Thread Nick Terrell
Adds zstd support to crypto and scompress. Only supports the default level. Signed-off-by: Nick Terrell --- crypto/Kconfig | 9 ++ crypto/Makefile | 1 + crypto/testmgr.c | 10 +++ crypto/testmgr.h | 71 +++ crypto/zstd.c| 265

[PATCH v4 4/5] squashfs: Add zstd support

2017-08-04 Thread Nick Terrell
://github.com/facebook/zstd Cc: Sean Purcell Signed-off-by: Nick Terrell --- v3 -> v4: - Fix minor linter warnings fs/squashfs/Kconfig| 14 + fs/squashfs/Makefile | 1 + fs/squashfs/decompressor.c | 7 +++ fs/squashfs/decompressor.h | 4 ++ fs/squashfs/squashfs_fs.h |

[PATCH v4 3/5] btrfs: Add zstd support

2017-08-04 Thread Nick Terrell
[3] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia [4] https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.11.6.tar.xz zstd source repository: https://github.com/facebook/zstd Signed-off-by: Nick Terrell --- v2 -> v3: - Port upstream BtrFS commits e1ddce71d6, 389a6cfc2a, and 6acafd1

[PATCH v4 1/5] lib: Add xxhash module

2017-08-04 Thread Nick Terrell
repository: https://github.com/cyan4973/xxhash Signed-off-by: Nick Terrell --- v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const include/linux/xxhash.h | 236 +++ lib/Kconfig| 3 + lib/Makefile | 1 + lib/xxhash.c |

[PATCH v4 0/5] Add xxhash and zstd modules

2017-08-04 Thread Nick Terrell
Hi all, This patch set adds xxhash, zstd compression, and zstd decompression modules. It also adds zstd support to BtrFS and SquashFS. Each patch has relevant summaries, benchmarks, and tests. Best, Nick Terrell Changelog: v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const (1/5) -

Re: [PATCH v3 4/4] squashfs: Add zstd support

2017-07-31 Thread Nick Terrell
On 7/30/17, 6:50 PM, "Phillip Lougher" wrote: > On Thu, Jul 20, 2017 at 10:27 PM, Nick Terrell wrote: >> Add zstd compression and decompression support to SquashFS. zstd is a >> great fit for SquashFS because it can compress at ratios approaching xz, >> while deco

[PATCH v3 3/4] btrfs: Add zstd support

2017-07-20 Thread Nick Terrell
[3] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia [4] https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.11.6.tar.xz zstd source repository: https://github.com/facebook/zstd Signed-off-by: Nick Terrell --- v2 -> v3: - Port upstream BtrFS commits e1ddce71d6, 389a6cfc2a, and 6acafd1

[PATCH v3 4/4] squashfs: Add zstd support

2017-07-20 Thread Nick Terrell
://github.com/facebook/zstd Cc: Sean Purcell Signed-off-by: Nick Terrell --- fs/squashfs/Kconfig| 14 + fs/squashfs/Makefile | 1 + fs/squashfs/decompressor.c | 7 +++ fs/squashfs/decompressor.h | 4 ++ fs/squashfs/squashfs_fs.h | 1 + fs/squashfs/zstd_wrapper.c | 150

[PATCH v3 1/4] lib: Add xxhash module

2017-07-20 Thread Nick Terrell
repository: https://github.com/cyan4973/xxhash Signed-off-by: Nick Terrell --- v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const include/linux/xxhash.h | 236 +++ lib/Kconfig| 3 + lib/Makefile | 1 + lib/xxhash.c |

[PATCH v3 0/4] Add xxhash and zstd modules

2017-07-20 Thread Nick Terrell
Hi all, This patch set adds xxhash, zstd compression, and zstd decompression modules. It also adds zstd support to BtrFS and SquashFS. Each patch has relevant summaries, benchmarks, and tests. Best, Nick Terrell Changelog: v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const (1/4) -

Re: [PATCH v2 3/4] btrfs: Add zstd support

2017-07-10 Thread Nick Terrell
On 7/10/17, 9:57 PM, "Nick Terrell" wrote: > The problem is caused by a gcc-7 bug [1]. It miscompiles > ZSTD_wildcopy(void *dst, void const *src, ptrdiff_t len) when len is 0. > It only happens when it can't analyze ZSTD_copy8(), which is the case in > the kernel, beca

Re: [PATCH v2 3/4] btrfs: Add zstd support

2017-07-10 Thread Nick Terrell
On 7/10/17, 5:36 AM, "Austin S. Hemmelgarn" wrote: > On 2017-07-07 23:07, Adam Borowski wrote: >> On Sat, Jul 08, 2017 at 01:40:18AM +0200, Adam Borowski wrote: >>> On Fri, Jul 07, 2017 at 11:17:49PM +, Nick Terrell wrote: >>>> On 7/6/17, 9:32

Re: [PATCH v2 3/4] btrfs: Add zstd support

2017-07-10 Thread Nick Terrell
On 7/10/17, 5:36 AM, "Austin S. Hemmelgarn" wrote: > On 2017-07-07 23:07, Adam Borowski wrote: >> On Sat, Jul 08, 2017 at 01:40:18AM +0200, Adam Borowski wrote: >>> On Fri, Jul 07, 2017 at 11:17:49PM +, Nick Terrell wrote: >>>> On 7/6/17, 9:32

Re: [PATCH v2 3/4] btrfs: Add zstd support

2017-07-07 Thread Nick Terrell
On 7/6/17, 9:32 AM, "Adam Borowski" wrote: > On Thu, Jun 29, 2017 at 12:41:07PM -0700, Nick Terrell wrote: >> Add zstd compression and decompression support to BtrFS. zstd at its >> fastest level compresses almost as well as zlib, while offering much >> faste

Re: [PATCH v2 3/4] btrfs: Add zstd support

2017-07-05 Thread Nick Terrell
On 7/5/17, 12:57 PM, "Austin S. Hemmelgarn" wrote: > It's the slower compression speed that has me arguing for the > possibility of configurable levels on zlib. 11MB/s is painfully slow > considering that most decent HDD's these days can get almost 5-10x that > speed with no compression. Ther

Re: [PATCH v2 3/4] btrfs: Add zstd support

2017-07-05 Thread Nick Terrell
On 7/5/17, 11:45 AM, "Austin S. Hemmelgarn" wrote: >On 2017-07-05 14:18, Adam Borowski wrote: >> On Wed, Jul 05, 2017 at 07:43:27AM -0400, Austin S. Hemmelgarn >> wrote: >>> On 2017-06-30 19:01, Nick Terrell wrote: >>>>> There is also the fact o

Re: [PATCH v2 3/4] btrfs: Add zstd support

2017-06-30 Thread Nick Terrell
>> If we're going to make that configurable, there are some things to >> consider: >> >> * the underlying compressed format -- does not change for different >>levels This is true for zlib and zstd. lzo in the kernel only supports one compression level. >> * the configuration interface -- mou

Re: [PATCH v2 0/4] Add xxhash and zstd modules

2017-06-30 Thread Nick Terrell
> If i understood all correctly, > zstd can compress (decompress) data in way compatible with gzip (zlib) > Do that also true for in kernel library? The zstd command line tool can decompress gzip/zlib compressed data, and can compress in the gzip format. However, the zstd format is not compatible

[PATCH v2 4/4] squashfs: Add zstd support

2017-06-29 Thread Nick Terrell
://github.com/facebook/zstd Cc: Sean Purcell Signed-off-by: Nick Terrell --- fs/squashfs/Kconfig| 14 + fs/squashfs/Makefile | 1 + fs/squashfs/decompressor.c | 7 +++ fs/squashfs/decompressor.h | 4 ++ fs/squashfs/squashfs_fs.h | 1 + fs/squashfs/zstd_wrapper.c | 150

[PATCH v2 3/4] btrfs: Add zstd support

2017-06-29 Thread Nick Terrell
[3] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia [4] https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.11.6.tar.xz zstd source repository: https://github.com/facebook/zstd Signed-off-by: Nick Terrell --- fs/btrfs/Kconfig | 2 + fs/btrfs/Makefile | 2 +- fs

[PATCH v2 1/4] lib: Add xxhash module

2017-06-29 Thread Nick Terrell
repository: https://github.com/cyan4973/xxhash Signed-off-by: Nick Terrell --- v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const include/linux/xxhash.h | 236 +++ lib/Kconfig| 3 + lib/Makefile | 1 + lib/xxhash.c |

[PATCH v2 0/4] Add xxhash and zstd modules

2017-06-29 Thread Nick Terrell
Hi all, This patch set adds xxhash, zstd compression, and zstd decompression modules. It also adds zstd support to BtrFS and SquashFS. Each patch has relevant summaries, benchmarks, and tests. Best, Nick Terrell Changelog: v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const (1/4) -

[PATCH] btrfs: Keep one more workspace around

2017-06-29 Thread Nick Terrell
for zstd compression. Signed-off-by: Nick Terrell --- fs/btrfs/compression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 3beb0d0..1a0ef55 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -874,7 +874,7 @

[PATCH] btrfs: Keep one more workspace around

2017-06-28 Thread Nick Terrell
lzo, zlib, and zstd. > I'm on linus:4.12-rc7 with only a handful of btrfs patches (v3 of Qu's chunk > check, some misc crap) -- I guess I should use at least btrfs-for-4.13. Or > would you prefer full-blown next? Whatever is convenient for you. The relevant code in BtrFS hasn

Re: [PATCH] lib/zstd: use div_u64() to let it build on 32-bit

2017-06-27 Thread Nick Terrell
> Please don't top post. Sorry about that. > Which function needs 1KB of stack space? That's quite a lot. FSE_buildCTable_wksp(), FSE_compress_wksp(), and HUF_readDTableX4() required over 1 KB of stack space. > I can see in [1] that there are some on-stack buffers replaced by > pointers to the

Re: [PATCH] lib/zstd: use div_u64() to let it build on 32-bit

2017-06-26 Thread Nick Terrell
Adam, I’ve applied the same patch in my tree. I’ll send out the update [1] once it's reviewed, since I also reduced the stack usage of functions using over 1 KB of stack space. You’re right that div_u64() will work, since the FSE functions are only called on blocks of at most 128 KB at a time. Per

Re: [PATCH 3/4] btrfs: Add zstd support

2017-06-26 Thread Nick Terrell
; > > url: https://github.com/0day-ci/linux/commits/Nick-Terrell/lib-Add-xxhash-module/20170625-214344 > > config: i386-allmodconfig (attached as .config) > > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > > reproduce: > > # save the attache

[PATCH 3/4] btrfs: Add zstd support

2017-06-22 Thread Nick Terrell
[3] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia [4] https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.11.6.tar.xz zstd source repository: https://github.com/facebook/zstd Signed-off-by: Nick Terrell --- fs/btrfs/Kconfig | 2 + fs/btrfs/Makefile | 2 +- fs

[PATCH 4/4] squashfs: Add zstd support

2017-06-22 Thread Nick Terrell
://github.com/facebook/zstd Cc: Sean Purcell Signed-off-by: Nick Terrell --- fs/squashfs/Kconfig| 14 + fs/squashfs/Makefile | 1 + fs/squashfs/decompressor.c | 7 +++ fs/squashfs/decompressor.h | 4 ++ fs/squashfs/squashfs_fs.h | 1 + fs/squashfs/zstd_wrapper.c | 150

  1   2   >