linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL][PATCH v2 0/6] btrfs: Add lzo compression support
@ 2010-11-18  2:08 Li Zefan
  2010-11-18  2:09 ` [PATCH v2 1/6] btrfs: Fix bugs in zlib workspace Li Zefan
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Li Zefan @ 2010-11-18  2:08 UTC (permalink / raw)
  To: Chris Mason; +Cc: Mitch Harder, linux-btrfs

Hi Chris,

Here's the updated patchset. As I still haven't got a kernel.org
account, I have set up a git tree in another public git repository,
and I'll use it for now.

You can pull from:

	git://repo.or.cz/linux-btrfs-devel.git lzo-support


Lzo is a much faster compression algorithm than gzib, so would allow
more users to enable transparent compression, and some users can
choose from compression ratio and compression speed.

Usage:

# mount -t btrfs -o compress[=<zlib,lzo>] dev /mnt
or
# mount -t btrfs -o compress-force[=<zlib,lzo>] dev /mnt

"-o compress" without argument is still allowed for compatability.

Compatibility:

If we mount a filesystem with lzo compression, it will not be able be
mounted in old kernels. One reason is, otherwise btrfs will directly
dump compressed data, which sits in inline extent, to user.

Performance:

The test copied a linux source tarball (~400M) from an ext4 partition
to the btrfs partition, and then extracted the tarball.

(time in second)
           lzo        zlib        nocompress
copy:      10.6       21.7        14.9
extract:   70.1       94.4        66.6

(data size in MB)
           lzo        zlib        nocompress
copy:      185.87     108.69      394.49
extract:   193.80     132.36      381.21

Test:

Mitch has tested the patchset, and provided some positive feedback.
According to him, the patchset works as expected and nothing bad
has he experienced.

Other:

The defrag ioctl is also updated, so one can choose lzo or zlib when
turning on compression in defrag operation.

Main change from v1:

- Add incompat flag.
- Fix build issue by selecting kernel lzo module.
- Check compression type in defrag ioctl.

---------------->
Li Zefan (6):
      btrfs: Fix bugs in zlib workspace
      btrfs: Fix error handling in zlib
      btrfs: Allow to add new compression algorithm
      btrfs: Add lzo compression support
      btrfs: Allow to specify compress method when defrag
      btrfs: Extract duplicate decompress code

 fs/btrfs/Makefile       |    2 +-
 fs/btrfs/btrfs_inode.h  |    2 +-
 fs/btrfs/compression.c  |  329 +++++++++++++++++++++++++++++++++++++-
 fs/btrfs/compression.h  |   72 ++++++--
 fs/btrfs/ctree.h        |   11 +-
 fs/btrfs/extent_io.c    |    5 +-
 fs/btrfs/extent_io.h    |   17 ++-
 fs/btrfs/extent_map.c   |    2 +
 fs/btrfs/extent_map.h   |    3 +-
 fs/btrfs/file.c         |    2 +
 fs/btrfs/inode.c        |   82 ++++++----
 fs/btrfs/ioctl.c        |   10 +-
 fs/btrfs/ioctl.h        |    9 +-
 fs/btrfs/lzo.c          |  409 +++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/ordered-data.c |   18 ++-
 fs/btrfs/ordered-data.h |    8 +-
 fs/btrfs/super.c        |   47 +++++-
 fs/btrfs/zlib.c         |  361 +++++++----------------------------------
 18 files changed, 1013 insertions(+), 376 deletions(-)



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

end of thread, other threads:[~2010-12-26  3:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18  2:08 [GIT PULL][PATCH v2 0/6] btrfs: Add lzo compression support Li Zefan
2010-11-18  2:09 ` [PATCH v2 1/6] btrfs: Fix bugs in zlib workspace Li Zefan
2010-11-18  2:10 ` [PATCH v2 2/6] btrfs: Fix error handling in zlib Li Zefan
2010-11-18  2:10 ` [PATCH v2 3/6] btrfs: Allow to add new compression algorithm Li Zefan
2010-11-18  2:10 ` [PATCH v2 4/6] btrfs: Add lzo compression support Li Zefan
2010-11-18  2:11 ` [PATCH v2 5/6] btrfs: Allow to specify compress method when defrag Li Zefan
2010-11-18  2:11 ` [PATCH v2 6/6] btrfs: Extract duplicate decompress code Li Zefan
2010-11-29 17:54 ` [GIT PULL][PATCH v2 0/6] btrfs: Add lzo compression support C Anthony Risinger
2010-11-30  1:00   ` Li Zefan
2010-11-30 17:12     ` C Anthony Risinger
2010-12-01  1:02       ` Li Zefan
2010-12-24  5:35 ` cwillu
2010-12-24  6:55   ` Li Zefan
2010-12-24 12:32     ` Chris Mason
2010-12-24 20:45       ` Chris Mason
2010-12-26  3:31         ` C Anthony Risinger

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).