Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7CCA324B17 for ; Wed, 15 Oct 2025 12:12:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760530327; cv=none; b=K73hgnJ9aIe2WuWfS4jX145K7o16eRuue65QQruW3Gh1xJXDZy6KnlzmX5bL3EOE23PismW7wPMc0BLMj8Uy37MKIsuMyvqlhVVB4J0zE/Mgm7tq9nBuP4XzQWwS75JkopQp0q/XIPG6SlV+vBM7wM4lEQVe6lcO5RcCH7zciMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760530327; c=relaxed/simple; bh=oo4GIE4ODGNuRcgY8pIX44vNQbQRdgGb2qtj/Ly+z58=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UT2XI9XRczJYqkRBmo+I2yc50uXiRd09yI+l1Q6/r5fN6qhhTImmN+1+fLGebwP/3nOJpKLHYSx7APCW3wtthNKhShh6pKNyJRsPzTzy1taaCylm1Q+Ct7lsTR+7Kmxi6DKCKBoBjX9Fdbva+U29cXe6L5g8XqYjwyBaKgi6yKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DEF541FB88; Wed, 15 Oct 2025 12:12:02 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CADDD13AE4; Wed, 15 Oct 2025 12:12:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QAQXMZKP72i2fAAAD6G6ig (envelope-from ); Wed, 15 Oct 2025 12:12:02 +0000 From: Daniel Vacek To: David Sterba Cc: linux-btrfs@vger.kernel.org, Daniel Vacek , Josef Bacik , Sweet Tea Dorminy Subject: [PATCH 4/8] btrfs-progs: add inode encryption contexts Date: Wed, 15 Oct 2025 14:11:52 +0200 Message-ID: <20251015121157.1348124-5-neelx@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251015121157.1348124-1-neelx@suse.com> References: <20251015121157.1348124-1-neelx@suse.com> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Level: X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: DEF541FB88 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -4.00 From: Sweet Tea Dorminy Recapitulates relevant parts of kernel change 'btrfs: add inode encryption contexts'. Signed-off-by: Sweet Tea Dorminy --- kernel-shared/uapi/btrfs_tree.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel-shared/uapi/btrfs_tree.h b/kernel-shared/uapi/btrfs_tree.h index 4b4f45aa..e3a55665 100644 --- a/kernel-shared/uapi/btrfs_tree.h +++ b/kernel-shared/uapi/btrfs_tree.h @@ -165,6 +165,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 */ @@ -425,6 +427,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) @@ -441,6 +444,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.51.0