linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Add support for LZ4 compression
@ 2014-05-31 23:48 Philip Worrall
  2014-05-31 23:48 ` [PATCH 1/8] Btrfs: Add kernel config options for LZ4 Philip Worrall
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Philip Worrall @ 2014-05-31 23:48 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Philip Worrall

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

Philip Worrall (8):
  Btrfs: Add kernel config options for LZ4
  Btrfs: Add lz4.c to the Makefile
  Btrfs: Add lz4 compression to avaialble compression ops
  Btrfs: Add definition for external lz4 compression struct
  Btrfs: Add feature flags for LZ4 support
  Btrfs: Ensure LZ4 feature flags are set when mounting with LZ4
  Btrfs: Add lz4 compression/decompression struct ops
  Btrfs: Check for compress=lz4 in mount options

 fs/btrfs/Kconfig       |   2 +
 fs/btrfs/Makefile      |   2 +-
 fs/btrfs/compression.c |   1 +
 fs/btrfs/compression.h |   2 +-
 fs/btrfs/ctree.h       |  10 +-
 fs/btrfs/disk-io.c     |   3 +-
 fs/btrfs/lz4.c         | 436 +++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/super.c       |  12 +-
 8 files changed, 461 insertions(+), 7 deletions(-)
 create mode 100644 fs/btrfs/lz4.c

-- 
1.9.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-06-12  8:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-31 23:48 [PATCH 0/8] Add support for LZ4 compression Philip Worrall
2014-05-31 23:48 ` [PATCH 1/8] Btrfs: Add kernel config options for LZ4 Philip Worrall
2014-05-31 23:48 ` [PATCH 2/8] Btrfs: Add lz4.c to the Makefile Philip Worrall
2014-05-31 23:48 ` [PATCH 3/8] Btrfs: Add lz4 compression to avaialble compression ops Philip Worrall
2014-05-31 23:48 ` [PATCH 4/8] Btrfs: Add definition for external lz4 compression struct Philip Worrall
2014-05-31 23:48 ` [PATCH 5/8] Btrfs: Add feature flags for LZ4 support Philip Worrall
2014-05-31 23:48 ` [PATCH 6/8] Btrfs: Ensure LZ4 feature flags are set when mounting with LZ4 Philip Worrall
2014-05-31 23:48 ` [PATCH 7/8] Btrfs: Add lz4 compression/decompression struct ops Philip Worrall
2014-05-31 23:48 ` [PATCH 8/8] Btrfs: Check for compress=lz4 in mount options Philip Worrall
2014-06-02 22:04 ` [PATCH 0/8] Add support for LZ4 compression Mitch Harder
2014-06-03 15:53 ` David Sterba
2014-06-04 14:00   ` Chris Mason
2014-06-12  8:47     ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).