Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp614150lqp; Wed, 22 May 2024 14:19:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWLMWbsdMmicWNy78Zf+IAUgOmtHyCMmKQis4hjctNbKj/mNfn5RUb2JpZedTV7xt9P9F0VZi2k3sq19LvYoOdKsOLhLCJp17nHHUmqWg== X-Google-Smtp-Source: AGHT+IEHdqTV2MFEXWoHk4wTUIf69i8JTNGYlbiP30ZoxnQMPetJNQMFgr+pFa36XvMQnWqTDT9q X-Received: by 2002:a50:999a:0:b0:572:b83e:e062 with SMTP id 4fb4d7f45d1cf-57843c433b0mr333305a12.3.1716412788715; Wed, 22 May 2024 14:19:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716412788; cv=pass; d=google.com; s=arc-20160816; b=w/+TrwQEh7jjjxtzLfe5ahmZHA7AHvJ/odq1FmA8NgVhDbau28Ck9eNxBNPyc233Ml xbgQvoBBn4S7/7jgQlj0GcBw5Sb0R2IUQIS7i6sCJuPzLWWJOXqeL/lZrjsYVgfv+nZ9 tMX7Hev5SkUCDaCFNOva7OpULZPvXMBlPu3pCxXJtQZj5G4QqE7q2BInbL663az0dt+A xxEMgNtoUa8Ki3mbfAQ142PK0lFpbqfXcB7o3iSh+T4Jp6GGiP4vCQq2oD9cBrsg2trg hu+VTW3DHL16n1T1WCM3xW53FPNJAuQjKqxAZbVaOWHwI+M+xVYmq2H+0Fq6j6FSsOYY DqyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=QzyHeLsic3jyuDD6hMz4ACCs0q53FvOl//v4vC5Hthk=; fh=q38bN6y2k+S9/YOGbE695iFvjFr/xVlPEX5I2Gjtd7I=; b=oAFDZN+iY8TJIoN7LY8tLAJwiezAttiAPXxz4rSD/Y3hNZLoWjU/FtcMKtdMAeLiny F/FHykTn46GGIwQ40WTTKVRcwB+02luaC0Z/USubxBkPC7cCe78rKkJWPeWvVq85DlTH KVtt/Np7RfempcQxExKffj9MQEZyax270hpSjOJCCrzXRGlD42WJYa3kn9GhunLaPbnF ZJHpdGIb4GP3/VHXSlkbU3satCz7RQFgHvKV85lASBupsnFrPYDAhiPbgHi/476AsrJ1 emir70qkpGt5VCdW/tNshEhNmhSihorDgvZznUv3r69/bLaG+z2rQtOT3hsawWIHdCIy BXVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3344-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5782958f69asi1422532a12.610.2024.05.22.14.19.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 14:19:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3344-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 177B71F21E03 for ; Wed, 22 May 2024 21:19:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBEC1F4E7; Wed, 22 May 2024 21:19:44 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D06476048 for ; Wed, 22 May 2024 21:19:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716412784; cv=none; b=Zdc6VVENdMpB2fOb5qgoaMMJl9/Zm2545fjOGNdvUKAW5HN2bqVd2MPvIezc21jcfub5xkWSq/8p0xA4jVEe1JW1Y3TYiISKeWV6Nz/Epfqc0qYxsFqO7VOwMka2z+pq4OFO0O2iyeDql5pvPYGSQrMOTIzHU4ZvSJtdcBkf3+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716412784; c=relaxed/simple; bh=QzyHeLsic3jyuDD6hMz4ACCs0q53FvOl//v4vC5Hthk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NxyTMeuxacFId//l78azCJ7yqZUrwd0TPoe3iTTJGq3ZAd7juMoRr4PkO5/Px0hjde/+WS44X/ATVzBIndXVuwxQy0asLw0vlFY1GZ6PHgXXzbgkRT+St3j4gCSMH9NcKimaovuFqFx06hjcByJqnwN7JRL66yidEyR8GpcGlg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=grimberg.me; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=grimberg.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-354c3b445bbso543738f8f.1 for ; Wed, 22 May 2024 14:19:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716412781; x=1717017581; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QzyHeLsic3jyuDD6hMz4ACCs0q53FvOl//v4vC5Hthk=; b=OuNf/zpJxi/846Jr9PtNhtDGYfPblOSSgtvejIpDdsU36PPDSYyXrUgqvRHeezagYY 56g2j8xfm3yiXflrS4GYtOBl3ywx/YAeyLbub/kuOQYbouNdxVlrtjeiPN0gwT/Z9fiJ eE9SYETbmD9/fpwCpxMCbgutrTN+I7F3Xdx4uIRy9ZhN8/s+D44RIxKqqQzI77WvqPJ7 AP0RXIddgJoaE72eAf3c3UEKL+9k4iPcpygUHWzkLfE9FPBQLBIPFfhV/O601YleyfFq NSl7406biyNufnLdjEgLweTGoWQCIXJBPrNuHYJ2RkkVfrv+MwnPClzfzotlepCYuFtP DICw== X-Forwarded-Encrypted: i=1; AJvYcCXVIWL23ict4yRCO4tUlgRmbSdisd0PGty3GySKmEMDWpuk2JFFgrCUbsgod+HHv9SGz6kSwwebnjBKbJ/Ow/TS/3NpRZKV+9/R X-Gm-Message-State: AOJu0YwJezX1Fx22Dp1z8TpxAPWWpUybvg4ErYGEdVQ93as63WaavReP MRK9WV8+f/gzYOnF8BCpWqgP2BHSomTYPq5KosCCRZJNEt4UGgvL X-Received: by 2002:a05:6000:188c:b0:34d:b76c:cff7 with SMTP id ffacd0b85a97d-354d8da3838mr2734800f8f.3.1716412781202; Wed, 22 May 2024 14:19:41 -0700 (PDT) Received: from [10.100.102.74] (85.65.193.189.dynamic.barak-online.net. [85.65.193.189]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad0absm35122295f8f.69.2024.05.22.14.19.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 14:19:40 -0700 (PDT) Message-ID: <81fa32fb-c5a3-4af8-a8ca-08905a8b62ef@grimberg.me> Date: Thu, 23 May 2024 00:19:39 +0300 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH rfc] nfs: propagate readlink errors in nfs_symlink_filler To: Trond Myklebust , "linux-nfs@vger.kernel.org" , "jlayton@kernel.org" Cc: "hch@lst.de" , "dan.aloni@vastdata.com" , "chuck.lever@oracle.com" References: <20240521125840.186618-1-sagi@grimberg.me> <4d2bc7f1-b5c2-469c-9351-772626c707d7@grimberg.me> Content-Language: en-US From: Sagi Grimberg In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit >> So what do you suggest we do here? IMO at a minimum NFS should retry >> once similar >> to nfs4_file_open (it would probably address 99.9% of the use-cases >> where symlinks are >> not overwritten in a high enough frequency for the client to see 2 >> consecutive stale readlink >> rpc rplies). >> >> I can send a patch paired with a vfs ESTALE conversion patch? >> alternatively retry locally in NFS... >> I would like to understand your position here. >> > Looking more closely at nfs_get_link(), it is obvious that it can > already return ESTALE (thanks to the call to nfs_revalidate_mapping()) > and looking at do_readlinkat(), it has already been plumbed through > with a call to retry_estale(). > > So I think we can take your patch as is, since it doesn't add any error > cases that callers of readlink() don't have to handle already. Sounds good. > > We might still want to think about cleaning up the output of the VFS in > all these cases, so that we don't return ESTALE when it isn't allowed > by POSIX, but that would be a separate task. > Yes, I can follow up on that later...