Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1736678rdb; Thu, 7 Dec 2023 07:32:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgPI8R+2HNPljjhy3kq0tvKqONOWjX8WAUjlKhSvjGkLI60z5DfCygnP+xPn0cVipBZpxs X-Received: by 2002:a17:903:2308:b0:1d0:b3f5:c30c with SMTP id d8-20020a170903230800b001d0b3f5c30cmr3192230plh.98.1701963119653; Thu, 07 Dec 2023 07:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963119; cv=none; d=google.com; s=arc-20160816; b=M0tp2hkHrO2S7KC2dRkF7KyNC5ZGpISYCEjHVsQbd9s6X6Kr7ecR6hZFqGFzRBtGQD 0rzCXajCR6nGDEx1qx+A6gqpTkxlQlrnNKhzobIWGZjKlNUMM8qnBDhv3hI7cmpxY4uw vpsHlNKXzd7ygW2smwz3pIYklhXbA4sX2BVouLk/aLCDeSB+uGMgxx0U7GVnekavTyuO 0+uTVNPQJO39Ax4H9HxM7HeWzia61YYVg1kJfSHblc9QMVWNwH4sxoQ2P66cz6IIgaaL rz4117uC6bmHEaKQdSJJJTqlAvXYVa6S91EazaR9mcXBt5MRCbPUQPQMfP0z4WNNzqSs gCgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=11eF6S3UsLuAQLuoHLt5sJMbkNxdrTEW7lesrH0LoHI=; fh=JWieladFfeaIwBj69e66MtYgIw576fUcTLVAEUXiV9w=; b=pR80OvW2oYZkJbvmrFqmZnZxjN6tl4j9DE0TUhnAw5sc3fYQIPW6iQD3Tveu1KvFXf SI+91r3npQmXubGlTK29I9WLajdA0dLS6xIFHXvTcI+B1DFoLVCNxlkwjKvgkuQFWHVf AQ6nLC1d9todN2094n2AQX8UVzr1fy3nLmZXGEpvwaaMNIVmtB+F17nv0611bqoTSFIg ieXUhnaodqSDaQ9Hjv9PK6kik9fSXUrBKMKZtpAyoESviTHXYmSquHJfOWk4rH+/2jJt +q1EzrhfZ87elY0JImdv/fLxYllhL68hcBL7kneFkNrDvMJMZeBRxPUNV2/77Dk7LjHm f93w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id jh3-20020a170903328300b001d0bf633521si1298222plb.125.2023.12.07.07.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:31: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; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2300F80239ED; Thu, 7 Dec 2023 07:31: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 S1443545AbjLGPbl (ORCPT + 99 others); Thu, 7 Dec 2023 10:31:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443516AbjLGPbg (ORCPT ); Thu, 7 Dec 2023 10:31:36 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09A9C10F9 for ; Thu, 7 Dec 2023 07:31:41 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 8CF6A227A87; Thu, 7 Dec 2023 16:31:38 +0100 (CET) Date: Thu, 7 Dec 2023 16:31:38 +0100 From: Christoph Hellwig To: Daniel Wagner Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Keith Busch , Christoph Hellwig , Sagi Grimberg , Hannes Reinecke Subject: Re: [PATCH v4 0/4] nvme: add csi, ms and nuse to sysfs Message-ID: <20231207153138.GA20644@lst.de> References: <20231207123624.29959-1-dwagner@suse.de> <20231207123624.29959-4-dwagner@suse.de> <20231207123624.29959-1-dwagner@suse.de> <20231207123624.29959-4-dwagner@suse.de> <20231207123624.29959-1-dwagner@suse.de> <20231207123624.29959-3-dwagner@suse.de> <20231207123624.29959-1-dwagner@suse.de> <20231207123624.29959-2-dwagner@suse.de> <20231207123624.29959-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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]); Thu, 07 Dec 2023 07:31:57 -0800 (PST) Hi Daniel, this looks generally good to me. A few comments, all but one are cosmetic. > @@ -1676,9 +1678,9 @@ static void nvme_init_integrity(struct gendisk *disk, struct nvme_ns *ns, This an now take the ns_head instead of the ns. > @@ -1776,11 +1778,11 @@ static int nvme_init_ms(struct nvme_ns *ns, struct nvme_id_ns *id) This can take a ctrl and ns_head instead of the ns. > @@ -1835,8 +1837,8 @@ static int nvme_configure_metadata(struct nvme_ns *ns, struct nvme_id_ns *id) This as well after updating nvme_ns_has_pi to take the ns_head. > @@ -1898,7 +1900,7 @@ static void nvme_update_disk_info(struct gendisk *disk, > struct nvme_ns *ns, struct nvme_id_ns *id) This as well after fixing up nvme_lba_to_sect to take the ns_head. > @@ -2052,7 +2055,7 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns, This one as well. > @@ -128,7 +129,7 @@ static void *nvme_zns_alloc_report_buffer(struct nvme_ns *ns, > sizeof(struct nvme_zone_descriptor); > > nr_zones = min_t(unsigned int, nr_zones, > - get_capacity(ns->disk) >> ilog2(ns->zsze)); > + get_capacity(ns->head->disk) >> ilog2(ns->head->zsze)); This doesn't work, as the head disk doesn't exist for !multipath setups. > @@ -162,7 +163,7 @@ static int nvme_zone_parse_entry(struct nvme_ns *ns, This could do with ctrl + ns_head now