Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1757588ybh; Sun, 15 Mar 2020 10:17:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuUA47/nOMZnUurkLVyzBS/hktF8nx2x2iNGQ7BVe8Pm6NNnKz/rEr0nbl3GPcsOrzyjsNb X-Received: by 2002:a05:6830:1d7:: with SMTP id r23mr19202349ota.181.1584292627312; Sun, 15 Mar 2020 10:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584292627; cv=none; d=google.com; s=arc-20160816; b=VpSP5AYeLrildnJqXso29tzBIeq/kJ0ZEl7Mbga4Q6QgELv8DRvPS0/r0ms2WPB4lu W6bi9SSHvXBJJVFrO1BTv/2luk/kmG316MV6RGTDQrhQyzm7laGsI/cXWQfKjb2N54Oc K/tusUkMBgU9IyVOeVfuK9mUGEgx1N0sMhDXl6R0d2JN8QL6HXUQhqEI5ubOHBNT8Rdz DVxENFIUeAdCmrM4/0LFsuluAtssb0vzV8ESgpGc+uw+7CN9gQVCWOCfAFMb8J3vbbU6 zrB0rgR4+5REYp8TqziHnDsDIG6QViUwfuY0XnHGffuEI9HUEYaG28C8cqo5hqtxqae3 Vc2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1u7noUF5hbjOzf1Cqm3pnq4R2FK6W1wARcJl3hl/RGw=; b=WVXHuReV/bXLSRj8ITmN1gFIzKROAds/Yji9XiQGBzvll4qLVihvvd9aQdSGlaFKuf RDwxCUut2mLCX+ZDU+jKIcxofIdxI3VkINXNglp2KK9gighXp/ho0wtg8EI0UGRnX0NK 5lhodlWeGHrf7JCaQhTrm7P0kl5/Pr/fmXiureVLBwMkV8C+JyIr08Tse4VMUXOwz+Du O4HE+E5J8H5xWEzuNZNvfAvE8tJUQd6YuNlI3DqJWc+gYSqGSXs1YnL+ZHmqv5d4eNxe UD72LBoNhhLFdnONTRJHKurpX8WCs19FnziPBAd2Cn77u/Wm0QaH+wlHJsTqQA0jY8NV NLew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fz8xheLu; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a59si9029195otb.8.2020.03.15.10.16.56; Sun, 15 Mar 2020 10:17:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fz8xheLu; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728955AbgCORQz (ORCPT + 99 others); Sun, 15 Mar 2020 13:16:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:42240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728947AbgCORQy (ORCPT ); Sun, 15 Mar 2020 13:16:54 -0400 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BC567206E9; Sun, 15 Mar 2020 17:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584292614; bh=+lmpvdxUBRgyrzSD7k7JSLFEM42g3oWA97s0+PhrLF8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fz8xheLuuQR+wB/DfIa8fMDHBJ96eTBl6qoUQEPumGFkmN+p2eeRitOsIvPQcwEWX sRdvJhFc0FfCr/6CNrztD5Ta/DRrUiu5/aYHe+U70wAB9I8f7fFCSoPsWq5PyGQl0F bbS551kFvD0b5ZrLw8+8RdX4rlEDR7PjNypkYRrs= Date: Sun, 15 Mar 2020 10:16:52 -0700 From: Eric Biggers To: Satya Tangirala Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, Barani Muthukumaran , Kuohong Wang , Kim Boojin Subject: Re: [PATCH v8 10/11] f2fs: add inline encryption support Message-ID: <20200315171652.GA1055@sol.localdomain> References: <20200312080253.3667-1-satyat@google.com> <20200312080253.3667-11-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200312080253.3667-11-satyat@google.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Mar 12, 2020 at 01:02:52AM -0700, Satya Tangirala wrote: > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 5355be6b6755..75817f0dc6f8 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -139,6 +139,9 @@ struct f2fs_mount_info { > int alloc_mode; /* segment allocation policy */ > int fsync_mode; /* fsync policy */ > bool test_dummy_encryption; /* test dummy encryption */ > +#ifdef CONFIG_FS_ENCRYPTION > + bool inlinecrypt; /* inline encryption enabled */ > +#endif > block_t unusable_cap; /* Amount of space allowed to be > * unusable when disabling checkpoint > */ This bool is unused now. > @@ -1568,6 +1577,9 @@ static void default_options(struct f2fs_sb_info *sbi) > F2FS_OPTION(sbi).alloc_mode = ALLOC_MODE_DEFAULT; > F2FS_OPTION(sbi).fsync_mode = FSYNC_MODE_POSIX; > F2FS_OPTION(sbi).test_dummy_encryption = false; > +#ifdef CONFIG_FS_ENCRYPTION > + sbi->sb->s_flags &= ~SB_INLINECRYPT; > +#endif This really should be CONFIG_FS_ENCRYPTION_INLINE_CRYPT, but actually there's no need for the #ifdef at all. Just clear the flag unconditionally. - Eric