Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp1147984pxr; Mon, 11 Apr 2022 16:42:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziCOAaFT7iv9rqvMeY31W0o3t+U9QJCkxInNMpaoC3oFVoCyDXmhMCtN6IiS7cDj1DvgDg X-Received: by 2002:a17:902:ec83:b0:154:7cee:7722 with SMTP id x3-20020a170902ec8300b001547cee7722mr34918330plg.96.1649720519929; Mon, 11 Apr 2022 16:41:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649720519; cv=none; d=google.com; s=arc-20160816; b=h9l1Kr2kL22+39U0Yary2g1OKOBYvaHyD3ZbfzCEmfxfT28pqDtgIbD1/gHMKJYY/n uRr7hYkOK28txLGmgdido+sU5chVxXQEmPuoakacc0UdIk+Ly3Vb70NJ4nP/CZiDN80D M1dPlHHzsFpbQ2/AV6Q/P0RlCC35aom8ljdTwGSPWZU+9ozSjSMHyv50OoGloNJCFopR dpsxGBAGiDVex4wGH4611Z9DAaq06maf6mjThg0BpLTnE2olAV2ccmIV83CAWHW4uZTo oJ7bo66duBuqPnf8eWzy/QsAynAT1ScpvCa7+B5EnsowDjw2ePGyG9KLwfq0tl8CwceC 926Q== 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=V0hg9i5e9xbRWqhc+8yt7fHPM5Er16hr/eYvlCmZWBc=; b=TMoOcAj2KuBKV1CW8RiszFpyMEmc8yfy8WlQgPnJ9wTH1svrJYCScBoH1IezPkD1KU IUzwVlskRJ/nLHtOvsM9URjCoxKERcC0aW7ffUqQncem+O019Q7KYlzWObt/jZyIcJ6Y 32hz7szY61oc+adf9/NR/unKn7NFTCQi9exGfmNPFKaWWpEUIlMhzecjbCxjDbcyUJnC jeSD8gKuBTXw1KYhl3/NzCKVtj5lgNQbfMK9b6rFvvFw84p7HcTG2zonu39cd1TlLmqf Ddp93fmeIj3Fst4H8F0jEoPtEgYsfPvNLI1IQRT7xDikWOdG62QZhGoMpX2UetPfsk4b utYQ== 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 r12-20020a17090a940c00b001cac1e802d5si9730245pjo.82.2022.04.11.16.41.45; Mon, 11 Apr 2022 16:41:59 -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 S1346149AbiDKMib (ORCPT + 99 others); Mon, 11 Apr 2022 08:38:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346138AbiDKMia (ORCPT ); Mon, 11 Apr 2022 08:38:30 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38511ADBD; Mon, 11 Apr 2022 05:36:11 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0V9pPvL2_1649680565; Received: from 30.225.24.83(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V9pPvL2_1649680565) by smtp.aliyun-inc.com(127.0.0.1); Mon, 11 Apr 2022 20:36:07 +0800 Message-ID: <46dc4929-b52b-474c-1bdb-b3e439f09585@linux.alibaba.com> Date: Mon, 11 Apr 2022 20:36:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v8 03/20] cachefiles: notify user daemon with anon_fd when looking up cookie Content-Language: en-US To: David Howells Cc: 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 References: <20220406075612.60298-4-jefflexu@linux.alibaba.com> <20220406075612.60298-1-jefflexu@linux.alibaba.com> <1091118.1649680137@warthog.procyon.org.uk> From: JeffleXu In-Reply-To: <1091118.1649680137@warthog.procyon.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 4/11/22 8:28 PM, David Howells wrote: > Jeffle Xu wrote: > >> + This permits on-demand read mode of cachefiles. In this mode, when >> + cache miss, the cachefiles backend instead of netfs, is responsible >> + for fetching data, e.g. through user daemon. > > That third line should probably begin with a tab as the other two line do. Oh yeah... > >> +static inline void cachefiles_flush_reqs(struct cachefiles_cache *cache) > > If it's in a .c file, there's no need to mark it "inline". The compiler will > inline it anyway if it decides it should. Okay. > >> +#ifdef CONFIG_CACHEFILES_ONDEMAND >> + cachefiles_flush_reqs(cache); >> + xa_destroy(&cache->reqs); >> +#endif > > If cachefiles_flush_reqs() is only used in this one place, the xa_destroy() > should possibly be moved into it. > Alright. -- Thanks, Jeffle