Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2452060iob; Fri, 6 May 2022 03:17:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWOr/ksHGEq/gtj38iAxZq2jVVfGpFSF/eqtGj8GorH2HbNPC+SQVskdePk+iOMTDMRwhc X-Received: by 2002:a17:906:f88f:b0:6f3:eaed:c143 with SMTP id lg15-20020a170906f88f00b006f3eaedc143mr2188720ejb.311.1651832226268; Fri, 06 May 2022 03:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651832226; cv=none; d=google.com; s=arc-20160816; b=U+m5JGys1r5oulCSTaGIETqD6Uhyg6OVCirV72scRnKVdfUK8K+dw4Ajp8tWdQKkZx aZBzdTssbCAov3v8VOXQx6bN/Sx0jAgz0trBUKXdnL/hYUpznA4bnKqlrlKkdrUMu5ly qfi3F7ijc/pp3iENhrSsrkYc2ShchJi3DIw5E9yTbC0euTff17460GqtEtWY1pOZX01r qQ4VoHKU4ILnDevH2EBLv/Io8wSJkmDfmNUu4CnVgsZCgaN/+IOu0ewoK6BBjp2NOjcn 4wDpfmEUotW+3BHzlxV5XGfFiIdWYZnZL0ywlbaiGn4bD2EIaJ6qXlbuIK/Ud75L5a6D 2b5A== 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=EBkH1YgBBg5lHtmXPTC9d6coG0adV0HCM1ShUIWoEoc=; b=pdXUUV2ulTmCLLL7vD/41EECWQhkxkSJm4fB1TSGJ7BwO7wUALyhY3uEX+Fkve3MaK Fnhhx6OIrnVu8xeI6rw3CVbIvOIoUMeM2mlMSJHiTIHHN3LH2+7dEoGSNQzRl3ay5THw aO35mJ/mP9WFJl9CwW2OoV/J115mc81Lu9HGpJ4t6mY/bbkCfTR6etHdWcqfDh7PJrTg E2Xjtmttlgy7tI+VYllu/QXXYoPQg13QiaadHIh/ILEHGEqYfCG0KGKk6IDydBQQP89X 9tj50pK3vaR4k8rdUPcGenRiJ0ZR3ytKZrZxrPSjP/MRxuZYupDsTo3nwzKPFA6fDenS 3mQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dneg.com header.s=google header.b=gFdBpA1I; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dneg.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a50e696000000b00418e57d9986si5231239edm.42.2022.05.06.03.16.29; Fri, 06 May 2022 03:17:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@dneg.com header.s=google header.b=gFdBpA1I; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dneg.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390187AbiEFImN (ORCPT + 99 others); Fri, 6 May 2022 04:42:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235357AbiEFImL (ORCPT ); Fri, 6 May 2022 04:42:11 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC8C3B7 for ; Fri, 6 May 2022 01:38:29 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id l18so13097032ejc.7 for ; Fri, 06 May 2022 01:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dneg.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EBkH1YgBBg5lHtmXPTC9d6coG0adV0HCM1ShUIWoEoc=; b=gFdBpA1ILmq2CQJufz20dOXpO9QPPBOGNDEN9iwP9yYgp8oBrRHcC2FpnXWqkQFP2u HbkZe6muAUQK/3mebQuSNrUP3Z0d+jKagUdzdfTl/Yg44DMBvZpRVHJVXbN+iwaEEmdQ qQ3F8CBFcyQObxRS1e9UCzfC8uf4uIIBuUgtencWVOB9v1ZGiuCGkBhSLFSkA5vZ+bf1 FaSmX+5WZan+yPWgUNWy7bpj6YlZ+HSbMsjmplPcsDkn16KpnyxjiwMjrGI8mTZ3DPxT ye+OKNYpooGHg5TJvfGsOjBV/68xhos/y0mkE1YVvXi0aufiG5Zn9oCN6wOkZ2qpjXzt 86Zg== 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=EBkH1YgBBg5lHtmXPTC9d6coG0adV0HCM1ShUIWoEoc=; b=p2R7s5KWR1KF3K2d0zB3AL35kfPchRxL1wg7wGEzTm/ZBSEghGESINuhsrzlYVJU7P z1SsRdH1Bcb4gMvPfokoLi1+YhVEdReYxNljqFH18DLK9ayVQV9kt8Qij+u0cLCsi3CG zXX14a6qnfdzVbjIA+ioVUbbm8F+OSIjmCEAIwCLWB/FZhoaDhJKH24ruV4Omo3DQ+37 s5QGTjckaEz+z5Futq9n3zd0C5Hv4Yc03+55dWFuyezDnpUPgf5KPQKELrC1Ef/cQ8xQ ee4kR+i5JwCW/3mXTE8xuXBhcjPQYmDeyBe0zrpJIKqA+TD21J6S6xuhUMFYQCeTGBHL HHQw== X-Gm-Message-State: AOAM530WRmurbbf89MAjJWMrkzIDieg0uTrQIlFh1tU8gh5nJeSjj5gg h1qXQ4QpcyzWiI+g0sYaFEcIipt1EWAMnZcbnTe0Vg== X-Received: by 2002:a17:907:1693:b0:6f4:ee60:16e8 with SMTP id hc19-20020a170907169300b006f4ee6016e8mr1858054ejc.312.1651826307950; Fri, 06 May 2022 01:38:27 -0700 (PDT) MIME-Version: 1.0 References: <20220504132106.28812-1-dwysocha@redhat.com> In-Reply-To: <20220504132106.28812-1-dwysocha@redhat.com> From: Daire Byrne Date: Fri, 6 May 2022 09:37:52 +0100 Message-ID: Subject: Re: [PATCH] NFS: Pass i_size to fscache_unuse_cookie() when a file is released To: Dave Wysochanski Cc: Anna Schumaker , Trond Myklebust , linux-nfs@vger.kernel.org, linux-cachefs@redhat.com, David Howells , Daire Byrne Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org On Wed, 4 May 2022 at 14:22, Dave Wysochanski wrote: > > Pass updated i_size in fscache_unuse_cookie() when called > from nfs_fscache_release_file(), which ensures the size of > an fscache object gets written to the cache storage. Failing > to do so results in unnessary reads from the NFS server, even > when the data is cached, due to a cachefiles object coherency > check failing with a trace similar to the following: > cachefiles_coherency: o=0000000e BAD osiz B=afbb3 c=0 I can confirm that this fixes an oddity I had noticed with the "new" fscache. When running an fio read benchmark, if you remounted or dropped caches between reads, it seemed like it required two initial reads of the data (and writes to cache) before all subsequent reads would come from the fscache disk. Tested-by: Daire Byrne Cheers, Daire