From owner-freebsd-fs@FreeBSD.ORG Tue Mar 18 15:58:17 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 260E5ADB for ; Tue, 18 Mar 2014 15:58:17 +0000 (UTC) Received: from mail-oa0-x22f.google.com (mail-oa0-x22f.google.com [IPv6:2607:f8b0:4003:c02::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8471694 for ; Tue, 18 Mar 2014 15:58:16 +0000 (UTC) Received: by mail-oa0-f47.google.com with SMTP id i11so7204715oag.6 for ; Tue, 18 Mar 2014 08:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=SyfYh3AAoE4LvHuP84imDcgxNUwYiyh+onChjNf1QMs=; b=sym5HSiLnhN0LLaplqx01K5536YS9b2EkctCUUx2+vbfsMsNfDwGdw4BfNA4Gf8Tjo jA5CmNaLuxYK8Bu5wnLKd4i9QKyUfHvf/b+K2gTax9qmlhsI+Hs71Dceftf6g5k9BdG/ Rp3ntymd3tAsBoVaUU8soVsZYiHni2Z0eJB9f54Dw0ECy7Fc4oTfmkSKUSIdqJ6BGJqk 2PYmcZ0WtBa5+MskGUgpbh+AqPvk7Lgpc4NeFWGSlJ6/KEyL63DB6GjogHEVKyitWuZN CNPRMARUSYp4sikImB56uIZB38BXYBZXLc7+JtJXv0PtmjS2Ich57j2I2dT17niX8SEV TYnQ== MIME-Version: 1.0 X-Received: by 10.60.233.138 with SMTP id tw10mr3213910oec.56.1395158296268; Tue, 18 Mar 2014 08:58:16 -0700 (PDT) Received: by 10.76.115.129 with HTTP; Tue, 18 Mar 2014 08:58:16 -0700 (PDT) Date: Tue, 18 Mar 2014 11:58:16 -0400 Message-ID: Subject: Is the NFS Replay Cache needed for correctness with TCP mounts? From: Ryan Stone To: "freebsd-fs@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 15:58:17 -0000 My understanding of the NFS replay cache is that it's used so that the NFS server can avoid trying non-idempotent requests twice if a it handles a retransmitted request (because the response to the first request was lost in transmit, for example). Is this really only needed for UDP mounts? I would expect TCP mounts to not have the problem because the TCP layer should handle the retransmits and the NFS code should never see the same request twice. Is this correct? I ask because I have an NFS server (using the default legacy NFS implementation) running FreeBSD 8.2 that is having problems with entries in the replay cache becoming badly corrupted, leading to mbuf leaks and system crashes. I know that the NFS code has been rewritten as of FreeBSD 9 so hopefully the issue is fixed in future versions, but for the short term I'm not able to upgrade. I control the clients and I know that they all use TCP mounts, so I was wondering if patching the server to disable the replay cache would be a plausible short-term workaround for the issue until I can upgrade, or if I'm courting disaster. Thanks, Ryan