Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp751799rwl; Fri, 4 Nov 2022 06:05:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EzuCtcT7IjSTyKWXREYERG7qF34UhpjcC6crm7sAXTwZU0SQ9yN8ciZ1rEiaKuSC/hHyu X-Received: by 2002:a63:1f53:0:b0:46f:ea8b:d746 with SMTP id q19-20020a631f53000000b0046fea8bd746mr16997472pgm.144.1667567152381; Fri, 04 Nov 2022 06:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667567152; cv=none; d=google.com; s=arc-20160816; b=zXlKgrGJ+be5244YOdeS3URHVYBs2cRWOEuImTkDfTxIFEAXYXpe2281B3UV+N+rHq kyM57OpaL3pVo6KhNJr9VKOb4GDNomcuEWTUCZhZTDErEd6AIScWGjK0gU0pir53v2Z/ yDJua9bJb+A9aFbtQoc/rWxLVUzgWLgcDmsGY+goI8zkC3QI4McO/5O1ZD37jHi+H1Ti UaVZ7qZPDxz3N9N7CWdr3xFIMMPBoDYS9SyUbNv1jI3KrtqxgdpEot5X+ucA1uSci7jl XCNwypCNuTD5UD6GGWGYw4k0kL+pQ5vUhiRPZqmCwDOEiWkMuh7psGcdZIxohwGa1CZ5 vbwQ== 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=M3piBxxnZ+A85QR9CN7jt6AkpuHV+QMCk1RUSpUtpnE=; b=fkc2HzgVryarLrtlsrBLvN3AyaHLxzEir3Re87q20Ttaphv6pSMmM4Qwg/76vcVCt7 Xe6HvelM5QtVxk+iTmczxG8SjOAlrqfbAmX41jtSvSrM1hyVmBEvx/MNwosEcmpB/Mn1 Dg8jGWTZ9FXREtEBFPv6fHgTtUQEP7EOnIbLk3GTHBD2wNFAuZfaIuPJZgwhXTg0/6RP 4DgRDoTyTUHaqEMx40ifYt3Lkp72X89JybGSxsPEhrMeJ8VwsW2483Nb1HGBZhPNd7Uv ijKYfvkcihGl0oMDMjI8/JSBEboClM8rNyEGjG/KtZmPMWsoVwMxqV+aHG0TkU/MpEyS Mo+Q== 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 o2-20020a625a02000000b0056c882d3d06si4295623pfb.199.2022.11.04.06.05.38; Fri, 04 Nov 2022 06:05:52 -0700 (PDT) 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 S231824AbiKDMUT (ORCPT + 96 others); Fri, 4 Nov 2022 08:20:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231820AbiKDMUQ (ORCPT ); Fri, 4 Nov 2022 08:20:16 -0400 Received: from out199-10.us.a.mail.aliyun.com (out199-10.us.a.mail.aliyun.com [47.90.199.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 168112CDCE; Fri, 4 Nov 2022 05:20:14 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R671e4;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=8;SR=0;TI=SMTPD_---0VTxExbC_1667564409; Received: from 30.221.128.121(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VTxExbC_1667564409) by smtp.aliyun-inc.com; Fri, 04 Nov 2022 20:20:11 +0800 Message-ID: <6064150a-7517-c0e1-72bb-e1a8adcfae74@linux.alibaba.com> Date: Fri, 4 Nov 2022 20:20:09 +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 2/2] erofs: switch to prepare_ondemand_read() in fscache mode Content-Language: en-US To: Jeff Layton , dhowells@redhat.com, xiang@kernel.org, chao@kernel.org, linux-cachefs@redhat.com, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20221104072637.72375-1-jefflexu@linux.alibaba.com> <20221104072637.72375-3-jefflexu@linux.alibaba.com> <2e2eceeb11972462bb9161a73c00a9c77f8af8d2.camel@kernel.org> From: JeffleXu In-Reply-To: <2e2eceeb11972462bb9161a73c00a9c77f8af8d2.camel@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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,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 On 11/4/22 7:46 PM, Jeff Layton wrote: > On Fri, 2022-11-04 at 15:26 +0800, Jingbo Xu wrote: >> Switch to prepare_ondemand_read() interface and a self-contained request >> completion to get rid of netfs_io_[request|subrequest]. >> >> The whole request will still be split into slices (subrequest) according >> to the cache state of the backing file. As long as one of the >> subrequests fails, the whole request will be marked as failed. Besides >> it will not retry for short read. Similarly the whole request will fail >> if that really happens.  >> > > That's sort of nasty. The kernel can generally give you a short read for > all sorts of reasons, some of which may have nothing to do with the > underlying file or filesystem. > > Passing an error back to an application on a short read is probably not > what you want to do here. The usual thing to do is just to return what > you can, and let the application redrive the request if it wants. > Yeah, thanks for your comment. We can fix this either in current patchset or a separate series. As we just discussed on IRC, we will fix in the following series. -- Thanks, Jingbo