Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp848147rwe; Thu, 1 Sep 2022 08:29:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR4EhFyqSl3LMW0+z0H5UZC1VFhcMnaLzMITHhmy6IOzmevoEPRthZAUTCbKITML9t+t9+Ts X-Received: by 2002:a05:6a00:4146:b0:537:df7d:d5d2 with SMTP id bv6-20020a056a00414600b00537df7dd5d2mr27887183pfb.31.1662046161671; Thu, 01 Sep 2022 08:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662046161; cv=none; d=google.com; s=arc-20160816; b=xmk3t1ABYkJs30t9Xvnvu/ltTEY4OsKp0kd+gxi/Uz+9zCJ7RrQniydjQPHQYkPmeO j1EYWjF7c7NFh3xtAUjo3fozBIuBvjB1SRnOa0mjW1b8uHg5L6W3ipbdgbNjHwAybVT1 +11Hu7vE60qrk4bodrMZLZvX5sSzGFf4q0XFZsuYzKvwSOKJa5fD3EBCwKmoxhpl7aQc HVOPoK9L7Y23UOdflCNHmaZB2sTeV401JtezH08yy4tRPgK3mlTH7yT5NC2j2eV3/83H H1ZScdDzvCtXvndcvZmzIekKAL7SIfsdbUxnGQ0gL10siFRqPR1V4FTY3HcSIH8lgA7j LGUw== 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=1v+3LBO5AhHRo4xtG+whSkY9YznOzHTVjtv5f7rHeWY=; b=JU3EonbqTh+wqxG6M5OC1JqiKF0jHSg9zvsTW7YLbTZs0DF8i3JYsO+76MUPomFLqn 2bTjXTdif+6N5dnoqgbFUUlwWBzD9wr78T18vzLnexcRchv7vmkwgT/syG+J8rhV33Rq NrfQVo6PSRRplFmTOTAE03J4vSuHpUqcAi3LiD48krM7NYT4fjImk6FXnzpalHdA4t46 Q6OFH/L1kdyki+rRtHtIiddUssPMIwnHxODFG7bDrk8JNHokNSIjJSNDKvxKm1nvbQg5 2f7KIcEsoJyIwXT84zQcHCCbPdiMUB9EmZ/RL52UkvkGgGxKEK5xQaUz+7xJ4YIBYlIL 1CKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dneg.com header.s=google header.b=dUgDr8aS; 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 cm18-20020a056a00339200b00537c6b40266si17765067pfb.87.2022.09.01.08.28.59; Thu, 01 Sep 2022 08:29:21 -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=dUgDr8aS; 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 S233671AbiIAP23 (ORCPT + 99 others); Thu, 1 Sep 2022 11:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234473AbiIAP2X (ORCPT ); Thu, 1 Sep 2022 11:28:23 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28B0E74BAE for ; Thu, 1 Sep 2022 08:28:21 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id h5so23908480ejb.3 for ; Thu, 01 Sep 2022 08:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dneg.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=1v+3LBO5AhHRo4xtG+whSkY9YznOzHTVjtv5f7rHeWY=; b=dUgDr8aS5zKjdgYMpYyr/LhyWOlkkDM81KYMFxDww+khsB92YmgOL6rp2zqGMQckFk 92/X2+WTOW5GPQcdccekymFDeUI6s7CPYpSl6TjOKKAgMZ1NI5s+VcS04Csehy8dWRmd vJPGzo6DocgzfDJr0yuU8Dji7JRrYOzY7iwO6OaMflF+aHRVvZsNtXJ9aFOWg9Z5l8BN FPDgeGhEuxSg/AiC5SA8ojCWjlgws3h6ImtrxCwrjmuI85Vnbaal8Xd3UgbnBzDlQE+u naWWWrWoApZdxypbcFgQMAJNCrmkbEfwXHrdght2PcEjsnk75v5e57NBv/dFGtvlMNkN t4sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=1v+3LBO5AhHRo4xtG+whSkY9YznOzHTVjtv5f7rHeWY=; b=Cgkya4r58op8t5l10mAIkmJ9IjqO3HAFhak+MZkrG2gLqez5Id0SM9sCGGw30ZgmAu UBuz58e4+unZatEuLMkmgymiq7VoKeeKVULlHFR2EmVWS4qjCqrALuuY1GDeDDrd/3mI HD+myMu5ezRgllJtNJkC9j8l/Js4HKU8DjQVpv695gRO04i1vQ26295TxK2HjYAXP6BO rQmSQ/GOEGVTgRwlwZ3m+yjeNmq7dO6fCwTon0XkVMeD6RnAAuefRMni+CDymAn13ZNQ zYh4O5liWDL51sDYkYDzWRR+cncTsXnDky2p4rdfE9aUtEoTSWivf8chLAPsixzvM3+y 90gg== X-Gm-Message-State: ACgBeo1xyIi2qGDJ1B2f9RioCn5XbEckvPBAhT4YyLaaLDVBBapjOdY7 J112WvUu0304tidKwuCTSdb+J0dsSBL/qao56bwUu6TPUzEWBA== X-Received: by 2002:a17:906:6a03:b0:730:a20e:cf33 with SMTP id qw3-20020a1709066a0300b00730a20ecf33mr24981677ejc.620.1662046099713; Thu, 01 Sep 2022 08:28:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Daire Byrne Date: Thu, 1 Sep 2022 16:27:43 +0100 Message-ID: Subject: Re: directory caching & negative file lookups? To: Trond Myklebust Cc: "linux-nfs@vger.kernel.org" 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 Thu, 1 Sept 2022 at 14:55, Trond Myklebust wrote: > man 5 nfs > > Look for the section on the 'lookupcache=mode' mount option. So I get that the client caches negative lookups once we've made them (the default lookupcache=all), but what I'm wondering is if we have already cached the entire directory contents before the (negative) lookup, can we not reply that it doesn't exist using that information without having to go across the wire the at all (even the first time)? Or is there no concept of "cached directory contents"? I thought that maybe readdir/readdirplus knew about the "full contents" of a directory? My thinking was that if we did a readdir/readirplus first, we could then do lookups for any random non-existent filename without having to send anything across the wire. Like I said, a newbie question with limited understanding of the actual internals :) Daire