From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 498A9199FB0 for ; Thu, 8 Jan 2026 00:26:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767832010; cv=none; b=hDckWkYD0DyAWKBNLQ5XGhhXQ6CroXfjNTLXQYXwc0TwUbtqaHbhHqhC3DFfBme90NpwMk2WAK0LI5HWAb0YTB5YMp7Tp8Fu1sFKNIxi/dqHkawxQCo378DOnPsxBjdtRF56ilAPEKh3/PotR0C9XXtjqpXyzT2dqMufB7mwCGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767832010; c=relaxed/simple; bh=FMm6znQEgmQsGoE7OEJXQvl+VcGJ4oanpicJW4OIflA=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=B3KUhTXgwt38LsatNLz4XuDdW2Z6+Ogx6gAekvroo/lEshWmmbM3ulwcs7Sn2IzKENgn1hWrfB8e1v06el+OLeu1W3O3R45/vGbmp9IcqZYOAbavbr/iZv5DlSKR4Olnl/uT4CzCpdtrfdYxsNB/nYgBJQweXRP8UlBxLBPqfTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AOG83wiP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AOG83wiP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCF99C19421 for ; Thu, 8 Jan 2026 00:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767832008; bh=FMm6znQEgmQsGoE7OEJXQvl+VcGJ4oanpicJW4OIflA=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=AOG83wiPXa9+3Nvmnr0OwtTVd1/yOd1deWw297NGThMYnZ9ZJhmtGkn94JSiWOQ91 YpWh+Qyh/O8Gp3oBOgUB1fsY9hT/3JmTAmj6Hs8+6ZQjDEr+v8qochujd3y0P2TuPn L7HMR5COiF0pWTk0wZznMtWukm+mScQC+/XUTpUnQah6C8ZHL/HzQDw/1EfvHC34XI FbRhXUh0YbSDEQTB3vTcCFITC6BJB7DVaCFJVhi+E2M5xhB5WRnP9sztqewH8ag4Cy fQsjs/YCVL1Y9V2wOR0VcqqGBvENnJLqBXlAL1NCfeC3RYntFtjweIn1AP3ioxkz/Z iXOgPCWNqVoXg== Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id C1131F40069; Wed, 7 Jan 2026 19:26:47 -0500 (EST) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-10.internal (MEProxy); Wed, 07 Jan 2026 19:26:47 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdeghedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfvehhuhgt khcunfgvvhgvrhdfuceotggvlheskhgvrhhnvghlrdhorhhgqeenucggtffrrghtthgvrh hnpefhffekffeftdfgheeiveekudeuhfdvjedvfedvueduvdegleekgeetgfduhfefleen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegthhhutg hklhgvvhgvrhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudeifeegleel leehledqfedvleekgeegvdefqdgtvghlpeepkhgvrhhnvghlrdhorhhgsehfrghsthhmrg hilhdrtghomhdpnhgspghrtghpthhtohepkedpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohephhgthhesihhnfhhrrgguvggrugdrohhrghdprhgtphhtthhopeifihhllhihse hinhhfrhgruggvrggurdhorhhgpdhrtghpthhtohepjhhlrgihthhonheskhgvrhhnvghl rdhorhhgpdhrtghpthhtohepuggrihdrnhhgohesohhrrggtlhgvrdgtohhmpdhrtghpth htohepnhgvihhlsgesohifnhhmrghilhdrnhgvthdprhgtphhtthhopehokhhorhhnihgv vhesrhgvughhrghtrdgtohhmpdhrtghpthhtohepthhomhesthgrlhhpvgihrdgtohhmpd hrtghpthhtoheplhhinhhugidqnhhfshesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: ifa6e4810:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id A1756780054; Wed, 7 Jan 2026 19:26:47 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AJTYT3n31L2N Date: Wed, 07 Jan 2026 19:26:26 -0500 From: "Chuck Lever" To: "Christoph Hellwig" Cc: NeilBrown , "Jeff Layton" , "Olga Kornievskaia" , "Dai Ngo" , "Tom Talpey" , linux-nfs@vger.kernel.org, "Matthew Wilcox (Oracle)" Message-Id: <9e127bfa-e4c9-4e06-b5ad-bb375e7d8e2b@app.fastmail.com> In-Reply-To: References: <20251227042437.671409-1-cel@kernel.org> Subject: Re: [PATCH v5] NFSD: Track SCSI Persistent Registration Fencing per Client with xarray Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, Jan 7, 2026, at 11:17 AM, Christoph Hellwig wrote: > On Fri, Dec 26, 2025 at 11:24:37PM -0500, Chuck Lever wrote: > >> @@ -342,6 +343,20 @@ nfsd4_block_get_device_info_scsi(struct super_block *sb, >> goto out_free_dev; >> } >> >> + /* >> + * xa_store() is idempotent -- the device is added exactly once >> + * to a client's cl_dev_fences no matter how many times >> + * nfsd4_block_get_device_info_scsi() is invoked. This prevents >> + * adding more entries to cl_dev_fences than there are devices on >> + * the server. XA_MARK_0 tracks whether the device has been fenced. >> + */ > > Only in the most abstract way, xa_store actually stores the new > entry/value and returns the old one. In other words, this does > quite a bit of work for the non-initial GETDEVICEINFO. The comment is misleading then, and should be clarified. But should the code use xa_insert instead of xa_store ? -- Chuck Lever