From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
To: linux-btrfs@vger.kernel.org, ebiggers@google.com, kernel-team@meta.com
Cc: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Subject: [PATCH v2 3/8] btrfs-progs: add inode encryption contexts
Date: Tue, 8 Aug 2023 13:22:22 -0400 [thread overview]
Message-ID: <939240ea58d2004f6b64d06a447f31d8bb97ea0f.1691520000.git.sweettea-kernel@dorminy.me> (raw)
In-Reply-To: <cover.1691520000.git.sweettea-kernel@dorminy.me>
Recapitulates relevant parts of kernel change 'btrfs: add inode
encryption contexts'.
Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
---
kernel-shared/uapi/btrfs_tree.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/kernel-shared/uapi/btrfs_tree.h b/kernel-shared/uapi/btrfs_tree.h
index ad555e705..2df7cfec4 100644
--- a/kernel-shared/uapi/btrfs_tree.h
+++ b/kernel-shared/uapi/btrfs_tree.h
@@ -162,6 +162,8 @@
#define BTRFS_VERITY_DESC_ITEM_KEY 36
#define BTRFS_VERITY_MERKLE_ITEM_KEY 37
+#define BTRFS_FSCRYPT_CTXT_ITEM_KEY 41
+
#define BTRFS_ORPHAN_ITEM_KEY 48
/* reserve 2-15 close to the inode for later flexibility */
@@ -400,6 +402,7 @@ static inline __u8 btrfs_dir_flags_to_ftype(__u8 flags)
#define BTRFS_INODE_NOATIME (1U << 9)
#define BTRFS_INODE_DIRSYNC (1U << 10)
#define BTRFS_INODE_COMPRESS (1U << 11)
+#define BTRFS_INODE_ENCRYPT (1U << 12)
#define BTRFS_INODE_ROOT_ITEM_INIT (1U << 31)
@@ -416,6 +419,7 @@ static inline __u8 btrfs_dir_flags_to_ftype(__u8 flags)
BTRFS_INODE_NOATIME | \
BTRFS_INODE_DIRSYNC | \
BTRFS_INODE_COMPRESS | \
+ BTRFS_INODE_ENCRYPT | \
BTRFS_INODE_ROOT_ITEM_INIT)
#define BTRFS_INODE_RO_VERITY (1U << 0)
@@ -1016,6 +1020,12 @@ enum {
BTRFS_NR_FILE_EXTENT_TYPES = 3,
};
+enum {
+ BTRFS_ENCRYPTION_NONE,
+ BTRFS_ENCRYPTION_FSCRYPT,
+ BTRFS_NR_ENCRYPTION_TYPES,
+};
+
struct btrfs_file_extent_item {
/*
* transaction id that created this extent
--
2.41.0
next prev parent reply other threads:[~2023-08-08 19:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 17:22 [PATCH v2 0/8] btrfs-progs: add encryption support Sweet Tea Dorminy
2023-08-08 17:22 ` [PATCH v2 1/8] btrfs-progs: add new FEATURE_INCOMPAT_ENCRYPT flag Sweet Tea Dorminy
2023-08-08 17:22 ` [PATCH v2 2/8] btrfs-progs: start tracking extent encryption context info Sweet Tea Dorminy
2023-08-08 17:22 ` Sweet Tea Dorminy [this message]
2023-08-08 17:22 ` [PATCH v2 4/8] btrfs-progs: save and load fscrypt extent contexts Sweet Tea Dorminy
2023-08-08 17:22 ` [PATCH v2 5/8] btrfs-progs: interpret encrypted file extents Sweet Tea Dorminy
2023-08-08 17:22 ` [PATCH v2 6/8] btrfs-progs: handle fscrypt context items Sweet Tea Dorminy
2023-08-08 17:22 ` [PATCH v2 7/8] btrfs-progs: escape unprintable characters in names Sweet Tea Dorminy
2023-08-08 17:22 ` [PATCH v2 8/8] btrfs-progs: check: update inline extent length checking Sweet Tea Dorminy
2023-08-09 20:41 ` [PATCH v2 0/8] btrfs-progs: add encryption support Josef Bacik
2023-08-10 12:23 ` Neal Gompa
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=939240ea58d2004f6b64d06a447f31d8bb97ea0f.1691520000.git.sweettea-kernel@dorminy.me \
--to=sweettea-kernel@dorminy.me \
--cc=ebiggers@google.com \
--cc=kernel-team@meta.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).