Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3164385rdh; Mon, 27 Nov 2023 07:45:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1GY3j0GxmJNzj7CzVTHTp7t9px9+cKjKmeAW+/CKBZySE6JyoM01YFzWfMm8ky8ZxRxKw X-Received: by 2002:a05:6a20:94cc:b0:18b:b02d:8b6 with SMTP id ht12-20020a056a2094cc00b0018bb02d08b6mr13348625pzb.23.1701099955210; Mon, 27 Nov 2023 07:45:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701099955; cv=none; d=google.com; s=arc-20160816; b=EnkVmP4+4saDXrWwKO7+8h8afKwGv/ZoWzJYEfJbmZfLV/s+wtT7/Efup8VC8UnWJX BdtOYLYnhNWtRnkzF88n7uSW9FyGemSajaA6NZMB1Ls3mXVCExFCIsssG7LVvAp0To/m N7G7DaC9OVWe+C+HYrfAG2oft+9gB1Vkqp6d7k+/akdDkHo+7WYZl+iCLWtylLe3Tqwb KXYoPaCrf/bMNtcRcA7DNwl/LFrPjUb+xlCo/5otmTDBlRXSLDCd8K2TG0IKgo6kivdH L0aKTjhRP0PlPcU8fc+bbEBiITih2XmzlgM4CmAROhwHH5VGhEUHYVn7fSTiVWXzpmvE QSow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AYtUg/cFFxqhm1ONB7t9JxStlhJEhz1i+uOIk3ajFKc=; fh=/sp31uu1n69Z5QlBuvkBZ3rCmtoiVU9EN82E449uxmw=; b=MpIwZvKqDMMfCtXS3Eq2BHWmvFC3k5bT3ArUgoXB7cJIx3kOwCwu2J0NyQrN584AxE Z0uTLiAgq1kR53eZCOQBON6Jw4oXppiVn46fUyDbwrgU7RzaqJqzOPUO4KLeUAQ+q+oM zKm+EDi/9KOzBQAWSsrdV0gFMm9DvwYrLlL2M6OS6sY8UKQtsa194MV1/c4xGg9jLIKN PSsO2ggfsz2SREDi7gQT5VqxMc64E6QxetUTHHtWn8f2K6f7tVCFdXLDXb1/4005x53f vteBzKVOut+imdSjjhLtZ0xuJFdDsjWOCK4vI9rwLd00b1M+iOhlC0drp5KDqBXPF6dt ChXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XAbOfEmf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u9-20020a056a00098900b006cd8567235bsi3869541pfg.237.2023.11.27.07.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:45:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XAbOfEmf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B27708078324; Mon, 27 Nov 2023 07:45:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233873AbjK0Pov (ORCPT + 99 others); Mon, 27 Nov 2023 10:44:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233635AbjK0Pou (ORCPT ); Mon, 27 Nov 2023 10:44:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6203619A for ; Mon, 27 Nov 2023 07:44:56 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75B9BC433C8; Mon, 27 Nov 2023 15:44:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701099895; bh=gvIJxTodTVCzgI7+DCND4759lIJLFTQk3aIMqIUYV+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XAbOfEmf9G1gGLkJt3Y5A0jNlDZHEvGgGrNrCOotLf5Frk67z4tI6hhL/0f9dSUUV zjG1M/pbvAT4Mdl7X5gPeIyzi7CsTPpbvodP87CXI4wZwUbHX7VAYO/MJs/6stz7gH S2ULbgZnt8VepBsg1NEHiALEbzfFu9jJ/8pZPORUjJeF455exQQ57haCUydSQdAK5P idI0DvN32TrI+4v3Sfpw9Ourig+8tbTXpEYdOQT4lKtnKmW18/+UStn5SXBSDPboMy CWEJAZN7BF6+Mw6sStSCFTGVoGvxIm1xkAraG4fUqYYeljwxonDwcBfnaT/58ArMWZ fgmFqRdRqwNeg== Date: Mon, 27 Nov 2023 08:44:52 -0700 From: Keith Busch To: Christoph Hellwig Cc: Daniel Wagner , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Sagi Grimberg , Hannes Reinecke Subject: Re: [RFC v1] nvme: add cse, ds, ms, nsze and nuse to sysfs Message-ID: References: <20231127103208.25748-1-dwagner@suse.de> <20231127141857.GA25833@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127141857.GA25833@lst.de> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 27 Nov 2023 07:45:09 -0800 (PST) On Mon, Nov 27, 2023 at 03:18:57PM +0100, Christoph Hellwig wrote: > On Mon, Nov 27, 2023 at 11:32:08AM +0100, Daniel Wagner wrote: > > +static ssize_t lba_ms_show(struct device *dev, struct device_attribute *attr, > > + char *buf) > > +{ > > + struct nvme_ns *ns = dev_to_nvme_ns(dev); > > + > > + return sysfs_emit(buf, "%d\n", ns->ms); > > +} > > +static DEVICE_ATTR_RO(lba_ms); > > I'd probably spell out metadata_size, or probably even better > metadata_bytes to match the unit postfixes elsewhere in the block code. Should this even be an nvme specific attribute? I thought we should have blk-integrity.c report its 'tuple_size' attribute instead. That should work as long as we're not dealing with extended metadata at least, but that's kind of a special format that doesn't have block layer support.