Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5412473rwb; Mon, 14 Nov 2022 04:26:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf6odSDQnhx23dyXTGAvwsbYwQmqSnu9Nn4Y7zZNjngE/SO/72cwQsIDAiqJilXylYgaESeU X-Received: by 2002:a17:906:1613:b0:7a2:fa90:924 with SMTP id m19-20020a170906161300b007a2fa900924mr10053382ejd.674.1668428809247; Mon, 14 Nov 2022 04:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668428809; cv=none; d=google.com; s=arc-20160816; b=KnjKaqrDfLtNyZjDP2qeA4cAT9EGmod4oHoGeBzkiIC00ZjASx6LYCt/0WiDVqBbC9 cTfMWmFWH8DnjF4UDUdEfxSNOmXH4WfPwn9LFgHLXUS+/ZVO/pWr91OJQ6hcvIyMevPN Tb6tknk0m/RNglFtNM6St46hwZA+E9fP0AHPup/5HCif3Xw8/I11aDpywVaaw8HLj66k 7KIgiKjLxe1HIjWJSY8x2PtqadILE8xHsOG3xPPEdh69JN35ai5wiwMTm8vii4/P9lTR tYdb6TNkwV4vzUqB3XreYyIxqLgD1Ob7iorVRTJ/TKt6VmGP9E0O0ZOs1bL0FB/FyqmH Vo2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=TtOWXkK+WcOFp+ixcbb6t00iPQU7r6HLBKYrF1Xtl88=; b=mZERLyrgX3ks4V8Vlz07gPYCrnnyfTeXTZbYp05y7qD2c8EyrksAAdoDLV+VZXc03b zXc7o7VluIqKQ51b88SZylBmywKjgusPb0pmW2eFXmQIF9N0hP4UQ318Onh95FriLagq Zku7AloBBj8wKtY1LCz9iLPStWluqfIoMHc6Z1tKv0TWBrF/NuUWX996b+nDp9WFXhw4 MicGpBCmotYQjEGPfqMDAP5pH1+TpvheYt0gaZxVXC8vTSCEmTSKHEB6xN2bg/qM5jKM oiAjnqwRK6igM1pEhJCrrZT0FY5BiEwfRK++K6j1xdYZ9YudG2U9yutP9wRsVweUUHA9 bORw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a056402524c00b004542e6bd242si9681713edd.621.2022.11.14.04.26.28; Mon, 14 Nov 2022 04:26:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236806AbiKNMLq (ORCPT + 88 others); Mon, 14 Nov 2022 07:11:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236484AbiKNMLp (ORCPT ); Mon, 14 Nov 2022 07:11:45 -0500 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0BFB1007 for ; Mon, 14 Nov 2022 04:11:43 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VUmziyc_1668427899; Received: from 30.221.128.223(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VUmziyc_1668427899) by smtp.aliyun-inc.com; Mon, 14 Nov 2022 20:11:40 +0800 Message-ID: <55b07140-f7b9-6c25-acf0-93e9fbce0828@linux.alibaba.com> Date: Mon, 14 Nov 2022 20:11:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH] erofs: fix missing xas_retry() in fscache mode Content-Language: en-US To: David Howells Cc: xiang@kernel.org, chao@kernel.org, yinxin.x@bytedance.com, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20221111090813.72068-1-jefflexu@linux.alibaba.com> <575542.1668426273@warthog.procyon.org.uk> From: Jingbo Xu In-Reply-To: <575542.1668426273@warthog.procyon.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, Thanks for the comment. On 11/14/22 7:44 PM, David Howells wrote: > Jingbo Xu wrote: > >> The xarray iteration only holds RCU > > I would say "the RCU read lock". Yeah, this looks clearer. I will update the commit message in v2 later. > > Also, I think you've copied the code to which my dodgy-maths fix applies: > > https://lore.kernel.org/linux-fsdevel/166757988611.950645.7626959069846893164.stgit@warthog.procyon.org.uk/ > Thanks for the kindly reminder. Yeah this code was ever copied from libnetfs. In the scenario of erofs, currently req->start is always aligned with folio size and erofs doesn't support large folio yet. Thus req->start won't be inside the folio so far, and I think the current code works well in the scenario of erofs, though the issue indeed exist mathematically. Actually I'm working on the support for large folio now, and the completion routine of erofs in fscache mode will be refactored quite a lot. I think this issue will be fixed along with the refactoring. Thanks again for the suggestion :) -- Thanks, Jingbo