Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9204414rwp; Thu, 20 Jul 2023 00:49:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlFSAl5CM3aWtcof+5VbU70gKz88yT+AUszRRlnA6VhoL7oaxgxcjnOTr/cy6Y1ab+1zrvCY X-Received: by 2002:aa7:d992:0:b0:521:7ab6:b954 with SMTP id u18-20020aa7d992000000b005217ab6b954mr4204023eds.1.1689839397004; Thu, 20 Jul 2023 00:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689839396; cv=none; d=google.com; s=arc-20160816; b=Mup8WJIOMycZwvjrp80+zw1u8y+VgDUiUnhL66GuyPzUDaPMLxUIJeXXtsWTS/yp60 D0ih6yH7AJiVtQClnCJjDYEI9067IJiGTfHkR7AOiSQVrEi5WEapj7IIQjWuwosi0yhy NaN/W4k/3kinZzS6iXlli0EqRPTQ8MCL/acJCcSJ+kBbDpaOGnMFOzumlj2MWbGzy5Eu YJYkYnHLAYt34THonEg5jKJHQudSkBsWcd0WoQt9x1dW7bseaRnI+ne9DGJFGOSqzXyw YodLuW2+N/IxrwZI8y+WsB1E3g2uFZAMvJKLiexZ1XVLiRyxx606M0McvhblLdrNVHBx +NXg== 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=vc+6mn4GLjQ4v07KThVfWUEi9QVria8rDdcKrT/ysjw=; fh=O9HCw4Bmf2qwjO8ss3GrzvYYvoiF4ciMiD4gTT9PRio=; b=fi+EYNaCNA+JfP0ltSR/lk8eGd4TgVeRQ7v4Byf6Ht/IVmARbns08U/tFj+Bu7ImJo ZlVm0Hr+8es1BwCWmhJcF3WA6fUJxEZBvcGyUMoxVKBlUsvczb2X0a6tPj3Ht2mBEYPX Ur/eFGGnrHmPQkdwwbom6AnteIupsnJIwc8JpXo4wnn1iDjUNTgE++VkZzBciHh1pidC 1pJNwN9CDsWvGJjlO9RHybhrxj5TRBb7KpaE+giX2/98Q9YPMY7hhjt+lU/pHlCsgdsW vj33w3iNHAkKgFs6tLfYLEcnDzfQC2A1J9GTZ1Qf2+80P2VAaSeSr6F0a6elTmcNuvEB bm4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eizBjjVG; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020aa7c553000000b0051e0cc6d8c2si446975edr.474.2023.07.20.00.49.28; Thu, 20 Jul 2023 00:49:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eizBjjVG; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231667AbjGTHnn (ORCPT + 99 others); Thu, 20 Jul 2023 03:43:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231685AbjGTHnf (ORCPT ); Thu, 20 Jul 2023 03:43:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D0F02D4A; Thu, 20 Jul 2023 00:43:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0CA3E618F6; Thu, 20 Jul 2023 07:43:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3FBDC433C8; Thu, 20 Jul 2023 07:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689839000; bh=wkKDK2+s1pOg2JvqCSmY6SM9Z1YuLDwx2K3C/NKe7xI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eizBjjVGnO2vg1Tt2xjCxt2izjubXLk5XoIzez+G7NV6q1Pov2b3Jowbwu6LF+wXa DNbJBORvYQCs0/CSWTrRQCmYn6FsD3maICWoXOwort8kKP5IwPbtFXh0cPUvhaD40s ExnEkERouBZ6IjvHtIe0E+mUHUFZGymwvdhnJCHYdompFyjMBUL9wWaF6UroxpCZqR Dcf1rsRIHmOSHhnxJooVrw450EAg1dAqIDazslQUWsPdBfInFNqjaoEzFkfSmavNZK WkRV1J2XALtQTXEZC0xXWSOWH7LG+fDbExR5IFjiJMxBKUO/yvbkRuAfAebaoIjELj 0C2zvsGLMPibA== Date: Thu, 20 Jul 2023 00:43:18 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, tytso@mit.edu, jaegeuk@kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH v3 0/7] Support negative dentries on case-insensitive ext4 and f2fs Message-ID: <20230720074318.GA56170@sol.localdomain> References: <20230719221918.8937-1-krisman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719221918.8937-1-krisman@suse.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Sorry, one more thing... On Wed, Jul 19, 2023 at 06:19:11PM -0400, Gabriel Krisman Bertazi wrote: > > Another problem exists when turning a negative dentry to positive. If > the negative dentry has a different case than what is currently being > used for lookup, the dentry cannot be reused without changing its name, > in order to guarantee filename-preserving semantics to userspace. We > need to either change the name or invalidate the dentry. This issue is > currently avoided in mainline, since the negative dentry mechanism is > disabled. Are you sure this problem even needs to be solved? It actually isn't specific to negative dentries. If you have a file "foo" that's not in the dcache, and you open it (or look it up in any other way) as "FOO", then the positive dentry that gets created is named "FOO". As a result, the name that shows up in /proc/$pid/fd/ for anyone who has the file open is "FOO", not the true name "foo". This is true even for processes that open it as "foo", as long as the dentry remains in the dcache. No negative dentries involved at all! Is your thinking that you just don't want to increase the number of ways in which this behavior can occur? Or, it looks like the positive dentry case is solvable using d_add_ci(). So maybe you are planning to do that? It's not clear to me. - Eric