Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp113164rdh; Wed, 22 Nov 2023 21:10:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNHcbaangMILz6fidXRlDO7/VdgvgNkoDBIAEqjifB4e0C4iLL33Sv5pfBwaFp+ZehZmdv X-Received: by 2002:ae9:f30a:0:b0:77b:9bf1:6539 with SMTP id p10-20020ae9f30a000000b0077b9bf16539mr4251313qkg.31.1700716203600; Wed, 22 Nov 2023 21:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700716203; cv=none; d=google.com; s=arc-20160816; b=SoXhqvkjSAICeMtpyfm1uZUtyVqXoYoEe3Odrl4Q8ejU8GwZvtvP/RGdzOBTLQdy2w DmayoezC7IJ4KDHGI7KFMaFoTYYZLbIJY4RiyahOlxL2BSE45oOQ8H+Dw/RnnVSDYc0U 7Tv9qFTC/nwaueK/br5tGVqNSG0uk0H07c9xLV2qzpBnUbtj3CSjCeHrCci6+uuNTYVb EEF5aOmGg+vmryUoh/VWpBJ8vku0HHVXnYPLrhgFxKvdbNW/zh6UFrDawQjibxcXeEE5 1UYF6+JaiTmnkvka+5rD0JZm3+SytZEVdPwEEhtJfr5+ZEGDQTxGV/JiICeOygAuk656 BVSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=iITGfQea8BxCiD9vKqR4Ix99Hb6hdNI5sOzOQogEaHk=; fh=EC56zrK1cCR0+MNXSpbwKRCx2at6bGt3EsEAPFXz1Rs=; b=hNFp44hT2QA20PV0X5n6YpkNSR4cvDL5IstfHzATri/3cCVtQ0z/D2Zpd//MgKyAHZ v0hB/OMI1yevFv2Wg+o9+A9CXHIEzuX7tF3RVRFMNwDD7G5ijYRC5PN4iHuLm+4dsS1s uUrCqPOf0VxyAGx9H4h5ccKhcjKtLmWFA7U2ozkRt8gg+Ir+eLGrRnVGt3Q5v1HizpWx wCgcS7EAIpoloxpo3LJ0QIPz7nPMrifRkYseFenp7QoqPeu0oV0XRoI0Rm/BnqO397pB QAI6aure6BQ3sy2bFi1+OotOyB2I8j/wImOk745mmzc4OtmU1oin7sjFX4GwZwTLrTwO bA/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=Ib38JnkE; spf=pass (google.com: domain of linux-ext4+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q5-20020a05620a024500b007681177b50csi437895qkn.365.2023.11.22.21.10.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 21:10:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=Ib38JnkE; spf=pass (google.com: domain of linux-ext4+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4ADDC1C20CC2 for ; Thu, 23 Nov 2023 05:10:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 244E4613E; Thu, 23 Nov 2023 05:09:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="Ib38JnkE" X-Original-To: linux-ext4@vger.kernel.org Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1467AD8; Wed, 22 Nov 2023 21:09:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iITGfQea8BxCiD9vKqR4Ix99Hb6hdNI5sOzOQogEaHk=; b=Ib38JnkE8qFEfCsu6aaCR/9lHx SMAuzxYNMe57P3S2yZ+Jw3sFPbIN2FDzhDJdjTipjmREeWsMJMU9bz/9gtgibiJOz/22oIQewboOf tG2X8/Hjx6DGB/GY+Z2gUUevGHcPgAZrRYpzFj9XC62UIchkqR/KHWqJl8ykOShhPoW3iPAxomT5j CGPvkfO5sRHRlLYG5LvHSi6OYIYamRv9t9bv/o+P8+wu+pRxlbE9kc7VpS2zAqgQoujiADDzQpxdF yTTiXRP3iC1vH3WjCFTtCwdHZb+peIKUQnpEYL2xZRTRzD6/RbZt9kzOoTN4K+Vl2iW+65S153WS+ pArIhMlw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1r61yB-001vUi-2H; Thu, 23 Nov 2023 05:09:43 +0000 Date: Thu, 23 Nov 2023 05:09:43 +0000 From: Al Viro To: Linus Torvalds Cc: Christian Brauner , Gabriel Krisman Bertazi , tytso@mit.edu, linux-f2fs-devel@lists.sourceforge.net, ebiggers@kernel.org, linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org, linux-ext4@vger.kernel.org Subject: Re: [f2fs-dev] [PATCH v6 0/9] Support negative dentries on case-insensitive ext4 and f2fs Message-ID: <20231123050943.GM38156@ZenIV> References: <20230816050803.15660-1-krisman@suse.de> <20231025-selektiert-leibarzt-5d0070d85d93@brauner> <655a9634.630a0220.d50d7.5063SMTPIN_ADDED_BROKEN@mx.google.com> <20231120-nihilismus-verehren-f2b932b799e0@brauner> <20231121022734.GC38156@ZenIV> <20231122211901.GJ38156@ZenIV> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro On Wed, Nov 22, 2023 at 04:18:56PM -0800, Linus Torvalds wrote: > On Wed, 22 Nov 2023 at 13:19, Al Viro wrote: > > > > The serious gap, AFAICS, is the interplay with open-by-fhandle. > > So I'm obviously not a fan of igncase filesystems, but I don't think > this series actually changes any of that. > > > It's not unfixable, but we need to figure out what to do when > > lookup runs into a disconnected directory alias. d_splice_alias() > > will move it in place, all right, but any state ->lookup() has > > hung off the dentry that had been passed to it will be lost. > > I guess this migth be about the new DCACHE_CASEFOLDED_NAME bit. > > At least for now, that is only used by generic_ci_d_revalidate() for > negative dentries, so it shouldn't matter for that d_splice_alias() > that only does positive dentries. No? > > Or is there something else you worry about? Dentries created by d_obtain_alias() will never go anywhere near generic_set_encrypted_ci_d_ops(). They do *not* get ->d_op set that way. When ext4_lookup() does a lookup in c-i directory it does have ->d_op set on dentry it got from the caller. Which is promptly discarded when d_splice_alias() finds a preexisting alias for it. Positive dentries eventually become negative; not invalidating them when that happens is a large part of the point of this series. ->d_revalidate() is taught to check if they are marked with that bit, but... they won't have that ->d_revalidate() associated with them, will they? ->d_hash() and ->d_compare() come from the parent, but ->d_revalidate() comes from dentry itself. In other words, generic_ci_d_revalidate() won't see the lack of that bit on dentry, etc. - it won't be called for that dentry in the first place.