From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B15ABE7718B for ; Mon, 23 Dec 2024 16:57:48 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tPlkY-0006TM-F7; Mon, 23 Dec 2024 16:57:46 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tPlkX-0006TA-I3 for linux-f2fs-devel@lists.sourceforge.net; Mon, 23 Dec 2024 16:57:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yEjayENDt6uv1kSu9Z9p1ZM63ZPQhxfKSotkBDsQcVk=; b=Dh9RklRop546zwZr/7bkBbCQDB iSG1HPQ9A2rQxPCs6/tL8VfAAu9R7bEb14cf2iXR7HWM4revz7Sro/KntfKXRsu3AwA0t58gHNi0D PQKN+N1Mq5cj9oMN4rTo/sJoXL75+jh1FmwjbuX6CWMFmQo27hmm4hz8AZSzMaqUJNF4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=yEjayENDt6uv1kSu9Z9p1ZM63ZPQhxfKSotkBDsQcVk=; b=bVxnmYiX58E5XZ5lKILH7ueSEc Kq4KmzqA70v/u5bBlFqfrY/4pgr0S+61BYfMT4wfVOK5/E92k7sSKMkZH5rt/I9+TUp0LygsjxqPb UuaEKTOhtiDcMvKPjM/t16yjVut1C0mDhUdP21dFccCR0+p0t14R5WuFkR5kZTAhAvfw=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1tPlkV-0005Gx-OF for linux-f2fs-devel@lists.sourceforge.net; Mon, 23 Dec 2024 16:57:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 92BDC5C5508; Mon, 23 Dec 2024 16:56:56 +0000 (UTC) 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 To: Christoph Hellwig Message-ID: References: <20241220172136.1028811-1-chullee@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1tPlkV-0005Gx-OF Subject: Re: [f2fs-dev] [PATCH v2] f2fs: Introduce linear search for dentries X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jaegeuk Kim via Linux-f2fs-devel Reply-To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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/ _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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/