Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp830375ybl; Wed, 21 Aug 2019 06:16:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvedmbOTBu+u0pAZSi0IubG6am8oia2xjExhDI91PWZ0n6jDHLrkYvmRD8uF2dy9ALJAET X-Received: by 2002:aa7:8dcc:: with SMTP id j12mr35835252pfr.137.1566393390995; Wed, 21 Aug 2019 06:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566393390; cv=none; d=google.com; s=arc-20160816; b=RG7sJgkqYF/iInsxzHjqBdQZqU3UOjX6mheWi+541hG1+S2RBGL+ZmuHBRHEl+4MhU ogtK+HFBNloP+0JUHwx17cKv0Rt/In1qAetKVxAGIJLBN0j/DtqBL8AsVZAhKba9Nd1j cv5g7vMLIMW5OAEjrUpCC7NbCU+muzkT5adcHbhSHgM6F6KZU8SM6jDTl+i4ysSLDmCL AmIeVtF383iQNLDRaFj58UmbLfyfWn9Tg7cuPEMVBqCeqTgjaHpfxghxr5umAYDRO6Ek P6dQP+Y/mskPUFOZlL8KN0sU/JVQqQ/CH/OoTvyvku86uWGPGTarHrxqhO2NR8DQard8 GfVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=nKBgpZcmqM2KWTjk4grQiWnYqdvVACHVN2Y2Q+X891A=; b=qbx2xEKm/JVYlge+cIlHr0Q43/y77uR+WSXGF/rykh8PmL6MPGDwyqIzpxdN2gXzTf yPuRfQK4hjQvKmpDx9xY7GXuVPriwi1uc9QwBCafHutRkSBwvbzjbexsYrBXHsIzBzE7 cr3Wn35t380uX7+ADtcNJJO2uT8X2TP2geZs/ngXUwBfl5spE8KuAs0CHUp6c79MJsYX qykWTNj12Rh405uYEUnMdcE8MVjfg4XdePPTPvFpoUW2/SW2lv7nRo5sgFnE2YYW7w4A i6hVI/Khrw0beev8dKrRMlLTe2BSpv8YaRK8hV1cXnmODaPYoMVJ1sa842OYuMxpXftp 1xhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="C3segr/6"; 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 y7si12557066pgp.409.2019.08.21.06.16.14; Wed, 21 Aug 2019 06:16:30 -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="C3segr/6"; 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 S1728755AbfHUNPR (ORCPT + 99 others); Wed, 21 Aug 2019 09:15:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:53342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfHUNPR (ORCPT ); Wed, 21 Aug 2019 09:15:17 -0400 Received: from [192.168.0.101] (unknown [180.111.132.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CC2B214DA; Wed, 21 Aug 2019 13:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566393316; bh=EO9Bip6DSF9x/AWrsU50iQqY5CV6rf7s8XCVw7bhH/k=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=C3segr/6YdtzYrAkfoIuaHjBH3hsXn3HQvP3H7GYJ/LLFZRYBIIIVVUZtmNmVhUes SQL67+adFwRxD/HgPcOsaqyJ0V1E7R04rt0k0RuHtHUbHfGfjeaOLhvl9EEyLTddQa PwteJ65+4VijcgcfVc0cubkDO43wTJ1A/F01XGUU= Subject: Re: [f2fs-dev] [PATCH v4 3/3] f2fs: Support case-insensitive file name lookups To: Daniel Rosenberg , Jaegeuk Kim , Chao Yu , Jonathan Corbet , linux-f2fs-devel@lists.sourceforge.net Cc: linux-doc@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@android.com References: <20190723230529.251659-1-drosen@google.com> <20190723230529.251659-4-drosen@google.com> From: Chao Yu Message-ID: <354102fb-e076-78d4-174d-5a193cae70f0@kernel.org> Date: Wed, 21 Aug 2019 21:15:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190723230529.251659-4-drosen@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-7-24 7:05, Daniel Rosenberg via Linux-f2fs-devel wrote: > +static int f2fs_d_compare(const struct dentry *dentry, unsigned int len, > + const char *str, const struct qstr *name) > +{ > + struct qstr qstr = {.name = str, .len = len }; > + > + if (!IS_CASEFOLDED(dentry->d_parent->d_inode)) { > + if (len != name->len) > + return -1; > + return memcmp(str, name, len); 66883da1eee8 ("ext4: fix dcache lookup of !casefolded directories") memcmp(str, name->name, len);