Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp470725pxb; Mon, 25 Apr 2022 14:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3qS2P2kzYxmucn5FcSn5wvx8ZmI2nkAbm66nNclQtlZIfVAO5bZV3j0KWoAfNFGNu6eps X-Received: by 2002:a17:90a:b307:b0:1bd:37f3:f0fc with SMTP id d7-20020a17090ab30700b001bd37f3f0fcmr34018271pjr.132.1650920888131; Mon, 25 Apr 2022 14:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650920888; cv=none; d=google.com; s=arc-20160816; b=scb7a6hwRrzvDCcDcBSd9lldWOu2r01JoFJkodFGVISpUf1HM4j8buEYMqu9SvyROn LBKMfpQYWIx0e6bNUOVnse1ylc4pKGPnm+FhwbLv3xLvfgE7TlDenHEj3cyTqtwRwQWt GOXd7DrrqEVccRsY1VcfOsqZJWXR8ctUuFO2//Mc8dNxQFsCI/P4jjjqr4+olMHi52lc bPNWLkYw+X+LprYiKmQAPl2Dg7pyDYOICifiJHFSycx+D+R009igZTNQyFTfNBhk2d05 s4lRLqI8yFnOCs0SYrEmHTNdPQJZ8DLSAL80h4Aepw4IzyGxL0misqTZWP33CQZzW3Db qTnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qelDa8vHGzUXR/z/LXOyg/fUpae4yTXkY4tJDrA/hXE=; b=HM8gUQ8/5UJDDNn4lZk5gyVbmFNHo6Ex6R18WMtgfi3yU4R6lDyfstSDmKZOAkfghK UX+H/BmeWQb1Nq4YhNlOR+39Qd8sXUxTvEHo8x8ZWrwDO0GevRVn7zbd26oVnisWb9Ql pxqhSJAOLbSWhOXI1q/U1CyBUsX+rf7F/+fUi/mHytna2b8sOHOhdEeQMLVhc2HIHRPz UymnTQesiC1OT+/JOCR5jUL8JuJsTyTEdF6Alw5zFJHE7hDjnHgNM40ZvuPKV4lAtvBn QevyyDMhcwIsIBez1A5CLMXZcPYsX8Zp+Jzm7kXpAgxwLPXRABvrFYsNvRAFDPwlRNX5 9Frw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="76/Cqj2b"; 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=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l193-20020a6391ca000000b003ab5d468636si2500829pge.548.2022.04.25.14.07.37; Mon, 25 Apr 2022 14:08:08 -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; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="76/Cqj2b"; 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=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235329AbiDYN4D (ORCPT + 99 others); Mon, 25 Apr 2022 09:56:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237131AbiDYN4A (ORCPT ); Mon, 25 Apr 2022 09:56:00 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BAD163BDF for ; Mon, 25 Apr 2022 06:52:55 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id g21so15856408iom.13 for ; Mon, 25 Apr 2022 06:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qelDa8vHGzUXR/z/LXOyg/fUpae4yTXkY4tJDrA/hXE=; b=76/Cqj2bL97JJrVz/LFe2xu4mIreDAgh+6lrOtd0LvmA+X0Tpul7jQ1Vh/EBPcEYkw QV5i60hujKAaXiSsT+crrIy0VmTEp/Efp9ifFj0OJndkRXgZW8n6+mtMu3JRet0yGiln QKNVQxFDDpJGY3FHwZJWOwTjUck6bMjOSh0T0rJ1mrALx8x7wObgm3g5f9v7ShEgmrhO c++pjOzjbdggHSwqPnFc2oCWptWcLuhukGAWV8Eb+/NiZx4Cvji0NLvSpkvUwdPuDhyR GgszofIP7lO/YygwmNS7nXvN9jMe1HoH1gslhGdOBjfQVvpUIBglpU7SpJiKWACfZPYQ /QEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qelDa8vHGzUXR/z/LXOyg/fUpae4yTXkY4tJDrA/hXE=; b=vOnAeUaN5KW7vZAPRUSQKLaU5jiL2H2lYbYwQgFWIhMzNx5tqfSGjM9dfFjTSPTAEO VB/IXmrpI2nUMP7Av5IM+f9fA0yIGIBAhpOnDQw/hB0g+Yr9OJA8dpXcX/VzVTStB8eW iFS3py87J/5Z7aaGhKGb4wdRwyPohYBgeuhiKi7H3b0tddXUNTfRyzLnTzfGF13b5f5w qDUUa8x0hQZskdMtiCUoHerqIvKzJU8fIFvrklB5t6aZrmmGcN1myTbrAE0DjiLY7RRE hkItCobaf3rWLGTCxIYx9YYM5b8l0Wgq2Gn5vRW4/s693wig/MggjrJeijJ/9Wl2VxS4 390Q== X-Gm-Message-State: AOAM532CBPpp0DvWaqIvZwjQyCdaBqve4r0D3ClwHsLcl9YpcIEn3OvL /OfmE8k72Wur3ikk92usrxQh5OgYXWZOrfdyff7RmchIs0U= X-Received: by 2002:a05:6638:a48:b0:32a:d97f:659b with SMTP id 8-20020a0566380a4800b0032ad97f659bmr3943645jap.320.1650894774977; Mon, 25 Apr 2022 06:52:54 -0700 (PDT) MIME-Version: 1.0 References: <20220325132126.61949-1-zhangjiachen.jaycee@bytedance.com> In-Reply-To: From: Jiachen Zhang Date: Mon, 25 Apr 2022 21:52:44 +0800 Message-ID: Subject: Re: Re: Re: [RFC PATCH] fuse: support cache revalidation in writeback_cache mode To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Xie Yongji Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 Mon, Apr 25, 2022 at 9:42 PM Miklos Szeredi wrote: > > On Mon, 25 Apr 2022 at 15:33, Jiachen Zhang > wrote: > > > > On Mon, Apr 25, 2022 at 8:41 PM Miklos Szeredi wrote: > > > > > > On Fri, 25 Mar 2022 at 14:23, Jiachen Zhang > > > wrote: > > > > > > > > Hi all, > > > > > > > > This RFC patch implements attr cache and data cache revalidation for > > > > fuse writeback_cache mode in kernel. Looking forward to any suggestions > > > > or comments on this feature. > > > > > > Quick question before going into the details: could the cache > > > revalidation be done in the userspace filesystem instead, which would > > > set/clear FOPEN_KEEP_CACHE based on the result of the revalidation? > > > > > > Thanks, > > > Miklos > > > > Hi, Miklos, > > > > Thanks for replying. Yes, I believe we can also perform the > > revalidation in userspace, and we can invalidate the data cache with > > FOPEN_KEEP_CACHE cleared. But for now, there is no way we can > > invalidate attr cache (c/mtime and size) in writeback mode. > > Can you please describe the use case for invalidating the attr cache? > Some users may want both the high performance of writeback mode and a little bit more consistency among FUSE mounts. In the current writeback mode implementation, users of one FUSE mount can never see the file expansion done by other FUSE mounts. Thanks, Jiachen