Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1203703pxu; Mon, 23 Nov 2020 14:32:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4j5zSds8gbAkCY+k1K6jCReURqgt4+Rxu7C6PF7q8nm2ntNeKBs3aWJcZbw7x8iRZz0QX X-Received: by 2002:a50:f115:: with SMTP id w21mr1277078edl.91.1606170774061; Mon, 23 Nov 2020 14:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606170774; cv=none; d=google.com; s=arc-20160816; b=CMMILrZBH6vFhNqCrqmfxp4iqsVHc9tuW8q7maD1ZkLskOzxCNVHUI9/MhMjyfVyVk Qhrm6/0Z3kKieXjUsZ9PvFei604rR8F0wfQMXroz0Ttpa1SvFUos7TzlUuC8ujUCVL7A WkfIojv6rmbcgTNXUKx0r4Fv/u8fKwfUbU7Qxt7B11iIVAuIEa90IOakq7C0OSc1V3Ny BiZ14rNIYMuUGkC7PYAzpIrJcGQEkOVyAjyibBf0P6oPJJ1swnRmYu2OZmektLJJS+OS Fw4YHEArAhUVAfIg+55ayzFayArAXveVg9Xmsbk2O+N8xZMqbN2I5bRbLghjn86PCk8H P4Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XXu49o5iZyspA2ifZyeWEGWGTBk61BoVOtCr1XTfB4U=; b=JHS7vo9qYSD/ukLL2ZWZtpQs9dyDQAEZ1GGVCa9DlL6Fu0AS1ENgmVD8rNje+accPn BD1GxevAey8/185Z2g6ctRWHZQD/4xGeF2RZ/7gpCCvYF5xtw7LoGhoXmgR1EnLfnm8f we1BJcfAoIwY3HTvkLf+6OWkgPWKn4AHOfpxeouwIt2odVGhlcwtvkggxDreYEdTrbVE 9Jpy/s9C04RCnvYA4XOYUf3nvhGvHpZWKrceAfztG+gJRHpHwcBZfIXKxYyRwuEYeaTN 0ANjw0o0yrhvRkFHsx8VsktTbBIwpGiCBIs5gFc79cS/cUK2ySA4bnGXjJnFBslbNNoy fe5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DNfDxTnu; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id e18si7284901ejq.261.2020.11.23.14.32.30; Mon, 23 Nov 2020 14:32:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DNfDxTnu; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 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 S1731007AbgKWWaj (ORCPT + 99 others); Mon, 23 Nov 2020 17:30:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:46198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728649AbgKWWai (ORCPT ); Mon, 23 Nov 2020 17:30:38 -0500 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (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 75A21206D5; Mon, 23 Nov 2020 22:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606170638; bh=qMsLhguUfZGHthn8o/bIe+LRx3PrKd4xYprbL94g5Es=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DNfDxTnuJc/9ZOQO+U1ViZqPntmi9u+PapFohdzgovjh/jy/Yy4xVB33Rww+qBRm7 az2CJzZnLZkYf7iatMCzDNGSHVMHyPoXq/qiSNoa3lsby8//RGmrveXMtq3Cqen2Q2 SidiEvRqa7Jbzx0Zmg8juZV1Q8JiUJnD9dIkecsc= Date: Mon, 23 Nov 2020 14:30:35 -0800 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: Daniel Rosenberg , "Theodore Y . Ts'o" , Jaegeuk Kim , Andreas Dilger , Chao Yu , Alexander Viro , Richard Weinberger , linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, kernel-team@android.com Subject: Re: [PATCH v4 2/3] fscrypt: Have filesystems handle their d_ops Message-ID: References: <20201119060904.463807-1-drosen@google.com> <20201119060904.463807-3-drosen@google.com> <87y2iuj8y2.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y2iuj8y2.fsf@collabora.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, Nov 21, 2020 at 11:45:41PM -0500, Gabriel Krisman Bertazi wrote: > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > > index 6633b20224d5..0288bedf46e1 100644 > > --- a/fs/ext4/super.c > > +++ b/fs/ext4/super.c > > @@ -4968,11 +4968,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) > > goto failed_mount4; > > } > > > > -#ifdef CONFIG_UNICODE > > - if (sb->s_encoding) > > - sb->s_d_op = &ext4_dentry_ops; > > -#endif > > This change has the side-effect of removing the capability of the root > directory from being case-insensitive. It is not a backward > incompatible change because there is no way to make the root directory > CI at the moment (it is never empty). But this restriction seems > artificial. Is there a real reason to prevent the root inode from being > case-insensitive? > The problem is that the "lost+found" directory is special in that e2fsck needs to be able to find it. That's the reason why ext4 doesn't allow the root directory to be encrypted. (And encrypting the root directory isn't really useful anyway, since if the goal is to encrypt a whole filesystem with one key, dm-crypt is a better solution.) Casefolding is a bit less problematic than encryption. But it still doesn't entirely work, as e.g. if you name the directory "LOST+FOUND" instead (the directory is casefolded after all...), then e2fsck can't find it. Unless there's a real use case for the root directory being casefolded and people are willing to fix e2fsck, I think we should just make ext4 return an error when setting the casefold flag on the root directory, like it does when trying to enable encryption on the root directory. - Eric