From: Philip Worrall <philip.worrall@googlemail.com>
To: linux-btrfs@vger.kernel.org
Cc: Philip Worrall <philip.worrall@googlemail.com>
Subject: [PATCH 5/8] Btrfs: Add feature flags for LZ4 support
Date: Sat, 31 May 2014 23:48:33 +0000 [thread overview]
Message-ID: <1401580116-10458-6-git-send-email-philip.worrall@googlemail.com> (raw)
In-Reply-To: <1401580116-10458-1-git-send-email-philip.worrall@googlemail.com>
Add various feature flags for LZ4 so that older kernels refuse
to mount btrfs filesystems that have been used with LZ4
Signed-off-by: Philip Worrall <philip.worrall@googlemail.com>
---
fs/btrfs/ctree.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index d8a669e..b5118cfa 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -523,6 +523,7 @@ struct btrfs_super_block {
#define BTRFS_FEATURE_INCOMPAT_RAID56 (1ULL << 7)
#define BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA (1ULL << 8)
#define BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9)
+#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZ4 (1ULL << 10)
#define BTRFS_FEATURE_COMPAT_SUPP 0ULL
#define BTRFS_FEATURE_COMPAT_SAFE_SET 0ULL
@@ -540,7 +541,8 @@ struct btrfs_super_block {
BTRFS_FEATURE_INCOMPAT_RAID56 | \
BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF | \
BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA | \
- BTRFS_FEATURE_INCOMPAT_NO_HOLES)
+ BTRFS_FEATURE_INCOMPAT_NO_HOLES | \
+ BTRFS_FEATURE_INCOMPAT_COMPRESS_LZ4)
#define BTRFS_FEATURE_INCOMPAT_SAFE_SET \
(BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF)
@@ -709,8 +711,10 @@ enum btrfs_compression_type {
BTRFS_COMPRESS_NONE = 0,
BTRFS_COMPRESS_ZLIB = 1,
BTRFS_COMPRESS_LZO = 2,
- BTRFS_COMPRESS_TYPES = 2,
- BTRFS_COMPRESS_LAST = 3,
+ BTRFS_COMPRESS_LZ4 = 3,
+ BTRFS_COMPRESS_TYPES = 3,
+ BTRFS_COMPRESS_LAST = 4,
+
};
struct btrfs_inode_item {
--
1.9.1
next prev parent reply other threads:[~2014-05-31 23:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Philip Worrall [this message]
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
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=1401580116-10458-6-git-send-email-philip.worrall@googlemail.com \
--to=philip.worrall@googlemail.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 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).