From: Li Zefan <lizf@cn.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/5] btrfs: Add lzo compression support
Date: Mon, 25 Oct 2010 15:11:22 +0800 [thread overview]
Message-ID: <4CC52D9A.3030709@cn.fujitsu.com> (raw)
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.
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
Other:
The defrag ioctl is also updated, so one can choose lzo or zlib when
turning on compression in defrag operation.
TODO:
- Update btrfs-progs accordingly.
---
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(-)
next reply other threads:[~2010-10-25 7:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 7:11 Li Zefan [this message]
2010-10-25 7:11 ` [PATCH 1/5] btrfs: Fix bugs in zlib workspace Li Zefan
2010-10-25 7:12 ` [PATCH 2/5] btrfs: Allow to add new compression algorithm Li Zefan
2010-10-25 7:12 ` [PATCH 3/5] btrfs: Add lzo compression support Li Zefan
2010-10-25 7:12 ` [PATCH 4/5] btrfs: Allow to specify compress method when defrag Li Zefan
2010-10-25 7:13 ` [PATCH 5/5] btrfs: Extract duplicate decompress code Li Zefan
2010-10-26 2:13 ` [PATCH 0/5] btrfs: Add lzo compression support Chris Mason
2010-10-26 2:34 ` Li Zefan
2010-11-15 18:55 ` Mitch Harder
2010-11-16 0:57 ` Li Zefan
2010-11-16 18:51 ` Mitch Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CC52D9A.3030709@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.