Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp790956pxb; Fri, 22 Apr 2022 11:12:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOZKjkDAbv386JRrxBhxLF4O5c8/faq7EsbBUHwRy7RcvwaP2u+Gls28iuxclmpt/NTeq8 X-Received: by 2002:aa7:9109:0:b0:50a:78c8:8603 with SMTP id 9-20020aa79109000000b0050a78c88603mr6034400pfh.77.1650651145746; Fri, 22 Apr 2022 11:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650651145; cv=none; d=google.com; s=arc-20160816; b=PuF1O2xfLHH8enMFQ52LBbJnEx8S9KQ1cXnNepPvyYmQfVeEjiL3AmLo3C/95EL3Xo RWMWWBLFdPHtw5dH2QvuWLZWchtAF92tTJ3+hzGBvCzkNo/qZWxEWGexeGNRmWBwip7N Wc4nF+kETUmUAf9IwIzfBT5OocwKb5//XPp5EhgIu7pWp1t5RAxX/mMIrNpJjzfK049q gDA3M/GBK59QJsmJMWJ99oDMtbUHmO1nTiPbcQ3Enftx60A6QMFZYN/BJrkGta7j/pWj u92GNhAWdGjkvYGsr9QtlfuZy9D8oHzMBFadp8ZLsado/YnH5nNwonBA5opEACsD3PEV rVwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=coOw4RfXiLNZzQ3xqdVQ85pRpofvZXMbbKbFNiXv7eM=; b=E6SE5JJ7dJh75idPCuQAyeTYiVLWHAS3hG0RDb+w2IspNOPDJn/5s6Te5j+7dPagXD GmDaEoR80YkOkqGNeQbacl3FRrx2v+sa0tgpaVj2JJo2XS29hm6ZraNvGjf1/7UAhuH3 iWKzafTaGNd901g6unR3ZNp7pz48SY+reK91s8fDqneTx74/+5IeC9xtTdllM+H4cALK OpyPdbZlzgY8EKNPvIpJ0Z5fbil87QeZt1OxS1jdA6WySAcBxblmfpZpBmm86ldg0ndS Q5mRv2xhjZzmgv9WRCCKx5KQc370CcBCQZDTMGHCfa0V46iT48MpOwmgxNTJfmbheVT6 dnXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HyOy5EH4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k4-20020a170902d58400b00153b2d165f5si8109121plh.509.2022.04.22.11.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:12:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HyOy5EH4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4826FF8E50; Fri, 22 Apr 2022 10:48:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231440AbiDUOVX (ORCPT + 99 others); Thu, 21 Apr 2022 10:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386962AbiDUOVS (ORCPT ); Thu, 21 Apr 2022 10:21:18 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0016A3BFAD for ; Thu, 21 Apr 2022 07:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650550708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=coOw4RfXiLNZzQ3xqdVQ85pRpofvZXMbbKbFNiXv7eM=; b=HyOy5EH4jJgnZ1pdEJk5WY38Qdz4IdYstTU6Qd4kVO7DgoR/h9XXiPEix8aKm6aeJbUzbP iDtAXpfBS775+nuir4DcBnUPj+j3fKytJkNy9Nd99ihwvCf6zKd/ajLem9Wf9zSH4RMGo7 WRSksxm9SssEPDmwN/GBrOCGtSGcoFY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-298-gRSGhd4YNJGFrIMlixXwVQ-1; Thu, 21 Apr 2022 10:18:23 -0400 X-MC-Unique: gRSGhd4YNJGFrIMlixXwVQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5BA6B18019EF; Thu, 21 Apr 2022 14:17:42 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEAF240CFD22; Thu, 21 Apr 2022 14:17:39 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20220415123614.54024-7-jefflexu@linux.alibaba.com> References: <20220415123614.54024-7-jefflexu@linux.alibaba.com> <20220415123614.54024-1-jefflexu@linux.alibaba.com> To: Jeffle Xu Cc: dhowells@redhat.com, linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, willy@infradead.org, linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, tao.peng@linux.alibaba.com, gerry@linux.alibaba.com, eguan@linux.alibaba.com, linux-kernel@vger.kernel.org, luodaowen.backend@bytedance.com, tianzichen@kuaishou.com, fannaihao@baidu.com, zhangjiachen.jaycee@bytedance.com Subject: Re: [PATCH v9 06/21] cachefiles: enable on-demand read mode MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1445690.1650550659.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Thu, 21 Apr 2022 15:17:39 +0100 Message-ID: <1445691.1650550659@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Jeffle Xu wrote: > + if (IS_ENABLED(CONFIG_CACHEFILES_ONDEMAND) && > + !strcmp(args, "ondemand")) { > + set_bit(CACHEFILES_ONDEMAND_MODE, &cache->flags); > + } else if (*args) { > + pr_err("'bind' command doesn't take an argument\n"); The error message isn't true if CONFIG_CACHEFILES_ONDEMAND=3Dy. It would = be better to say "Invalid argument to the 'bind' command". > -retry: > /* If the caller asked us to seek for data before doing the read, then > * we should do that now. If we find a gap, we fill it with zeros. > */ > @@ -120,16 +119,6 @@ static int cachefiles_read(struct netfs_cache_resou= rces *cres, > if (read_hole =3D=3D NETFS_READ_HOLE_FAIL) > goto presubmission_error; > = > - if (read_hole =3D=3D NETFS_READ_HOLE_ONDEMAND) { > - ret =3D cachefiles_ondemand_read(object, off, len); > - if (ret) > - goto presubmission_error; > - > - /* fail the read if no progress achieved */ > - read_hole =3D NETFS_READ_HOLE_FAIL; > - goto retry; > - } > - Unexplained deletion of newly added code. David