Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp154191lqq; Wed, 12 Jun 2024 21:18:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCVFh46nc6gxEQYw4vgUGUDSnl14jvL+am5Eu4XxA1jnVyq7qAyTpNMX8WJZxOBPcYgQflDK1UeDwwmyroKDqAwus133g86TLRDCYrUA== X-Google-Smtp-Source: AGHT+IGQBSkJR0L+cfGLCh/+3cDDFFETD7PjBEnWfHHV0ZLXjYlecf7vFRiKeYNew2KP7wUX52HI X-Received: by 2002:a05:6a20:9150:b0:1b4:33c0:4a09 with SMTP id adf61e73a8af0-1b8a9bb4709mr4542612637.16.1718252313126; Wed, 12 Jun 2024 21:18:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718252313; cv=pass; d=google.com; s=arc-20160816; b=YBoLuaJy92Sj48nb0g4kDNdDX0eI02FAtWzqULjaWOMZH/rO5+go32tSzYovgeTfou /7ToAW1IansUGnmM05zYV+FhX+/1wDrKL3OLcd04kJu3t6KHtUUjPHnYnZB4mXQb+lEh C3LE9cY0ye2vRc32UiYGq/qoUNhIzKowhJ9CcqBSnp0UeYlC46JhpjSSCZD45hUcGz21 aON2bzpiBLqNibZqvRnNNffsnCBiVEGSLb2Vh28RVSR1Ve3kiReYARn3VYKFcwaf57AF JqKjr2RJkeNXKjyhHkSLnYD5ooKCmhDmIfjYmDwq7OLf0dod4nldZkLxkvyYru5LTlE+ +oCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=/QtVwbega8NvnHdt/uKvwDjYc1+36fjrMQHuiAk477o=; fh=Mys3y4MwsHRytUQMpdfGBn3oGRYLcLloxNwkFYMYMmg=; b=T/yijeUaL7cc4HmEyB6cwasZN/55iR40crN7d9BeoOfVOrLSlPsixVM5ZDrakbZ1c4 rTeXKY91Cq+QaJXizI2WCDUXoT+oloBqMpj4E+gxrJVXAI6yErTthEwOWoUUEQb3TLKh w8fvkOwk96QvBQNB8+S42VqcBw2zo0bWRIpC/W3peTk6ZQHe2g2SrtJz7kTQw2La1zhU 3BgL7F9LUl2vtFuJrX0gwl/+MDEwYJv3gUvSn81SvzPm00yQ09+zwDfL16RMafowkLJS Rf2IZZc8sk6l81vS4xzHKNAinshGpyBsewUcpUWIPDcHrTOpyvshp/FKfIZRnDdUZOLN 91kw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y0MNEvVH; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855efe0fesi4802265ad.459.2024.06.12.21.18.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 21:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y0MNEvVH; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-nfs+bounces-3719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DC7B8B22D8B for ; Thu, 13 Jun 2024 04:18:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6FAB135A46; Thu, 13 Jun 2024 04:17:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y0MNEvVH" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 68DC8134414 for ; Thu, 13 Jun 2024 04:17:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718252270; cv=none; b=fmnKjP15U4xiXHQI8PsUhGWEQQAGJNT9KK09OCyonFtHP4qd4XIiy1R72RZMSFw1co9rurRStAOMH/VGw0Vow+k8VEEt9OxKc437vILr/SqZOZJgLUwpQp40W5NZAcewIe6qR/8IXBVen2digHtebiN/onpRM4ztBo83cmNrPbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718252270; c=relaxed/simple; bh=aoL/lDctGiS3XXACQ5vdk0QGeF6ZqSQouBkuNBuAjLI=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H8iN0dV77/KwI8Q9d1x7lHDImLxEih/VtFbCVzl0ZrSDZoK6px6SRHX0G4LGozp7ImMcQXp9ZHjskZndBreb9W8BEkhIg6TjDxIP7eXFpH8+scjfRIwoqFAIRsZ6P1Rb3M2ZJa2uMTaGIC/mQ4y9zerc6LBvxPSkOHSXperwtnk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Y0MNEvVH; arc=none smtp.client-ip=209.85.219.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-6b0825b8421so3608986d6.1 for ; Wed, 12 Jun 2024 21:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718252268; x=1718857068; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/QtVwbega8NvnHdt/uKvwDjYc1+36fjrMQHuiAk477o=; b=Y0MNEvVHPgl9DCN5h9lLkV0CRDp2or/P/MB7KSqoieg7rk/dfm75IkMSGuvrcEpOxi 2tEnQa7HJnYHb+w+TcQ/eQh5fEqYsyQJs824jWqgUIZHg9RXAdO8t9t+mLxYptC6mDVU X311D4G8fo89uSYNyIj4p3hsCgZD7ugtQ2jDIvFFwVg4KBW/H+6QBWbqg27ArQ824Aq8 Ls3RM3mhia+SBcPm48vhcZuNVtbrNp/JBTQFE8VuRPqkk4XGdFyhdL+uHGPZOCtYbz5c w9fREzEpf+uRpB04l6fPLzDXq2V1OxDnBlaLE6QsxgWsU0HJzj9dChwxy8MQE0R7v/lw 0ccQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718252268; x=1718857068; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/QtVwbega8NvnHdt/uKvwDjYc1+36fjrMQHuiAk477o=; b=ZoqbAT9k1fQNHIBFJFb3jsLnDT7UjwB+UeiQCXNIxbs2GebCMnMU7BjDWIcp43hSIa R2+kWSt8IE6ACN4T7mGGuvZ4TffCvMlzqSoM26nS6N2EuhCSQ1iaENSW7rH4xVkjiY6c yPd1f9GUeZAkATsIPxM9E8JjTF4STQcmlkbdUH5sLqpLa1lmqALcznnlruyA8//ueS44 8deMPavfEuvL6bgqojphO8PBmol3X6++LONjZ0/luQbPuKKy0jABLIBC7zJgdfQD+hY5 /dHVuNRm336GUpDQPP3cT8ouB1Tbn8lFtupqXvqxW5Ya3fzB+9apuB9HBWOdy3UUVnf9 s1Mw== X-Gm-Message-State: AOJu0Ywy2zA5WnaXC32QgdImttAMR+jb+TU7Lm8ITOsBrzcKhcdlFwyw zBp8mjxu0zsbSIYq7sZtsvpwBODgFcl9f3CVqwCtVBIbcP6UCCvrN4Fb X-Received: by 2002:a05:6214:5248:b0:6b0:7caa:457c with SMTP id 6a1803df08f44-6b192028a7bmr37890306d6.24.1718252267908; Wed, 12 Jun 2024 21:17:47 -0700 (PDT) Received: from leira.trondhjem.org (c-68-40-188-158.hsd1.mi.comcast.net. [68.40.188.158]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b2a5c68ff3sm2851546d6.74.2024.06.12.21.17.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 21:17:47 -0700 (PDT) From: trondmy@gmail.com X-Google-Original-From: trond.myklebust@hammerspace.com To: linux-nfs@vger.kernel.org Subject: [PATCH 10/19] NFSv4: Enable attribute delegations Date: Thu, 13 Jun 2024 00:11:27 -0400 Message-ID: <20240613041136.506908-11-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240613041136.506908-10-trond.myklebust@hammerspace.com> References: <20240613041136.506908-1-trond.myklebust@hammerspace.com> <20240613041136.506908-2-trond.myklebust@hammerspace.com> <20240613041136.506908-3-trond.myklebust@hammerspace.com> <20240613041136.506908-4-trond.myklebust@hammerspace.com> <20240613041136.506908-5-trond.myklebust@hammerspace.com> <20240613041136.506908-6-trond.myklebust@hammerspace.com> <20240613041136.506908-7-trond.myklebust@hammerspace.com> <20240613041136.506908-8-trond.myklebust@hammerspace.com> <20240613041136.506908-9-trond.myklebust@hammerspace.com> <20240613041136.506908-10-trond.myklebust@hammerspace.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Trond Myklebust Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Signed-off-by: Trond Myklebust --- fs/nfs/nfs4proc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index efa07c275338..140ff1d75320 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1339,8 +1339,13 @@ nfs4_map_atomic_open_share(struct nfs_server *server, if (!(server->caps & NFS_CAP_ATOMIC_OPEN_V1)) goto out; /* Want no delegation if we're using O_DIRECT */ - if (openflags & O_DIRECT) + if (openflags & O_DIRECT) { res |= NFS4_SHARE_WANT_NO_DELEG; + goto out; + } + /* res |= NFS4_SHARE_WANT_NO_PREFERENCE; */ + if (server->caps & NFS_CAP_DELEGTIME) + res |= NFS4_SHARE_WANT_DELEG_TIMESTAMPS; out: return res; } -- 2.45.2