Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp144505pxf; Wed, 17 Mar 2021 18:06:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBaAt3tmo36RdqGXXvDE3WsfhdRXYFTWWJqD3CEES/WV4yzKxjqP9ld+0idJsXuFK8nvUb X-Received: by 2002:a17:906:558:: with SMTP id k24mr38564256eja.387.1616029562841; Wed, 17 Mar 2021 18:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616029562; cv=none; d=google.com; s=arc-20160816; b=AQkNg0r9wpztt/J5oewcEaVzpvd+Dyvcj53b1CMfrZ7ZNNQ2+La4J606urHiSV5rR9 4XWS+/kET2BnujhAZLWhEoKiGbsp0FgK0Z4lxvzMxS6S0Yia+hIVXQVgrLD4NO1VK6xJ WKkGhzFhIXlLqViH4hSUpYo7HKa0M7zjyKKAH2LsaVo8ndQjyUpRH69aL/tDMahsMlDn 4t7uqHkmnxC1KkpZTCxMhahRLsv2SpQN4d5J+kYW0l2iaLEwNYhsZsEywOE4tEiiGGkt B1ch06F7okg+ksiytwdxQ5K9lan2Rgypz+jiNiWTxR71lGdgy31apTu2Q/iGY/jaFmdm viSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=CL3mpZeU+WmZERc2Fdv9igWqFClRL5x2TM3MaTKj5Js=; b=qY4zquPO4ZFxi0tIaH3sH5p6OHEkVyDEQ+UxmFWVl0qr/B+LtTYwknEVypkc5e64Zn c8u3OuSAi+1HGYLoj0bTnrL5XKlpAm+/xzh+qU1o73fhXRlYbIkF3646uxulyFzjl145 wOSM5X6XvNTGrQ4/5sLO83l2IUpAXIGiAISniOB7cKkrLkbmAh80f5w8DMGgZsEO67X7 KQ7g6mNIfO1jPRPwHnNCD4jqNoxPOv9FMxSphUENEL8qQx0GP1sCqp484M2CUpzIYr32 KbieFnAL4LxRYp6EOVP0F/8zVyzOR6blMbrI2axm2JuTdakwV5JD/78raZ1w/rbh9tBX AkBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NLNfQuqu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt18si369030ejb.443.2021.03.17.18.05.40; Wed, 17 Mar 2021 18:06:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NLNfQuqu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbhCRBCi (ORCPT + 99 others); Wed, 17 Mar 2021 21:02:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbhCRBCb (ORCPT ); Wed, 17 Mar 2021 21:02:31 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51C09C06174A; Wed, 17 Mar 2021 18:02:29 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id ay2so425821plb.3; Wed, 17 Mar 2021 18:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=CL3mpZeU+WmZERc2Fdv9igWqFClRL5x2TM3MaTKj5Js=; b=NLNfQuquyc9Lgwz1xlL6WWBBQAAQdv48QhQyuEorz8yrWhgdjaHcfiwAxYdufXrxIZ 3a61MR0Fhn5EqttfalOWARo2ZYVvuQLyTkxvsXvOd4/bBHtSbfHMdxEV0BLo+Z/kxc42 YY8YJ50TT+uLlYx/VLqzvoNZwNsUN4sLGrxb7BxFgL6rCSh1kn5U297dViOshRQXxsN7 0YOV9kG3SqI2cfnbrtQzGuzI++zHVq7hBW8WtR7zbB8Uqc8Q5loIcLDjW6dQ30OvwSqz pwGuHY25VSOz+6HLbQSTiabudvGaErtuYgloueeNQL+qFWqJQaKbucmRr0voDTTX3wls +7lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=CL3mpZeU+WmZERc2Fdv9igWqFClRL5x2TM3MaTKj5Js=; b=EsForFwT4azkP4YlTD/H9yi6/fBQNF77R3royH6HYS4NY5ky/yfA75dJpOmV07MN8g k8X0tjFBbRmeyc5IN/8+FjvCrLu+q8SlJExmMn3DpUktYAyD5BcwCm9b5f7qlcD2vgdW Di63XuiYeJr3N0vrLj8/efdqdL6Auu//i7CXfuqePlui468IEoAPPskHqYSS5s4rJnAT 4bTch+Pw8SEgnveyn39VyXD544dF51Ripc3NyMqZ6KMQLWBbQHfMV/IFJCBaXV7by1kh 6YR/fKpgyetGA3xZejGUU0hGz2XEC7x+apD4uWnqhAADeIrJSoO61lwm55ZoDWQOyM2l KCmw== X-Gm-Message-State: AOAM533rbAf0byzD7ICY2IpTpnyMsYiSs9qHHFqS6h5HYATZfTBusGOg HjD6Q/Aun+rFnSPE0ofxMU0hP++F9QZUrw== X-Received: by 2002:a17:902:7888:b029:e6:b94d:c72 with SMTP id q8-20020a1709027888b02900e6b94d0c72mr7349180pll.8.1616029348463; Wed, 17 Mar 2021 18:02:28 -0700 (PDT) Received: from [192.168.0.12] ([125.186.151.199]) by smtp.googlemail.com with ESMTPSA id w79sm262216pfc.87.2021.03.17.18.02.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Mar 2021 18:02:28 -0700 (PDT) Subject: Re: [PATCH] exfat: speed up iterate/lookup by fixing start point of traversing fat chain To: Sungjong Seo , namjae.jeon@samsung.com Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20210315043316.54508-1-hyeongseok@gmail.com> From: Hyeongseok Kim Message-ID: <1e43f9f0-5721-177b-8712-fa3018261b1e@gmail.com> Date: Thu, 18 Mar 2021 10:02:24 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: ko-KR Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/18/21 1:07 AM, Sungjong Seo wrote: >> /* >> - * return values: >> - * >= 0 : return dir entiry position with the name in dir >> - * -ENOENT : entry with the name does not exist >> - * -EIO : I/O error >> + * @ei: inode info of directory >> + * @p_dir: input as directory structure in which we search name >> + * if found, output as a cluster dir where the name exists >> + * if not found, not changed from input >> + * @num_entries entry size of p_uniname >> + * @return: >> + * >= 0: dir entry position from output p_dir.dir >> + * -ENOENT: entry with the name does not exist >> + * -EIO: I/O error >> */ >> int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info >> *ei, >> struct exfat_chain *p_dir, struct exfat_uni_name *p_uniname, >> @@ -925,14 +930,16 @@ int exfat_find_dir_entry(struct super_block *sb, >> struct exfat_inode_info *ei, > [snip] > hint_stat->clu = p_dir->dir; >> hint_stat->eidx = 0; >> - return (dentry - num_ext); >> + >> + exfat_chain_dup(p_dir, &tmp_clu); >> + return dentry_in_cluster; >> } >> } >> >> hint_stat->clu = clu.dir; >> hint_stat->eidx = dentry + 1; >> - return dentry - num_ext; >> + >> + exfat_chain_dup(p_dir, &tmp_clu); >> + return dentry_in_cluster; >> } > Changing the functionality of exfat find_dir_entry() will affect > exfat_find() and exfat_lookup(), breaking the concept of ei->dir.dir > which should have the starting cluster of its parent directory. > > Well, is there any missing patch related to exfat_find()? > It would be nice to modify the caller of this function, exfat_find(), > so that this change in functionality doesn't affect other functions. > > Thanks. > Whoops, it's a bug. I didn't catch that, thanks. Maybe it could make exfat inode hash problem. I wanted to reuse current function interface but, it would be better to add an addtional parameter. I'll fix this in v2.