Received: by 2002:ab2:7853:0:b0:1fa:5c73:8e2d with SMTP id m19csp35771lqp; Thu, 30 May 2024 11:08:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+JpZ0eyaQ5AgYyq+Dv4om4S77jf0NFoCyBpf3MUhKDG3dCvmZJUiX67Ly9h4f9FBE66EvW2IupENJpxx5vEKcQXAVenkyY5pDyr5/Wg== X-Google-Smtp-Source: AGHT+IHVD32hlsdKIE2IsvHPPAR4YgbJRZWw+Skp21TDSTIqvD8tN8iUA/BkfcGf6yLpKnvu4vKq X-Received: by 2002:a17:902:ce8c:b0:1f6:2ab1:6037 with SMTP id d9443c01a7336-1f62ab1658emr13505995ad.53.1717092536792; Thu, 30 May 2024 11:08:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717092536; cv=pass; d=google.com; s=arc-20160816; b=rNMzwv70X6Qe/Rxh6Mgk6ZY3wAFZoDNT4daW6fM91aBmDtN+eHl9XYSJzpYbmWKXv/ DrDdWEp3zVV5DT/3Lhqql1iXF47lQ+AZcIni83OtJ2KCol5C9nm+gvYaz1CQHVook640 8Ch+DS48I/xVF6dXvJcqfq9xGbcurxmR/TGEULaH3EMUYP3XK+OvRNvzhOfxbf4xsbi4 0sgxpDwWj6o21cadT1T6VNnm5EPkGBLSVEvAM8AAC8hJJW3gAAjYj6RfcMWqSHYETAp6 jXQfnVCWuv/o30BA/yCzweH1tGYZj8DNLgO0+vwaxm3g8vgx73SO8htrcYOgM20re5e7 SOvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=LX99xaCR9P9WmmydEm3mActNFiybMzqROrRaMmfL81E=; fh=542mjIpYw0GPpCJwqYmNdy34FZcpAYOBTlHPyN/xUac=; b=Wv95opIvb0lkD0RAbuRFJTlt1IeEG22fGS0nbVPS7WPQFRsSBxSp2XeeLGSiiV2vit bOKZxi+r07x+lRQ4k6vysRIHab0t38VCyqEna8hRTWkO+HEtNaFKNN4k4QdE/OMbWYOc XUNv3g+NkxO0yqFceZsSTw0zyHvIyL1ir15qig2YvPN0oRF0o6CliNR6bWsjGJTrNcEY SwIdv+SViOwpmCDeavJKHgtDRS28NODwxrTKAg6fg3q+2/E1oCFewg/HPS7a/TubzC45 oCjhKegL9ln9yw9bYVL3/Pb9RhjwdJLFfhAe9LCBSCqR/+1yKONJkJpIpkGeMrT+kW+8 9kyw==; 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-3492-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3492-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6324173e2si950905ad.583.2024.05.30.11.08.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 11:08:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3492-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3492-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3492-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 35D48283B64 for ; Thu, 30 May 2024 18:08:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70D6947F51; Thu, 30 May 2024 18:08:54 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 C971B47A7A for ; Thu, 30 May 2024 18:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717092534; cv=none; b=Jl7IGhLyNleOiBz+EldIaF8t/7SDif3raVNusRoFEdsYClEKP/lm7ZcW/ZxzIKFfJZrG05eDqy5jdTyMc4i5hInlw2Z2SiWJ4sdFRS+hk1QSW9kgC8LcThm5TRPoiP7ceEQuIYwcq50DekIvNOfp9XMOAJHh/JLPi9f5UfhxdoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717092534; c=relaxed/simple; bh=Y5VUdQ0AozqGKQopSfGtZFowvZbOTsRlf5ojYvhnXMc=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=V9z23Gk0tu6WaMQMU1rcsFyERj3oPdW42NErN799UqnUYNFJkb8Z7AMcNzNRBlGJAmKSRhhvAJ0ISHChbqxdYUSNqYnAE7NirLNqpaolNn6b+lJx/frUSti9kAhT3s+CdxT+zaTHeKnLaRzFcdY0ZfOkz6TX6sLpzTJrHSbyqzg= 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.128.41 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-wm1-f41.google.com with SMTP id 5b1f17b1804b1-421160b07eeso445345e9.0 for ; Thu, 30 May 2024 11:08:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717092531; x=1717697331; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LX99xaCR9P9WmmydEm3mActNFiybMzqROrRaMmfL81E=; b=u8vf3Qtu4qABbFxd46A/wbCZXIeSoOHowf8yRd+aa74S+wBCcKKGUpiysTu4VzjVHL jGqgBY7G8zgzFTKa6+9rpemx9IwUlVVejT6VmsVqWxjDt6v4882veBoSiUsh0oi/Ss8p 4X8il2HwN3M/BE1ceYK8KCOxZS7EXAQWhDasb/59KLY4rn32hLax6mWc/xXPLvPik6yU QcX8Q7de+Q31SrjxHku8UXUqA9xkzTYomeXFvJn7GO8lO7t3qKIh9CU/hCyJTyTEegvA 1Bi8BM9lIbdVTSusMXoGfulfsFzlIGAZcCqZXIhwYIkaGQsMsipXSRTnKHEPEmMebnMI akGw== X-Forwarded-Encrypted: i=1; AJvYcCXHz9kFDHgD8xOS8FmwDEc7/mFVLwJYUPjcDAYZLW2+Zoa87Ot/LzQB2F3pWwaaH/wnN3cIBTNYg0WEy8iPltlGbM1le2vmHldX X-Gm-Message-State: AOJu0YzigYnvuuKTfN7Xj9vHeYT15DVfsbZGyAk29LDTYlVojKeyMR2X ac9L4Tz+XcZhvg+TDd2crhN9XxRaFm0K4w21ZzgJRfoMBenr7myI X-Received: by 2002:a5d:4b8b:0:b0:354:e778:3665 with SMTP id ffacd0b85a97d-35dc00c1fa6mr2091508f8f.5.1717092530928; Thu, 30 May 2024 11:08:50 -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-35dd064b601sm74386f8f.98.2024.05.30.11.08.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 May 2024 11:08:50 -0700 (PDT) Message-ID: Date: Thu, 30 May 2024 21:08:49 +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 From: Sagi Grimberg 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> <81fa32fb-c5a3-4af8-a8ca-08905a8b62ef@grimberg.me> Content-Language: en-US In-Reply-To: <81fa32fb-c5a3-4af8-a8ca-08905a8b62ef@grimberg.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 23/05/2024 0:19, Sagi Grimberg wrote: > >>> 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... > Hey Trond, is there anything else you are expecting to see before this is taken to your tree?