Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp299439pxb; Wed, 20 Apr 2022 23:14:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTGB5N6JiBg878ZfRLtbxordohOM2onAqRlTkkOEO78U2wjdxzxANJaN0zD4RYOsZrY8+b X-Received: by 2002:a17:907:724c:b0:6ef:8303:6c35 with SMTP id ds12-20020a170907724c00b006ef83036c35mr19751193ejc.199.1650521646512; Wed, 20 Apr 2022 23:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650521646; cv=none; d=google.com; s=arc-20160816; b=o5YPmX0sA2xyh/ggRP+SChpZJtHu1wqj5MYNkU2nVb4gtiQsAWs+CgW4S9JthbHIWo GvMCGaGgW87mxXHeMXW7Fp2mLJp+qqSaJLkfPIRqv1l6riqZlBJGRoxR3kxO/C6LfFuo J1cvTTJOVvyvnsuQfv/n3XGwZe/ZPcJHXSfiFMY/ypEOmrVbLeX8Etibrwk806iRU69h B6ZYB82DOVlS761K83QHdBkiKHKCrs9OMKtSS/qjDk05r7nL7CD+DrvmuqeqtDM0zbGj CJBT5Y3NBbTgXprYHM5yRVcJEhctB7DYTb5uW/Ci4T/7RE6yE+5RDL9wpia1BIy2TQnB 1+7w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=JOMb/ac9GEQhxgFWy102RrBi/96CWNQGAWYx4cSN7Pg=; b=BmpsHI85j6b0dJ15GgDSMVnEG2agPRouwAVHFG9EZpmLIIvUR8rf1BsSCUfj2gwlkQ gdB6ln1pPjgmvZetxzNI2N+nEsDP6UaCj3bVbCSmzxybIg8RvigWWDj7r6dk3tIQmjV4 DAPsoOuMsnU2yQgPc9bP9K82lj6UH5kFcgVsOIe13sSVXHlfQJBJFV6qTRZzrMH1euJa pEFr7pmIjQctWPCF0pUF9lTLq2GSRTQu7WeSxK+FAuS9mMa1E9gcD4bUaP8UulIroFrs nBS8Rav7CoxR0MWeA3aadS4YA4a7lkRi5JkSolBRjRuiBEp412lIotpgouyl3A7juhNv PALA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="W/QJvfOG"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020a17090619c500b006df76385bf4si3559501ejd.148.2022.04.20.23.13.37; Wed, 20 Apr 2022 23:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=pass header.i=@gmail.com header.s=20210112 header.b="W/QJvfOG"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347295AbiDUF0U (ORCPT + 99 others); Thu, 21 Apr 2022 01:26:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233065AbiDUF0T (ORCPT ); Thu, 21 Apr 2022 01:26:19 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4027DFAB; Wed, 20 Apr 2022 22:23:31 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id g9so3711364pgc.10; Wed, 20 Apr 2022 22:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JOMb/ac9GEQhxgFWy102RrBi/96CWNQGAWYx4cSN7Pg=; b=W/QJvfOG1S2aw8AHHspRF+F0Cru7bxKMKGSudgHFMjdbTFkvXsRrjzzksoSshU0943 dOjSY3fEilKzrKvAMX5fVeyO08Sls0cy1RE7lMKrJMbwHWYq7HcDrH9pnO2CHCug1OzH EFpkodl8l8NxmF6befdxKXa0AoV0LN1QV3vVIJFuYQJFE0+U4NUtvZv9acGMs0aLid7E ytZWOM394ILDE2kRiKz6Yi39QBTtKqP2sFs1nwBHLRPkrpeaGqlmZPkghmVuE+Qa6ICk k8Yh445dfJID57bZePoeLSV5SpHMDWOUN2vrYddEV9/h1uDcAvIM5YDyN7JKzYNE/aQ2 0wLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JOMb/ac9GEQhxgFWy102RrBi/96CWNQGAWYx4cSN7Pg=; b=qNz+uBo6mRWadKp7XyNiDbfVHZ3nChTupNXFjKT9Zs1RNwd778q7BsO7FhB1riJUzS KJOOOqzjk5hK2ZF7H/8dLfqRIe9COkehizhAyleqZNu3gu1izhHXbEuc10SI4J/3z8Vb kI0x88eSbKnI873+Nq6ocgz5tq1DWgn0y3ky/RKBm7K6Alpjw+5TKXfyNIWbTGcWJl5M ge+lZj/bccNxxZ3GxeaZUsYldho6/HCYbUmvDH8dgvVWEHVE7kP33m7ZTDN4r2bxwfxX IrYRv2Boh/4BJ10wgdaQlEyCORUmIcDOlGxz4IhHnjhwz5oBbcKUxqZ58q7TEf0Ba9zN 2+hg== X-Gm-Message-State: AOAM533eYF8yeOCzaQMFKf5nkUxPrfPDLRtQm3UkT+C6pjtASpTfVbOY qxi28L4bYe+DbvGCtbwhV4WaVhHQric= X-Received: by 2002:a05:6a00:b52:b0:508:31e1:7d35 with SMTP id p18-20020a056a000b5200b0050831e17d35mr27122648pfo.33.1650518611169; Wed, 20 Apr 2022 22:23:31 -0700 (PDT) Received: from localhost ([2406:7400:63:fca5:5639:1911:2ab6:cfe6]) by smtp.gmail.com with ESMTPSA id bc11-20020a656d8b000000b0039cc4dbb295sm20479937pgb.60.2022.04.20.22.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 22:23:30 -0700 (PDT) From: Ritesh Harjani To: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org Cc: Eric Biggers , Theodore Ts'o , Jan Kara , Ritesh Harjani Subject: [RFC 0/6] ext4: Move out crypto ops to ext4_crypto.c Date: Thu, 21 Apr 2022 10:53:16 +0530 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-ext4@vger.kernel.org Hello, This is 1st in the series to cleanup ext4/super.c, since it has grown quite large. This moves out crypto related ops and few definitions to fs/ext4/ext4_crypto.c Testing ========= 1. Tested "-g encrypt" with default configs. 2. Compiled tested on x86 & Power. Ritesh Harjani (6): fscrypt: Provide definition of fscrypt_set_test_dummy_encryption ext4: Move ext4 crypto code to its own file ext4_crypto.c ext4: Directly opencode ext4_set_test_dummy_encryption ext4: Cleanup function defs from ext4.h into ext4_crypto.c ext4: Move all encryption related into a common #ifdef ext4: Use provided macro for checking dummy_enc_policy fs/ext4/Makefile | 1 + fs/ext4/ext4.h | 81 +++-------------- fs/ext4/ext4_crypto.c | 192 ++++++++++++++++++++++++++++++++++++++++ fs/ext4/super.c | 158 ++++----------------------------- include/linux/fscrypt.h | 7 ++ 5 files changed, 227 insertions(+), 212 deletions(-) create mode 100644 fs/ext4/ext4_crypto.c -- 2.31.1