Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp212210ybb; Tue, 7 Apr 2020 20:57:57 -0700 (PDT) X-Google-Smtp-Source: APiQypKFYtrXzypFZMprRgTONZ2BKl38swv5IsULLq01ExoU0Ofu55Bo2YhZONW4k8HspWnSkoBM X-Received: by 2002:aca:3196:: with SMTP id x144mr1069178oix.77.1586318277644; Tue, 07 Apr 2020 20:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586318277; cv=none; d=google.com; s=arc-20160816; b=dY8aztK0ltXynzQ7E9uil1T+ZXgrFrOXhjZ7MoHuMhugmC0T1u3pOoL9xREGMbqxzS vSE42R6UbwqPJxlAqQZ0hntqiLzRKHFAiA1jPcY7qFtcNu/+fiyMIShT7pKMTWaS52Xz uoJb+SgNYXzukZz+uPsR6e0MF4FY0G5tGxKn0Sig9nYV4g2HLWXxWb7PoT7kgdwKI8OX PLSOUxv5AWFkWj+E7Pk5PONvYuxOfs7Q4HT40GPgwsAN78VraWmKNPMNTozZY2HBBDDu xq8fNvuufTy7RMrW1ihhH1wRR+46HYQryBvlCv6CL3gHEvIGVlOWEZ5ju12w8O1vMKhL FqPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=xJkP8e59/n7iIujiMcl7X5Pc4Tz1txAW1Gmb+VI1O1Y=; b=uuAXjoVBech7jcuUK/wuWQzfnV9xknwYQvSPiPXPfB2nhyQE5cDCbv/1LMG2SRSpew ek15GooJu+O1dyVWiiep5eTcwHmeKuzvVqLBAgKBAXaCaSecMTWET3WBzScZnPh6BhuJ tWpBO8stwEELEJixmXZLez4bXwdUFVgmFoKS8XteYN1U9XEfeUB7lUfHpZ1YArf1Wn5/ I9kr+AQU9xNtyitxPvFWi7s157YVLtK8NebnlVT3VDay2p3eBfVn46EAeAVS30otBR/s ULlW7aDMUalrrqcSkGGmzSNXRItD818CuLey2FyK6HbaPnOiHHNubBxaJ8gS0u6B5pRw M71w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ibNVbWoN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h15si751325otr.266.2020.04.07.20.57.44; Tue, 07 Apr 2020 20:57:57 -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=@google.com header.s=20161025 header.b=ibNVbWoN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726695AbgDHD53 (ORCPT + 99 others); Tue, 7 Apr 2020 23:57:29 -0400 Received: from mail-pg1-f201.google.com ([209.85.215.201]:52658 "EHLO mail-pg1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbgDHD53 (ORCPT ); Tue, 7 Apr 2020 23:57:29 -0400 Received: by mail-pg1-f201.google.com with SMTP id m185so4375733pga.19 for ; Tue, 07 Apr 2020 20:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=xJkP8e59/n7iIujiMcl7X5Pc4Tz1txAW1Gmb+VI1O1Y=; b=ibNVbWoN51vmsJrnlJSyk7S/HV0c8UIXlHKsiPBuqewKjm5llKIxkJQ2Ji6nSQ5LST n0AJzKnewfPtpxdakzl7dwb2+91zGQKDysHCziHYKo0tFR1ScmRd04hvJVWaY2YcVM+F OKQ5wPf19y5SXFt/ZT+JbE01LhU7PYsjJLNBM1vFzPxEjpOakDSmt31RSKSr0HCnMJhE /xcirmTzPlVcDhcSinZQBr8QECGNh2xp6qMaKKhgembnsheFqD++bhOCQy9chtUO67+e V2zC3D3KjJuEpzTMN9m6sZK1ZubjNyZ/RcYtK5PwdKmyKiOze6MxP6o4u9iNwoAloouL u/Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=xJkP8e59/n7iIujiMcl7X5Pc4Tz1txAW1Gmb+VI1O1Y=; b=tyjC+hHL2Jvuv/XOqGmoEhfpAC5sW8LMHt35KhP3Zetiay7bberQU8460RwSV+tQpf 8FB7yNKR+rsyCIss9aeHlq82K3TeravwwEK5A9vHzHeTSzIYXxLkjsYE8ilY7J64wxZF EZTuhjvAjXxMUh4dMTw864woiIzMKiPyx6d5hSS3CM8t0ki6hZoQRBH7iPpUZ3uMusyo hqdgFmaL4jZc7y9Lhq9FedDBZ0Jtlf3aaGwdlQvEKDGgGC7SY0h2NMZBQ1RUE2xUW7yx Tz99nx9LVS8E8p49afqnE9kpt5TzX7kokpgrV6m5c00ybOjusVV5cIt6VVGYBvZ87qm8 gPSQ== X-Gm-Message-State: AGi0PuYSqy8nlkGWTXvX7qRDU2C4hPuA667ITk/PoryUK90WctwGwhKX w+oekvDNwzF/mLVYMOVrtf9hzBMAkvk= X-Received: by 2002:a17:90a:3547:: with SMTP id q65mr3138844pjb.118.1586318248079; Tue, 07 Apr 2020 20:57:28 -0700 (PDT) Date: Tue, 7 Apr 2020 20:56:51 -0700 In-Reply-To: <20200408035654.247908-1-satyat@google.com> Message-Id: <20200408035654.247908-10-satyat@google.com> Mime-Version: 1.0 References: <20200408035654.247908-1-satyat@google.com> X-Mailer: git-send-email 2.26.0.110.g2183baf09c-goog Subject: [PATCH v10 09/12] fs: introduce SB_INLINECRYPT From: Satya Tangirala To: 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 Cc: Barani Muthukumaran , Kuohong Wang , Kim Boojin , Satya Tangirala Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Introduce SB_INLINECRYPT, which is set by filesystems that wish to use blk-crypto for file content en/decryption. This flag maps to the '-o inlinecrypt' mount option which multiple filesystems will implement, and code in fs/crypto/ needs to be able to check for this mount option in a filesystem-independent way. Signed-off-by: Satya Tangirala --- fs/proc_namespace.c | 1 + include/linux/fs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 273ee82d8aa97..8bf195d3bda69 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c @@ -49,6 +49,7 @@ static int show_sb_opts(struct seq_file *m, struct super_block *sb) { SB_DIRSYNC, ",dirsync" }, { SB_MANDLOCK, ",mand" }, { SB_LAZYTIME, ",lazytime" }, + { SB_INLINECRYPT, ",inlinecrypt" }, { 0, NULL } }; const struct proc_fs_info *fs_infop; diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f6f59b4f22a8..38fc6c8d4f45b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1376,6 +1376,7 @@ extern int send_sigurg(struct fown_struct *fown); #define SB_NODIRATIME 2048 /* Do not update directory access times */ #define SB_SILENT 32768 #define SB_POSIXACL (1<<16) /* VFS does not apply the umask */ +#define SB_INLINECRYPT (1<<17) /* Use blk-crypto for encrypted files */ #define SB_KERNMOUNT (1<<22) /* this is a kern_mount call */ #define SB_I_VERSION (1<<23) /* Update inode I_version field */ #define SB_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */ -- 2.26.0.110.g2183baf09c-goog