Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1206353rdh; Fri, 24 Nov 2023 07:20:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrOREEain0CifAmLKyPhkoHyr3hD5t53nWuJ/QEHEBaKYysdMo6dMyAtcskSFy9X4qm1yq X-Received: by 2002:a05:6a00:2191:b0:6cb:4cf4:2f4b with SMTP id h17-20020a056a00219100b006cb4cf42f4bmr3673609pfi.2.1700839259194; Fri, 24 Nov 2023 07:20:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700839259; cv=none; d=google.com; s=arc-20160816; b=jvuYez1snO9JbEPSQ549KuWgDuS0FT+4tY1E0dtyIclyvy71wiAdh6/mogZsRxKoOf C/MJMs62rAM3EXQMQP0HcAMHKi750rDsG5a/vMM2G7Vjt6xsqyO95atb5wscJZothX+2 IpWnCN8Xgks9Cw3Eez9jmieleMegLcpVdmYoFl6liNyJ8P5piga8khr2vkFhfJdz9A/o R+tuYZJ8drOZgdnAhqwHzmhA8uU6j/QtTe2etECguLmsqnihne/qTJNxid6cV+4YM6FT wY3XSuMWfJIFRQB+UpHA66YP1DoxEsaWkMsIUKsyb0KSnOhywNLajNyZbaHHj7oZ6k7Q t1hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:date:references:in-reply-to:subject:cc:to:from :dkim-signature:message-id; bh=KP9kE/qZ9mZ3UkVY03ruuvTkwENKgMzDkSDUS7WTkLg=; fh=O/LNPyYAI3dpw90VhjAov3sDcGM0Ha2uY+GaRAKPH18=; b=vplA4ny53R2e9smYrueYHuCO3oY9j0f2xFQDt8YOidR/q9Rc9PcIHqOojEyjWkSpQX TDYLhFISXXIJHXLaxlTsQTiZe9wLT/f/8u9P4EO0r7wQDBjCQ8eijWZZ1Qyn9uEVxn9Z hjg/FdmFVnYNB7tqU4S0bRB+zM+HdNIwqjVfiVtqkxDBgZQH7XL+Qj79NBPgtfmp4Ts0 vwqtBTGQlFQ9NUL/yWPXgolUR5MTM9ywislJirsWLlQFcwpIivd+nZOvh14KKYMXk/cl F5O2udXD3GHvFSVbJPx5ea5F6Ar8Y0Tl1XTMUpjwyES1psWwQsPwQmAqIRliRN3NTiDg UMWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@krisman.be header.s=gm1 header.b=lhD5AU7Q; spf=pass (google.com: domain of linux-ext4+bounces-140-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-140-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f16-20020a056a00229000b0068fee0e95c5si3728722pfe.89.2023.11.24.07.20.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 07:20:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-140-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@krisman.be header.s=gm1 header.b=lhD5AU7Q; spf=pass (google.com: domain of linux-ext4+bounces-140-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-140-linux.lists.archive=gmail.com@vger.kernel.org" Message-ID: <6560bf5b.050a0220.cd20.fe9dSMTPIN_ADDED_BROKEN@mx.google.com> X-Google-Original-Message-ID: <87plzzgou0.fsf@> 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0BE69281DC3 for ; Fri, 24 Nov 2023 15:20:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E7012E851; Fri, 24 Nov 2023 15:20:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=krisman.be header.i=@krisman.be header.b="lhD5AU7Q" X-Original-To: linux-ext4@vger.kernel.org Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2425171D; Fri, 24 Nov 2023 07:20:48 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9D8504000B; Fri, 24 Nov 2023 15:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=krisman.be; s=gm1; t=1700839247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KP9kE/qZ9mZ3UkVY03ruuvTkwENKgMzDkSDUS7WTkLg=; b=lhD5AU7Qe1kTAfOW+1UpIAHQWuMOQ6yr2r5z/v2J0mpDrMmvWJtWs0MeE8CJJa1Y0TMoHM b5UFHmUnbAzpLpnIAyoa8MAgUqvT1+8Is4wSqyx4tAlWm7KX4uo+UGOG57+QANq1yaXpf0 hisz9KIiRxt6gPrJBkvO4QrG5mpxAsztruGoKDfiJDknG5+U3HbJmGPjp1y2N14v5j5E5v 0q69wJjdvmPKRE7O5yrBnIbPsp+YdxElXEyr1g2THU26QnV88esgweZBouIGvQXmPxl+Pc OOHxu4SytSoxkXYopPAcXD6Mgvs7G/Q6KBtwqNh/DNvQo0WMM9en4B4dtAT30g== From: Gabriel Krisman Bertazi To: Al Viro Cc: Gabriel Krisman Bertazi , Linus Torvalds , Christian Brauner , 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 In-Reply-To: <20231123195327.GP38156@ZenIV> (Al Viro's message of "Thu, 23 Nov 2023 19:53:27 +0000") References: <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> <20231123171255.GN38156@ZenIV> <20231123182426.GO38156@ZenIV> <20231123195327.GP38156@ZenIV> Date: Fri, 24 Nov 2023 10:20:39 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: gabriel@krisman.be Al Viro writes: > On Thu, Nov 23, 2023 at 02:06:39PM -0500, Gabriel Krisman Bertazi wrote: > >> > A paragraph above you've said that it's not constant over the entire >> > filesystem. >> >> The same ->d_op is used by every dentry in the filesystem if the superblock >> has the casefold bit enabled, regardless of whether a specific inode is >> casefolded or not. See generic_set_encrypted_ci_d_ops in my tree. It is >> called unconditionally by ext4_lookup and only checks the superblock: >> >> void generic_set_encrypted_ci_d_ops(struct dentry *dentry) >> { >> if (dentry->d_sb->s_encoding) { >> d_set_d_op(dentry, &generic_encrypted_ci_dentry_ops); >> return; >> } >> ... >> >> What I meant was that this used to be set once at sb->s_d_op, and >> propagated during dentry allocation. Therefore, the propagation to the >> alias would happen inside __d_alloc. Once we enabled fscrypt and >> casefold to work together, sb->s_d_op is NULL > > Why? That's what I don't understand - if you really want it for > all dentries on that filesystem, that's what ->s_d_op is for. > If it is not, you have that problem, no matter which way you flip ->d_op > value. I'm not sure why it changed. I'm guessing that, since it doesn't make sense to set fscrypt_d_revalidate for every dentry in the !case-insensitive case, they just kept the same behavior for case-insensitive+fscrypt. This is what I get from looking at the git history. I will get a new series reverting to use ->s_d_op, folding the dentry_cmp behavior you mentioned, and based on what you merge in your branch. >> and we always set the same >> handler for every dentry during lookup. > > Not every dentry goes through lookup - see upthread for details. Yes, I got that already. This should be "we always set the same handler for every dentry that goes through lookup and bork whatever doesn't come through lookup." -- Gabriel Krisman Bertazi