Linux FSCRYPT development
 help / color / mirror / Atom feed
From: Daniel Vacek <neelx@suse.com>
To: David Sterba <dsterba@suse.com>
Cc: Daniel Vacek <neelx@suse.com>,
	linux-fscrypt@vger.kernel.org, linux-btrfs@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Subject: [PATCH v3 3/7] btrfs-progs: add inode encryption contexts
Date: Tue,  7 Jul 2026 16:27:32 +0200	[thread overview]
Message-ID: <20260707142736.2330146-4-neelx@suse.com> (raw)
In-Reply-To: <20260707142736.2330146-1-neelx@suse.com>

From: Sweet Tea Dorminy <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>
Signed-off-by: Daniel Vacek <neelx@suse.com>
---
 kernel-shared/uapi/btrfs_tree.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel-shared/uapi/btrfs_tree.h b/kernel-shared/uapi/btrfs_tree.h
index 74d307f1..b4532237 100644
--- a/kernel-shared/uapi/btrfs_tree.h
+++ b/kernel-shared/uapi/btrfs_tree.h
@@ -168,6 +168,9 @@
 #define BTRFS_VERITY_DESC_ITEM_KEY	36
 #define BTRFS_VERITY_MERKLE_ITEM_KEY	37
 
+#define BTRFS_FSCRYPT_INODE_CTX_KEY	41
+#define BTRFS_FSCRYPT_CTX_KEY		42
+
 #define BTRFS_ORPHAN_ITEM_KEY		48
 /* reserve 2-15 close to the inode for later flexibility */
 
@@ -428,6 +431,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)
 
@@ -444,6 +448,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)
-- 
2.53.0


  parent reply	other threads:[~2026-07-07 14:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 14:27 [PATCH v3 0/7] btrfs-progs: fscrypt updates Daniel Vacek
2026-07-07 14:27 ` [PATCH v3 1/7] btrfs-progs: add new FEATURE_INCOMPAT_ENCRYPT flag Daniel Vacek
2026-07-07 14:27 ` [PATCH v3 2/7] btrfs-progs: start tracking extent encryption context info Daniel Vacek
2026-07-07 14:27 ` Daniel Vacek [this message]
2026-07-07 14:27 ` [PATCH v3 4/7] btrfs-progs: print encryptin type field of file extents Daniel Vacek
2026-07-07 22:40   ` Qu Wenruo
2026-07-08  4:38     ` Daniel Vacek
2026-07-07 14:27 ` [PATCH v3 5/7] btrfs-progs: handle fscrypt context items Daniel Vacek
2026-07-07 14:27 ` [PATCH v3 6/7] btrfs-progs: check: update inline extent length checking Daniel Vacek
2026-07-07 22:43   ` Qu Wenruo
2026-07-08  5:00     ` Daniel Vacek
2026-07-08  5:07       ` Qu Wenruo
2026-07-07 14:27 ` [PATCH v3 7/7] btrfs-progs: recognize ENCRYPT inode item flag Daniel Vacek
2026-07-07 14:33 ` [PATCH v3 0/7] btrfs-progs: fscrypt updates Daniel Vacek
2026-07-08  4:59 ` Qu Wenruo

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=20260707142736.2330146-4-neelx@suse.com \
    --to=neelx@suse.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sweettea-kernel@dorminy.me \
    /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