Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1034525ybb; Sat, 28 Mar 2020 16:43:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt5h7yYtjbsnoF2CQVewaxcjTE1EIHLT1QhbpJXohMchwnlZ0bacpgIPRWzdlNdxFd8l30m X-Received: by 2002:a05:6830:2415:: with SMTP id j21mr4202649ots.93.1585438994430; Sat, 28 Mar 2020 16:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585438994; cv=none; d=google.com; s=arc-20160816; b=LUcdL1g0p5zYUr5ck3BIx5qglmSaYEVns9k827Xacg4ZpsNBzokPEJlMNhzuEoA+xk +ZKTiAsmpFfLhfDmtJe/GzPvVn/6d74axUHgxVXbbmKztcOZgAZpEqqiZNnHCUNmjotH 0e+fVSd/0+ezK3tEQweLPXZq17Zm5Y770oGrmDGNinatZiGgeiBPayE1DsZZOYI3oP2u wkQJHch08cl1Z95mKuYwKK4WktB6L6qeeubkovpJTKkK6AE+WqLqUO2tBj0/ceN+0X/3 oRlzHBkYUfRDe1Vk/C6tSxfSQbOiQbXHwb+yVIe5UBHQKP1Aqn1aThhbKvWHXSRAwzZy 5rgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=B/UiSKAL8HoAAJC3aB8W2t7OUR1Of8JfO/FiWhIyrog=; b=v0HpxRXKqT1S8JJB6GATtGNJpetD1uo7pbz2G5kpQWy2g1XnfXA/akRcz1yybkVw2I CKGxmbFVOL1dtgIFPvPeXq/7UsPiVw8pFt4Zo3VNAumXitzR+3QWvOL97MAe9olBvdP1 Qd8slTz8RSkymF3ROHECuCxaOEibQqYJXKmyJx2rYQg+SoPBG5IqpZ+fAF1tdqTuNFri XIWcEFbGo6L6wHva+4twLx+192MX7YUWP1PNDQ5vpPbkYq4eSaa+QMhFxaSXue5fNOkP 54mXxbJV0ELzNAaVwLa2+GSZoGg/7PKBxqs/uX1GtcgEv6xDsWUlvNbZSJc7iAvIjzCR psgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="s/NzA/oa"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si4679784otm.267.2020.03.28.16.43.00; Sat, 28 Mar 2020 16:43:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="s/NzA/oa"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727648AbgC1XlB (ORCPT + 99 others); Sat, 28 Mar 2020 19:41:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:40778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgC1XlB (ORCPT ); Sat, 28 Mar 2020 19:41:01 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 677EA20748; Sat, 28 Mar 2020 23:41:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585438860; bh=079x/adYayaXUe+4YHk2yhLPqwGm/hssdsj88iHVaPs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s/NzA/oaAuwwudo9NSRfHSLGvC8fLeDOxdW5/lREDdTZa1A3l2DE2Qx/E3RSNMQVe o5rm3fxRLtiYxJV0FohHU3WA4NhLUG8Z+wEu2Ob5+nfd6OnSjjhwHvUux5hAebWRs0 LI54CzfOBS+uv/xXMhe3liwOhxis0oQ/SqPTLPnQ= Received: by pali.im (Postfix) id 67DD07B5; Sun, 29 Mar 2020 00:40:57 +0100 (CET) Date: Sun, 29 Mar 2020 00:40:57 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Al Viro Cc: Namjae Jeon , Sungjong Seo , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] exfat: Simplify exfat_utf8_d_hash() for code points above U+FFFF Message-ID: <20200328234057.dh23w255eaag2glg@pali> References: <20200317222555.29974-1-pali@kernel.org> <20200317222555.29974-2-pali@kernel.org> <20200318000925.GB23230@ZenIV.linux.org.uk> <20200318093251.bgxd3l5om4zlm3br@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200318093251.bgxd3l5om4zlm3br@pali> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 18 March 2020 10:32:51 Pali Rohár wrote: > On Wednesday 18 March 2020 00:09:25 Al Viro wrote: > > On Tue, Mar 17, 2020 at 11:25:52PM +0100, Pali Rohár wrote: > > > Function partial_name_hash() takes long type value into which can be stored > > > one Unicode code point. Therefore conversion from UTF-32 to UTF-16 is not > > > needed. > > > > Hmm... You might want to update the comment in stringhash.h... > > Well, initially I have not looked at hashing functions deeply. Used > hashing function in stringhash.h is defined as: > > static inline unsigned long > partial_name_hash(unsigned long c, unsigned long prevhash) > { > return (prevhash + (c << 4) + (c >> 4)) * 11; > } > > I guess it was designed for 8bit types, not for long (64bit types) and > I'm not sure how effective it is even for 16bit types for which it is > already used. > > So question is, what should we do for either 21bit number (one Unicode > code point = equivalent of UTF-32) or for sequence of 16bit numbers > (UTF-16)? > > Any opinion? So what to do with that hashing function? Anyway, "[PATCH 4/4] exfat: Fix discard support" should be reviewed as currently discard support in exfat is broken.