From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 4C55E2DCC13 for ; Fri, 20 Feb 2026 16:11:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771603919; cv=none; b=YYBh/KDbISaplyYNwlskGFefbclE73su1v8iyYM47vx7+qZwOiz+qPaSBL/dOO7217feh4qZrtbJcOysnzE4PW8JDv3S7hjZdZSNGpJSN+vvWoFsV6+sVs4wwlaOwC58XBv3yW73ttER0YuLrOm9GKLhe2TIbLjnLa+R5MyAn+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771603919; c=relaxed/simple; bh=p4YaeJDkeXmLhsZvgotPfqMVn4dRudNXtdsomPFcadU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Eqa1+B4XNaoeFsuMtJf8/DGpFzG0VJZ0cQkFgfSRh8CvJrsQr2+SJ32VVoV7ccCFtM6q9jviK8FJtnaoFNpApLe16POPCUsqIy9HUI3m/7vFpswnuy/VsnlpIc6jGbPz7bMJ33RrFrD08AKpz3O+319ukQO1/y5KUoJZiu+4S5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 4DA9568D05; Fri, 20 Feb 2026 17:11:56 +0100 (CET) Date: Fri, 20 Feb 2026 17:11:55 +0100 From: Christoph Hellwig To: Caleb Sander Mateos Cc: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] nvmet: report NPDGL and NPDAL Message-ID: <20260220161155.GG15071@lst.de> References: <20260220032809.758089-1-csander@purestorage.com> <20260220032809.758089-7-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260220032809.758089-7-csander@purestorage.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Feb 19, 2026 at 08:28:09PM -0700, Caleb Sander Mateos wrote: > A block device with a very large discard_granularity queue limit may not > be able to report it in the 16-bit NPDG and NPDA fields in the Identify > Namespace data structure. For this reason, version 2.1 of the NVMe specs > added 32-bit fields NPDGL and NPDAL to the NVM Command Set Specific > Identify Namespace structure. So report the discard_granularity there > too and set OPTPERF to 11b to indicate those fields are supported. >From a pure mechanics point of view this looks fine. I'll not that actually aligning the discard to these granularities probably won't really work for most file systems, though.