On Sat, May 31, 2014 at 6:48 PM, Philip Worrall
<philip.worr...@googlemail.com> wrote:
> LZ4 is a lossless data compression algorithm that is focused on
> compression and decompression speed. LZ4 gives a slightly worse
> compression ratio compared with LZO (and much worse than Zlib)
> but compression speeds are *generally* similar to LZO.
> Decompression tends to be much faster under LZ4 compared
> with LZO hence it makes more sense to use LZ4 compression
> when your workload involves a higher proportion of reads.
>
> The following patch set adds LZ4 compression support to BTRFS
> using the existing kernel implementation. It is based on the
> changeset for LZO support in 2011. Once a filesystem has been
> mounted with LZ4 compression enabled older versions of BTRFS
> will be unable to read it. This implementation is however
> backwards compatible with filesystems that currently use
> LZO or Zlib compression. Existing data will remain unchanged
> but any new files that you create will be compressed with LZ4.
>
> Usage:
> Apply the following 8 patches to the current git tree
> (as of 20140531) and compile/load the btrfs module.
>
> # mount -t btrfs -o compress=lz4 device mountpoint
>
> or
>
> # mount -t btrfs -o compress-force=lz4 device mountpoint
>

I gave this patch-set a preliminary test, and there were no obvious
signs of corruption.

I was unable to run btrfsck or xfstests since btrfs-progs is not yet
aware of lz4, so my testing should be considered superficial.

One comment:  IMHO, it would make sense to implement lz4 and lz4hc at
the same time.  Since both are now in the kernel, I assume we would go
that direction eventually anyways, unless there are some wrinkles
around lz4hc I don't fully appreciate.  So we might as well conserve
the kernel INCOMPAT flag.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to