From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9466986250 for ; Mon, 23 Dec 2024 16:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734973058; cv=none; b=VxrHp/rdeUKZwVSjWpHHzVL3fGhtRoL5unpoXCmFO3jXuNSgQ6PvQFazXDZ4R4dCl1jtOO8jzZX5nYqFt9Fsu27ANPR4Imd+CeZy39wVbqLzyS0fbx6zNXYJlGmvCXD1DpRnzKHcNhRcy+8yVgHIkYK4hElda5Vzim91KeRLSjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734973058; c=relaxed/simple; bh=suJKEELLjfIb0NZM91eAN6mxVZbvUuX/H4WKfj61aTA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HKfFHg2bEOpsif6uU/osrf/j2Tdkf90D5RRnHrHlnnj2md5ifPjT9snPUJAg0tnFgbpavhXpBkrYKVsbt7dGJFbbECogw94eQl1YPq7VwxZHLgDos1G5rvpH8sQ3HSfDW6n1v6kTTrmVsbQZ91rUlCoETGsuxdom5ByQzsPTLCw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qq33b6xS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qq33b6xS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFEF8C4CED3; Mon, 23 Dec 2024 16:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734973058; bh=suJKEELLjfIb0NZM91eAN6mxVZbvUuX/H4WKfj61aTA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qq33b6xSnm4jrv51fJzEUr+E2jm9XFVNGLdZkIURKSMA8TRh6NjyEMwtSYG+u0fnq fp3JjOHE8ePOdyrwfTtMY1wRDfjJ2tDQbhqjgO3b/SDt0xENIO+r2w4PuTUdtaNYj6 DvEHu0AsQW4eKmYDPUPNJjFwBRHTyEzibk2iJ+7/sC/uHTWAc6UoKy4TjtyHwr/CGr GfQOSAX7APY8H8jIyPoomkCStvgFYr2fmNy0hsYZ1LGe3OJYwmLNdhv5c8d/55D5ZM eMPiehl/q+Y3LdrlCiUtaOW6LzKRFiDwMhBbZ4rL03d5XV0IIlAdvyPuhTxmW7IRkS pq0mM7+RcPTjw== Date: Mon, 23 Dec 2024 16:57:35 +0000 From: Jaegeuk Kim To: Christoph Hellwig Cc: Daniel Lee , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] f2fs: Introduce linear search for dentries Message-ID: References: <20241220172136.1028811-1-chullee@google.com> Precedence: bulk X-Mailing-List: linux-kernel@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: On 12/23, Christoph Hellwig wrote: > On Fri, Dec 20, 2024 at 09:21:36AM -0800, Daniel Lee wrote: > > This patch addresses an issue where some files in case-insensitive > > directories become inaccessible due to changes in how the kernel function, > > utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 > > ("unicode: Don't special case ignorable code points"). > > That also breaks all other direct hashed and needs to be fixed. > > > > > F2FS uses these case-folded names to calculate hash values for locating > > dentries and stores them on disk. Since utf8_casefold() can produce > > different output across kernel versions, stored hash values and newly > > calculated hash values may differ. This results in affected files no > > longer being found via the hash-based lookup. > > > > To resolve this, the patch introduces a linear search fallback. > > If the initial hash-based search fails, F2FS will sequentially scan the > > directory entries. > > That means you have really bad worst case behavior for negative lookups. > I don' think this is in any way a good idea. No surprise. Please check: https://lore.kernel.org/lkml/Z1mzu4Eg6CPURra3@google.com/