Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3215609rdh; Mon, 27 Nov 2023 08:46:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHy8h+ztcEzfA5DOw0Tz4ZT0GNG38jlxkKOR5KabRJqeRh88QKclyA2RFjzL/tcuExDSHM3 X-Received: by 2002:a17:90b:4a8f:b0:285:a118:3460 with SMTP id lp15-20020a17090b4a8f00b00285a1183460mr6450156pjb.3.1701103619472; Mon, 27 Nov 2023 08:46:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701103619; cv=none; d=google.com; s=arc-20160816; b=znCkVwbEVnnUSK8WdpxmdXyBveDr7n/0Dh2KogOFwxxWF1+hsv0fTI8p46MCjP4bvK 4kqq+JFmSY4cmdHuyKkvSXrDwrgVFAQusF2ic7iQwOzlk+449SYMJrVOU2wm1TmqWmsH d2yDXSYZGLgdHJsBhABKDHS1rNpuxM4HqFj1eAJVnfSy5B69GEdc/IxTrIpi2nbOwSGg raaOVLV5HZU0+kfBbrNsnF7fbRkbzO4mgDCyPDnwA6fJwguW+K4yLpiWUN0RZIazd5My yII0X3QLvg/doXC/64NMzcrJkUz1DmvoZFd1NgraIOxvDBRJh1DSPwSKRyAR1//Drnk6 DinQ== 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=OvZDL5BIO1kvnB26AxlPvgi8sEUk3W+i2ZOWsJVaOjQ=; fh=/sp31uu1n69Z5QlBuvkBZ3rCmtoiVU9EN82E449uxmw=; b=sozpP5zSuOpaftksaZNkks7mIepelWAYZdp5Qig+2nR/l8ivzsF3qp6DLpe6/SirqK pAsuuxsl1CcIKD19yrwpMtaT74ilraSYEhtWHeLRH5R5A2AJeyM/kfvtRkaX/Fe2bxPR fxGAk2dIzpO7qmrs6dlj929L4EYDSafslnhr3iIK+3GVdYBy8kFlo9JAEQ8R7OiQIg1j tu05ZqUv7aasbsZCB1LsSJrnlWli8FqGpbO1r7R+Z9swTb+8v5dVtHRJf7U4eHmugiCq BmWL+cF31dx84q0XcJ1x58l4LTVFupu4SKkEU1dt9IOwquN4ZaHxgXZpSQLRaNx9oldN WGbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BEMiwoqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id m21-20020a17090b069500b00280386ec042si10129681pjz.149.2023.11.27.08.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:46:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BEMiwoqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 35CAD80811CF; Mon, 27 Nov 2023 08:46:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232495AbjK0Qql (ORCPT + 99 others); Mon, 27 Nov 2023 11:46:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjK0Qqj (ORCPT ); Mon, 27 Nov 2023 11:46:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48BDF1A7 for ; Mon, 27 Nov 2023 08:46:46 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E395C433C9; Mon, 27 Nov 2023 16:46:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701103605; bh=n0YJy9MtG9wS5bcesamH5c9LR2unSin2xWzNq/0Yo4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BEMiwoqnqPHfKIey/prxi1QaKY8T63v3GV4yMmaOKw6+Ow9Fp5n4NcB89LKyYsZiO RS7uZjnGEngBxUWC9Lknj0vzG6clJFRSuiMj5R73QjJpDUqboTUCZtTjTORPDveakD YIP7Jy7HjqCjysVz80BBbrg74/JnBEJMMV/KjAeFyX3BbT3NClyXtZh0iaDeo0QUFs mJcuVnVvXgzY+EAx05oT9hppzbF/yD+igPNvt/eGYP9bxjRDnUboB6aR4YE3IgVSEJ DAZlYzPHtxizr5CwGr01yCY3hPMJeoH8AQGGmx3AmKkmidck9gMV7CvzMh0jCrm3H7 0p2jueQpkajxQ== Date: Mon, 27 Nov 2023 09:46:43 -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> <20231127155649.GA1403@lst.de> <20231127163333.GA2273@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127163333.GA2273@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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:46:57 -0800 (PST) On Mon, Nov 27, 2023 at 05:33:33PM +0100, Christoph Hellwig wrote: > On Mon, Nov 27, 2023 at 09:30:14AM -0700, Keith Busch wrote: > > > > 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. > > > > > > Reporting the tuple size is a good idea. But is that enough for > > > the existing nvme-cli use case? > > > > nvme-cli currently queries with admin passthrough identify command, so > > adding a new attribute won't break that. I assume Daniel would have it > > fallback to that same command for backward compatibilty if a desired > > sysfs attribute doesn't exist. > > Yes. But does it care about the tuple size, or the actual size of the > metadata field even if is bigger than the PI tuple? tuple_size is the same value as metadata size regardless of PI usage. See nvme_init_integrity() for how this driver sets it: integrity.tuple_size = ns->ms;