Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3749802ybi; Sun, 2 Jun 2019 22:44:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwj1WWUHDv32CRJNwUBKby+s1iTQ88/hhPE/RVRKzvYEXls7yNNANnfRQm6GxPtWKLCpQoI X-Received: by 2002:a17:90a:d683:: with SMTP id x3mr28351848pju.42.1559540692470; Sun, 02 Jun 2019 22:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559540692; cv=none; d=google.com; s=arc-20160816; b=Eek/hBMaxCO4ePsGaZA65JDfDgpIVik5mpTg3n6iZ7feEcrzsOKAKCEqL6S+vUI0eA lXIVLEGx0YlghnFMHSl7RRUviNkZhydgya+liy10WESDjjop/x9VLzzfFAxFzh4WkW/C P4dMRlOucgU8U8ZlVeKKaqNuwDELx7b70d2/3sIi5FVfR53/IhRICLM+1uSh5XHfgi0h cYAQpbxXONMOovsxdY111JMjOA6Iw+CvhQRzDW+b7IHi9RaFVsBB05fv8rVLGUQ0o8+Z 0xoc2IKtwmheKvdPM20zZ1D5dNdcFqzPA9kp+1Nebvx0TNEpbYKYufV+8Yt3nTM50xu+ YSSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:subject:cc:to:from; bh=/fB4nw2H5upZySjGIwIeW0vkUD+hFj4cwrTg61mdSQ4=; b=L5Detz5C3Hn6yvS4pVnmPcFAWtAEEQvsFm6HwBkvV1KPP8h074MefpJRnnpgYH5nbC emlxbWHNuSrCfy1tDYYtwv8/TLB8WqTQ5xbVYt/AXvqIEQcBKaR54xFpuXp6SHFBqArD 43UhwROsZIEBdX2VwrQar1mnrATxfu5vlN52CJgeR8rzI3gFeFF2JB5VQv0VKusnJe5S MgZfwUrEWUbIlutVwVgLxAt/xuDvgqwNPTZNCq8Z7jb/Xe22PHCAZLi+Mje6sYGoLkQ5 IkW/n0GXH/5lI/LlQBfRyD9yOt8kEB9HCtVXEYsowUejjaM3x7jffDtYMmHdKMeg6/Xc Gs/w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v15si18405354pfm.91.2019.06.02.22.44.30; Sun, 02 Jun 2019 22:44:52 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726520AbfFCFli (ORCPT + 99 others); Mon, 3 Jun 2019 01:41:38 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57912 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbfFCFli (ORCPT ); Mon, 3 Jun 2019 01:41:38 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id E6E1B261FA4 From: Gabriel Krisman Bertazi To: Amir Goldstein Cc: "Theodore Ts'o" , Marco Nelissen , overlayfs , Ext4 , Eric Biggers Subject: Re: which lower filesystems are actually supported? Organization: Collabora References: <20190602180057.GA4865@mit.edu> Date: Mon, 03 Jun 2019 01:41:33 -0400 In-Reply-To: (Amir Goldstein's message of "Mon, 3 Jun 2019 02:18:25 +0300") Message-ID: <85k1e39qeq.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Amir Goldstein writes: > On Sun, Jun 2, 2019 at 9:01 PM Theodore Ts'o wrote: >> >> On Sun, Jun 02, 2019 at 09:42:54AM +0300, Amir Goldstein wrote: >> > [+cc ext4] Heads up on bug reports "Overlayfs fails to mount with ext4" >> > >> > On Sat, Jun 1, 2019 at 11:02 PM Marco Nelissen wrote: >> > > >> > > According to the documentation, "The lower filesystem can be any filesystem >> > > supported by Linux", however this appears to not actually be the case, since >> > > using a vfat filesystem results in the mount command printing "mount: >> > > wrong fs type, bad option, bad superblock on overlay, missing codepage or >> > > helper program, or other error", with dmesg saying "overlayfs: filesystem on >> > > '/boot' not supported". >> > > (that's from ovl_mount_dir_noesc(), when ovl_dentry_weird() returns nonzero) >> > >> > Specifically for vfat it is weird because of >> > dentry->d_flags & (DCACHE_OP_HASH | DCACHE_OP_COMPARE) >> > because it is case insensitive. >> > [...] >> > >> > I am guessing when people start using case insensitive enabled ext4, >> > this problem >> > is going to surface, because the same ext4 (e.g. root fs) could be >> > used for samba >> > export (case insensitive) and docker storage (overlayfs). >> > [...] >> >> We *might* be able to only set the dentry functions on directory >> entries belonging to directories which have the casefold flag set, >> instead of simply setting it on all ext4 dentry entries. But still >> won't change the fact that overlayfs is going to have case >> insensitivity support if we want the combination of overlayfs && >> casefold to be supported. >> > > My intention was not that overlayfs should support casefold, just that > an isolated casefold subdir in an ext4 fs shouldn't make the entire fs > not usable with overlayfs. That is a reasonable request. I discussed a bit with Ted about how to not set dentry functions filesystem wide, because that gets in the way of fscrypt. I don't have a definite answer on how to do it, but it is something that I will try to fix to enable fscrypt+casefold support. > Incidentally, we already ran into a similar issue with ext4 encryption. > Issue was reported by OpenWRT developers and fixed by: > d456a33f041a fscrypt: only set dentry_operations on ciphertext dentries > > I recon casefold is taking a similar direction to the fs/crypto library, so > solution should be similar as well. > > BTW, is casefold feature mutually exclusive with encryption feature? > Because if it isn't, d_set_d_op() in __fscrypt_prepare_lookup() is > going to WARN_ON dentry already has ext4_dentry_ops. Not yet, and that is part of the reason. Right now, these two features cannot be enable simultaneously, but it is on my todo list to support that case. > Thanks, > Amir. -- Gabriel Krisman Bertazi