Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1789342imi; Sat, 23 Jul 2022 18:17:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uz3zFUu2Cyu6jqbb9/wGF7gm4GM4kTyoUTnN2JCViDnmY8P7ltkW2+wwkdzHnYyFkbYv+S X-Received: by 2002:a05:6402:35cc:b0:43a:75e1:935f with SMTP id z12-20020a05640235cc00b0043a75e1935fmr6460399edc.369.1658625455411; Sat, 23 Jul 2022 18:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658625455; cv=none; d=google.com; s=arc-20160816; b=oyxNGECKTuYKYR5rVX7r4vB21iuRJaZ1Z2WPgX1oE5DeHTYQTwSJujTW7MK0npCzcv tomXcmOu/ha/Un9SsaZy1bJmu9O33V2jbO/7+Ci2HPaqi6CavuU3p9brVNqd2LV6rcgv wLp0J5tqhiX1Fe9DbkCdCkup61ORJwyMrp8xEApZc/Ex4oS35lU/BJN+eWRApZVDVuoe Oo/QfeFRG873Ijh7AXx85IH84u9ozOT0eM3EAQiWgeyh2i+drolXREovPKcGnUkKOVMG VLyRoqD30lnY+pOF8IzOpsyhNyq6HM5N4PD5LzSnq1DWOIB07P/YxRudV6QYR4Df8SxV N+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3iew+Ei5rh6ZlNt7us/pN0HrQ2bYZjoz37a05t9Wu3k=; b=ZOshVQ3NIjqB78XgU38BZUeyjLYBb+jWMgtenR1oiv9248jNC3Wt+j7IOAqsl5z27o AtEo1ah14Vrwie4bqJQxgRvWhX3aYFuomOjF/gSMozEr/Bh6Bvn6vFuD3QIFHjGPU1V7 3tFHZh3Zw0lTcVqpK0TQYVrYUufSeDZLbLEkJzFpWgm5xVA0kMYj+wR+eytXPSPKiyPp vn76B2WX6u8iuDF/rFvoWT7EaTb4IKTEygtuLCaTWN2nCxMZHBtaHHSnuQRULu8/YGDs CJmfGxiTxJOFE21WsrRAP1PWjCu/VnT7go2bz1Ygdg//4U5mBe997gJD1RTUQK+t7Ogq bBTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad format) header.i=@dorminy.me header.s=mail header.b=sbZnAR4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dorminy.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc18-20020a1709071c1200b0072b978aed2csi10224846ejc.474.2022.07.23.18.17.10; Sat, 23 Jul 2022 18:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=neutral (bad format) header.i=@dorminy.me header.s=mail header.b=sbZnAR4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dorminy.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239583AbiGXAzN (ORCPT + 99 others); Sat, 23 Jul 2022 20:55:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238939AbiGXAzE (ORCPT ); Sat, 23 Jul 2022 20:55:04 -0400 Received: from box.fidei.email (box.fidei.email [71.19.144.250]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57D3B17073; Sat, 23 Jul 2022 17:54:51 -0700 (PDT) Received: from authenticated-user (box.fidei.email [71.19.144.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.fidei.email (Postfix) with ESMTPSA id 92E02807A4; Sat, 23 Jul 2022 20:54:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dorminy.me; s=mail; t=1658624091; bh=GiNt0PiqutMpQFHFI25vL2YG7APA8wUW6glHUztY2D4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sbZnAR4+O/W0ahYzCGzzcXp8fPHvWIxofC+5oDPtbVc5qpvjJEgXM6byGBWajuAfM 5/N6kzrrZYvOFUPfONH+xYPxDeHHV3AwAaxg0GhKaG3pPfIiICwL2EP+VwcnXFdKCu s/xEn79BY8lkOhDOehYqv2owge4rEdKwn65lT0JwuRXIZjV+O0o9TBgGn6JdIG2dXh eFMf5wb86BTRrLADENiMB8a0w6pfEW/zZFbkIKhUWmrZh7/CrX4rqKyFSyD4OIx5mN IySef6+GLYADgHqzluxdURpXGJKurOSqHdu1HDhC9+6dS1iMo7DedKdhFE2ZE6lSXG 0BXQ+z2JR/3Nw== From: Sweet Tea Dorminy To: Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, osandov@osandov.com, kernel-team@fb.com Cc: Sweet Tea Dorminy Subject: [PATCH RFC v2 12/16] btrfs: Add new FEATURE_INCOMPAT_FSCRYPT feature flag. Date: Sat, 23 Jul 2022 20:53:57 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Omar Sandoval As fscrypt files will be incompatible with older filesystem versions, new filesystems should be created with an incompat flag for fscrypt. Signed-off-by: Omar Sandoval Signed-off-by: Sweet Tea Dorminy --- fs/btrfs/ctree.h | 6 ++++-- include/uapi/linux/btrfs.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index bd8855da2e54..9fab4d33a326 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -334,7 +334,8 @@ static_assert(sizeof(struct btrfs_super_block) == BTRFS_SUPER_INFO_SIZE); BTRFS_FEATURE_INCOMPAT_METADATA_UUID | \ BTRFS_FEATURE_INCOMPAT_RAID1C34 | \ BTRFS_FEATURE_INCOMPAT_ZONED | \ - BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2) + BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 | \ + BTRFS_FEATURE_INCOMPAT_FSCRYPT) #else #define BTRFS_FEATURE_INCOMPAT_SUPP \ (BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF | \ @@ -349,7 +350,8 @@ static_assert(sizeof(struct btrfs_super_block) == BTRFS_SUPER_INFO_SIZE); BTRFS_FEATURE_INCOMPAT_NO_HOLES | \ BTRFS_FEATURE_INCOMPAT_METADATA_UUID | \ BTRFS_FEATURE_INCOMPAT_RAID1C34 | \ - BTRFS_FEATURE_INCOMPAT_ZONED) + BTRFS_FEATURE_INCOMPAT_ZONED | \ + BTRFS_FEATURE_INCOMPAT_FSCRYPT) #endif #define BTRFS_FEATURE_INCOMPAT_SAFE_SET \ diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index f54dc91e4025..b19fc3725769 100644 --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -310,6 +310,7 @@ struct btrfs_ioctl_fs_info_args { #define BTRFS_FEATURE_INCOMPAT_RAID1C34 (1ULL << 11) #define BTRFS_FEATURE_INCOMPAT_ZONED (1ULL << 12) #define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13) +#define BTRFS_FEATURE_INCOMPAT_FSCRYPT (1ULL << 14) struct btrfs_ioctl_feature_flags { __u64 compat_flags; -- 2.35.1