Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp221904lqh; Thu, 30 May 2024 21:49:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXXZSz+qw4Mdljug5bxd21bCoV/zZ+reysguOpG0oIc9oXznVd+G3Q7arGb60E7hg3JwfWLeH9dwKaR1IVgx5Pp8aYDTwYMigGPJVCP/Q== X-Google-Smtp-Source: AGHT+IEoFryW+RidEBG87wzSDLngtmo8rSnblyh618yBaWkjTj+afCmbXCvYkbZpU782QWVKER7Q X-Received: by 2002:a05:651c:148:b0:2d8:5fe6:820d with SMTP id 38308e7fff4ca-2ea950e6bc8mr6495441fa.11.1717130943297; Thu, 30 May 2024 21:49:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717130943; cv=pass; d=google.com; s=arc-20160816; b=u8dgStekmE6q8vkPBEcg7yBZ52YtWNPUkmKnAsazT+3UISBOt5e7akoug+JGne7g3M KGqiRLwFtcHNp4aBY0ajtojDYiRF/G0TXM8Q7BHJdKw+7DB6FM9PmfLU+iELtYVje+FP HCclqsk+OvOg0snY8iV8rMNbnrAOv0cyvbFMkU3SLHT1DUQHAbCq4r8ArMJYVwA1i4s9 2IfpiHCS1GdpY/3iVQMyGhpmOWcbwOtrqqe16DBw6GuataIpdzI8FoEf+oMzCw3ADOWy SDzmxXVY1llmRI39kh5DU8SCJfyCzSNMt/haDitHskqNOHZF9O8Tj/lgSeXqQ/hT1P8J J93Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=auXRtM2e/TLalAaEINNQJc8ISA/byjh00SGMnCvszE8=; fh=vrhqCRW8R/pQxUHesIeIBY1nKX+87fTiwfo/IqLIvIY=; b=PiLOtqlSW86OrhbXb5xTM+98ylcaxthNj82DdbSGPAmLjGAco5naaM4IGpQ845cI+M 0f546/B+WdgZVaYaqxBGOqy2npx4P9QGlKOBBL3dro8DCk1rJxcIeHeAzRqidLhpip4S +7S4Iczxk+uG9ZbxZAdXx+zPZJDnXh1XsV+LDtYr9FJyZXdXJe6BUIaPCWtIX35YnD0c wenbgA+K87MOg4XDMQGcwkkXu2ynHtFbTaE6BvYyh6U1hI4TGor907zAALpNrG4PY1Ya uhPyHSCV9VtmQpQvBX03zdQol03dgcRjZBNZ62MCir5LYX7+CR1Og9GadNAftgz2Xl1i wzRA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQyewlPk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-2722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67e6f0310dsi47523266b.184.2024.05.30.21.49.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 21:49:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQyewlPk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-2722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 03F421F215DE for ; Fri, 31 May 2024 04:49:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEB7D78269; Fri, 31 May 2024 04:48:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TQyewlPk" X-Original-To: linux-ext4@vger.kernel.org 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 3C69F1C6A7; Fri, 31 May 2024 04:48:53 +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=1717130934; cv=none; b=iGhcyj60+3BH2HLo7WUSw3mQmPKIxnsQVzL6aHZdDw+xEGQ9fJYVhIDcX76qftHSbTP+XJuzcsbYAXOhDBntFWaVKZxJ5aB/0XcBuNQaNmEr3EmTvqbGDgHOTr9ZWiMFnNmY/i/2bLGedawN/cx9aIoYEMtiY1kMvqd8Wd9UdOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717130934; c=relaxed/simple; bh=rwZVOoPGbQlEDRXpL/1iSA1Qlmy2Y3mYxOuSyODH8DM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LioG8EfHFgb/95hJRoScLp9RV3TjoNcb4MxIPJ82v3g4qumCT90ffvNnBD7XrZE40wn2STAltF7Rh5W9MKnupsQbGToQZlbfQrqOoozdDEnDIl2RsPxfpH2YmpstOE7qBXie13XfB45w+xq1UGIWTSCRxHK5XEOckpE0Z6UTnBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TQyewlPk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4820CC116B1; Fri, 31 May 2024 04:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717130933; bh=rwZVOoPGbQlEDRXpL/1iSA1Qlmy2Y3mYxOuSyODH8DM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TQyewlPkyzvr81BeLKj47j+oHAqkafhoB/DIsCyjteH/CtWXrQVDA48PvKdxBmfee zVVS1mq2JRFLY/VqjYaHMzIM2EHhSCXNXFBZbI8I2QsYuIgrC5df9DV7TAbQSPYVTr 1JBb6aIJPLQ0xOYth6tTT18KncAR+xuNRLJuQ4UHFvZt8VsgyKsMjqvPFNhyKlsl92 bOwYAeQHqzAWUdtm8uCrsujcNo5y9tDP2xRew8aIvsSXyHTrtML0VdEBSzV+nsppvr JjG6SXii9vIY3wlq5gEHudVMg4tV7gJO+EEZIDKrBencsaHSr+SOAa4GMSNwu0jiO/ 8bIa0hL5yG7ng== Date: Thu, 30 May 2024 21:48:51 -0700 From: Eric Biggers To: Eugen Hristev Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org, adilger.kernel@dilger.ca, tytso@mit.edu, krisman@suse.de, brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk, kernel@collabora.com, Gabriel Krisman Bertazi Subject: Re: [PATCH v17 3/7] libfs: Introduce case-insensitive string comparison helper Message-ID: <20240531044851.GE6505@sol.localdomain> References: <20240529082634.141286-1-eugen.hristev@collabora.com> <20240529082634.141286-4-eugen.hristev@collabora.com> 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: <20240529082634.141286-4-eugen.hristev@collabora.com> On Wed, May 29, 2024 at 11:26:30AM +0300, Eugen Hristev via Linux-f2fs-devel wrote: > + /* > + * Attempt a case-sensitive match first. It is cheaper and > + * should cover most lookups, including all the sane > + * applications that expect a case-sensitive filesystem. > + */ > + > + if (dirent.len == (folded_name->name ? folded_name->len : name->len) && > + !memcmp(name->name, dirent.name, dirent.len)) > + goto out; Shouldn't it be just 'name->len' instead of '(folded_name->name ? folded_name->len : name->len)'? - Eric