Re: [nfsv4] GETDEVICEINFO returning ENOENT

Olga Kornievskaia <aglo@umich.edu> Wed, 18 January 2023 15:01 UTC

Return-Path: <olga.kornievskaia@gmail.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 05B65C14CF0D for <nfsv4@ietfa.amsl.com>; Wed, 18 Jan 2023 07:01:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.648
X-Spam-Level:
X-Spam-Status: No, score=-1.648 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.096, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=umich.edu
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kg294eae5vk2 for <nfsv4@ietfa.amsl.com>; Wed, 18 Jan 2023 07:01:23 -0800 (PST)
Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0E8A4C14CF15 for <nfsv4@ietf.org>; Wed, 18 Jan 2023 07:01:23 -0800 (PST)
Received: by mail-pf1-x42e.google.com with SMTP id c26so21954861pfp.10 for <nfsv4@ietf.org>; Wed, 18 Jan 2023 07:01:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=google-2016-06-03; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xjVgyDju11ICiyCxbqqQvN3f0JG9mfuCiqcnbkH9Zbs=; b=GNFgbi61cweU+MgwE/4YcDyx1iA0ASgnTwcTaPHU1eiHiK7WDe1JrxR6iTegdr4ipq X6SgLZ+hRYvfV6USkJU6ANLbKGDwixOrYUTd/b3sMpHFRNQfcIYZkJQCFlmzyOOcsOuu vN3AgxPXIyvTDUpMyJ1xxMADV7cJsX8ZiTV7YBTNP8i4yH4wWmMNc/ZCvJMadG+yE87X t0gjFhM67pZsarimFOCK93NWAH/cFqIjlr4I4y1olhwqwWv/ti7WJXp505ltFmMeaXBs gSD5dYXetZkLNT3IsbFpfQ1R8lv7V9VERqV6shvpj9SWY7vd4lk3wkyuwdsWzQSZwC3X 2Dcg==
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:message-id :reply-to; bh=xjVgyDju11ICiyCxbqqQvN3f0JG9mfuCiqcnbkH9Zbs=; b=8LTon3DELgHGwOl0obyeuvvNtqbU5jzUKdXthWkcoVUFJuxhktfxF4n5EvJYXYfnwU oI17aJT/yG3oD6wDipKcokBfNy/RO3uBJpqgytZ8WmvJ2zpwPyLbdXe6ASN0I7IvuSu3 4kYD1Hz0f1E6YijhmzvNt8cevS7zsRkD6YW8PgpQaPRdNN2lKq9GTg0HWo9+0ZAuy4W7 gKVL1t+k3pNY2WgXYyoLt/46fEEyqiJoh6L+wNbP3z7dG6xKQGE/7rndtlEEdR05E0wj yRQ+vbwICyFVQbzrceTdZxshkTWZH0DFwPw6mS58za9NQiLpTJzQ71GnsBO0t4uJ3J66 wgDQ==
X-Gm-Message-State: AFqh2kpf6M7QF0KsFMlHuoJasP+do42ObGK67n2m60RlygeVie9pcSvR guM3N+oIfUCjwm/R/wYfWRr6iRSKVf5kkufw6cSgaTFM
X-Google-Smtp-Source: AMrXdXslvjyB5UeD1oeFDec7q7nNM+FfbR0Tw8w5fKnbm5w0So/afiojYGAWDXbbK7bQ8kyoPxQ02h/shQDSH/62sXU=
X-Received: by 2002:a63:4760:0:b0:484:55ce:2577 with SMTP id w32-20020a634760000000b0048455ce2577mr468119pgk.172.1674054082465; Wed, 18 Jan 2023 07:01:22 -0800 (PST)
MIME-Version: 1.0
References: <CAN-5tyEFLYGjMKmXEU8bD5mp0BPX2h8h1LgHYHEdA42hj83mfw@mail.gmail.com> <D74B32E8-C97A-4086-A257-E62F567AAD15@hammerspace.com>
In-Reply-To: <D74B32E8-C97A-4086-A257-E62F567AAD15@hammerspace.com>
From: Olga Kornievskaia <aglo@umich.edu>
Date: Wed, 18 Jan 2023 10:01:10 -0500
Message-ID: <CAN-5tyEk2MQahOj7fgNRx+kQdeRB2vKrfmk6Q1HNjrvsPZbhXw@mail.gmail.com>
To: Trond Myklebust <trondmy@hammerspace.com>
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/6XDModCQCTnSQ3DmGoZK9-A5Ivs>
Subject: Re: [nfsv4] GETDEVICEINFO returning ENOENT
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jan 2023 15:01:27 -0000

On Tue, Jan 17, 2023 at 5:54 PM Trond Myklebust <trondmy@hammerspace.com> wrote:
>
>
>
> > On Jan 17, 2023, at 17:37, Olga Kornievskaia <aglo@umich.edu> wrote:
> >
> > Hi folks,
> >
> > Is there anything in the spec or elsewhere to let the client decide if
> > NFS4ERR_NOENT is a temporary or a permanent error for GETDEVICEINFO
> > operation?
> >
> > Right now a linux client treats it as a temporary error and triggers a
> > GETDEVICEINFO call before every IO call (until it gets a positive
> > answer). The client then proceeds to do the operations against the
> > MDS. But shouldn't ENOENT be equivalent to LAYOUTUNAVAILABLE error
> > which the client treats like a bit more permanent error and doesn't
> > ask for a layout on every IO after failing. It would seem logical that
> > if ENOENT means the server doesn't know this deviceid which was gotten
> > from a layout then should the client throw away the layout and ask
> > again for the layout?
> >
> > Thank you.
>
> Why would a server deliberately hand out a layout containing a deviceid that it cannot translate? That makes no sense, and can only be considered to be buggy server behaviour.
>
> The current Linux client code assumes that if GETDEVICEINFO returns NFS4ERR_NOENT, then the deviceid, and hence the layout have been revoked by the server, and that retrying the layoutget will yield a new, valid layout with a valid deviceid.

As I mentioned, the current linux code doesn't treat the NFS4ERR_NOENT
as what you describe. It re-tries (GETDEVICEINFO) on every single IO
call. I was looking for clarification to fix the linux client to treat
NFS4ERR_NOENT as NFS4ERR_LAYOUTUNAVAILABLE.

>
> _________________________________
> Trond Myklebust
> Linux NFS client maintainer, Hammerspace
> trond.myklebust@hammerspace.com
>