Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3996722pxu; Mon, 30 Nov 2020 15:14:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcTBvnjibDPFCHqhkTGiUWI+GFqdxM9pyNCnc57EAnXhTGoRUEwHuzNRpPwIHvgzlctOqd X-Received: by 2002:a17:907:216b:: with SMTP id rl11mr137097ejb.61.1606778054034; Mon, 30 Nov 2020 15:14:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606778054; cv=none; d=google.com; s=arc-20160816; b=MxBNfIvRxmIuW3g3lyCbjGIoqDDtqOPbplT8Mz1cimvGwLAa8WpXee5e0ete4EnIHB GyU/5qe6MT5J4xcojasNyxLpp/z1ENbGjW+0m9yFtN4e+EmDclTLCcjTOD8H0TCwyLtn txcob8ciVE3ro+k9xxs+L3AFC+umw9LY64hb0/5/NXQ9BjwnTOpvogw5LK9VzrwK64e3 5uZaJwAtGDQa1XmB4DmPbYt9L0U5+SkAGaZio+wfYUVyagp6v7LiFc5w/KYmqCkuk4Wu 1GRO31NfUuDsoN7wkJX4KjKfaho5N9bI3gLXahqYw7JQP6mqMivWwV8Tm9pE3S8cSApA s00g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:from:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date :dkim-signature:dkim-filter; bh=ftd/P3nH/Jp0D6zznyjgpSWbkf1PQFvp6hx/0FQY38s=; b=xoR9hWgQHjT3+Wau6FytvnTSgN2FMraawy9NptQpAS7WEQRhU9M1rhniEclZuAmSTm VXUrO9u13HTr2DbxgB0rmynyzu1CVac01Lsjjd9PDGYUq96b6UwSgjkXes24hwNIUi6D hsq3q4oONnTp+ybVqX/nauZj8z2gKA1bUPzjBsdBnIwBtEPmv93xdDUhX4myN2oQ+5pg Y/SpEp7CJzM3vt9PXTjpQtPELh+BAx9HSxGI74DMqYJTsHr+0tIv2rN3eqh6CC4Rcclc 6rD9eX11x9juZ2PCKTBuEYGuPUAcjLlHo2GyqM2gyz9jTgf3cgg9pbJ3JpgMeLFl4a+d cvCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=lSefEbgj; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w6si11954383ejc.271.2020.11.30.15.13.50; Mon, 30 Nov 2020 15:14:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=lSefEbgj; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727016AbgK3XFm (ORCPT + 99 others); Mon, 30 Nov 2020 18:05:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbgK3XFm (ORCPT ); Mon, 30 Nov 2020 18:05:42 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DB61C0613CF for ; Mon, 30 Nov 2020 15:05:02 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id CD99667C6; Mon, 30 Nov 2020 18:05:01 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org CD99667C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1606777501; bh=ftd/P3nH/Jp0D6zznyjgpSWbkf1PQFvp6hx/0FQY38s=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=lSefEbgjtrewxwqBTqAbI+AARl2y37VSK9G9m1sqUnU1oUuXmU4WU/S0qSeS50fyM SpZSxJSIdIje0IPpWhET0rPSEAwZufyviG3oH2l5Pj6EsblUqh7RjQ8V6MfsRkg55j Ds+n7IWh5K8RsVvCpoGfcbbp2UxtSfkaAsVRbxuY= Date: Mon, 30 Nov 2020 18:05:01 -0500 To: trondmy@kernel.org Cc: "J. Bruce Fields" , Chuck Lever , linux-nfs@vger.kernel.org Subject: Re: [PATCH 5/6] nfsd: Fix up nfsd to ensure that timeout errors don't result in ESTALE Message-ID: <20201130230501.GC22446@fieldses.org> References: <20201130212455.254469-1-trondmy@kernel.org> <20201130212455.254469-2-trondmy@kernel.org> <20201130212455.254469-3-trondmy@kernel.org> <20201130212455.254469-4-trondmy@kernel.org> <20201130212455.254469-5-trondmy@kernel.org> <20201130212455.254469-6-trondmy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130212455.254469-6-trondmy@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Nov 30, 2020 at 04:24:54PM -0500, trondmy@kernel.org wrote: > From: Trond Myklebust > > If the underlying filesystem times out, then we want knfsd to return > NFSERR_JUKEBOX/DELAY rather than NFSERR_STALE. Out of curiosity, what was causing ETIMEDOUT in practice? --b. > > Signed-off-by: Trond Myklebust > --- > fs/nfsd/nfsfh.c | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c > index 0c2ee65e46f3..46c86f7bc429 100644 > --- a/fs/nfsd/nfsfh.c > +++ b/fs/nfsd/nfsfh.c > @@ -268,12 +268,20 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp) > if (fileid_type == FILEID_ROOT) > dentry = dget(exp->ex_path.dentry); > else { > - dentry = exportfs_decode_fh(exp->ex_path.mnt, fid, > - data_left, fileid_type, > - nfsd_acceptable, exp); > - if (IS_ERR_OR_NULL(dentry)) > + dentry = exportfs_decode_fh_raw(exp->ex_path.mnt, fid, > + data_left, fileid_type, > + nfsd_acceptable, exp); > + if (IS_ERR_OR_NULL(dentry)) { > trace_nfsd_set_fh_dentry_badhandle(rqstp, fhp, > dentry ? PTR_ERR(dentry) : -ESTALE); > + switch (PTR_ERR(dentry)) { > + case -ENOMEM: > + case -ETIMEDOUT: > + break; > + default: > + dentry = ERR_PTR(-ESTALE); > + } > + } > } > if (dentry == NULL) > goto out; > -- > 2.28.0