Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2252184rdb; Fri, 8 Dec 2023 02:54:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHUd0yGpR7rxQDK/ht6ZBhthVsXS0rBnhmbY9XDCtxVpu+lNmuQ5uZBUAb2byOtRMNPhYG X-Received: by 2002:a17:902:f681:b0:1d0:7d9e:e727 with SMTP id l1-20020a170902f68100b001d07d9ee727mr4242291plg.14.1702032865116; Fri, 08 Dec 2023 02:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702032865; cv=none; d=google.com; s=arc-20160816; b=eFtjxb+UEeo8jg6sH1Dp2ELyF6+peeGW/mbzX8AEQ9WZAFJCEq+OM2s8u6ggbMqf17 j7HJV9bk8xJ/Q1q929lEZxq1ciGohgGJeSD8eJO2lSL+c996rYcXIe9rD5T4IBdQXjpE 5mFCMFfv0/Khce2lIz25uNON4P8wuHujZF27D5cH8c6gjD3nat5BwpZjuacZoLw3X+R/ jJRgn1MAkdRgsWTx4zf7UG4lUoqt1VIfZ6aBNNKMRzVwGFI1LdiFDMIMg3ojrW31v98T yrPSl3EvElU+uN8IwePx0QlBtf8HfCaIKLNbGAsCGeGBhXM1pXAZUumq3rC1vb5lZoGP VDoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=GomM3EpyG/paTprJTV6m4GXtr6dHAbVPRpRzOGdAVqo=; fh=DJbT8ne4Efjik5M2lT8AzCh46QRFyMX3tPkPd3UGLh8=; b=oL94I1ZKzw920ImlHG4x5bnSjbsv6I/nPUfz/ib3H/Lbm4adTqwxu1ePHv4IqB/jiS BGhnfgXaeazdydYwL/POzlwofIcW79NU4dJPyT1QFxyzc9k6ta9+LmtsyS0Ojabo+MNV QohpJSvXV3GQGcJCyKvFMyO69EJVUg42xlIsb9RyoH+BjLpUHgTaxpp+n551yCHBBxSe L7HaM0HNkIKSHfFdFuxWaMbAalKqyTLfTIntW0pZHoAal7e/DAsNm4pl1YH5LRY/6EIu BD8IWt4RW5Vjkb6iGDtUOOjtTj0AxDZF3lm1L4BFSKmqtoY/xqVprXeGyFYj83dpsoEk yEZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UXDBekQc; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=LleqCbSb; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UXDBekQc; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id o12-20020a170902bccc00b001cc692bf120si1381692pls.61.2023.12.08.02.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 02:54:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UXDBekQc; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=LleqCbSb; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UXDBekQc; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4789A8242F5B; Fri, 8 Dec 2023 02:54:20 -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 S1573740AbjLHKxu (ORCPT + 99 others); Fri, 8 Dec 2023 05:53:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573661AbjLHKxj (ORCPT ); Fri, 8 Dec 2023 05:53:39 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB21B171D for ; Fri, 8 Dec 2023 02:53:45 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 511DA1F38E; Fri, 8 Dec 2023 10:53:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702032824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GomM3EpyG/paTprJTV6m4GXtr6dHAbVPRpRzOGdAVqo=; b=UXDBekQcmFR08RFL28KodkDcqEQkQGIpXUn7g6M/mMnWc/Dh5K594rtDdwL7vmpQ2pWacB 7ScjStpGxflx5/3HurNLA1W6KLw/S4e8NPvh9KYqSOxN7IJUbB+eezn2ASApFuzPAKAyQZ twV/BxGf8dXBTDTNKoDAOwYArwAsPkY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702032824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GomM3EpyG/paTprJTV6m4GXtr6dHAbVPRpRzOGdAVqo=; b=LleqCbSbmHNTeIXlM2Ku2YVt1kweVlWKeT2HzehpwoVz3bStCk6LAj2Ld7fSGd3qpLuQv6 iu+fe3w+VnwM0PDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702032824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GomM3EpyG/paTprJTV6m4GXtr6dHAbVPRpRzOGdAVqo=; b=UXDBekQcmFR08RFL28KodkDcqEQkQGIpXUn7g6M/mMnWc/Dh5K594rtDdwL7vmpQ2pWacB 7ScjStpGxflx5/3HurNLA1W6KLw/S4e8NPvh9KYqSOxN7IJUbB+eezn2ASApFuzPAKAyQZ twV/BxGf8dXBTDTNKoDAOwYArwAsPkY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702032824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GomM3EpyG/paTprJTV6m4GXtr6dHAbVPRpRzOGdAVqo=; b=LleqCbSbmHNTeIXlM2Ku2YVt1kweVlWKeT2HzehpwoVz3bStCk6LAj2Ld7fSGd3qpLuQv6 iu+fe3w+VnwM0PDQ== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 3DDD3138FF; Fri, 8 Dec 2023 10:53:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id oAyqDbj1cmU5VgAAn2gu4w (envelope-from ); Fri, 08 Dec 2023 10:53:44 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Keith Busch , Christoph Hellwig , Sagi Grimberg , Hannes Reinecke , Daniel Wagner Subject: [PATCH v5 4/6] nvme: rename ns attribute group Date: Fri, 8 Dec 2023 11:53:35 +0100 Message-ID: <20231208105337.23409-5-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231208105337.23409-1-dwagner@suse.de> References: <20231208105337.23409-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spam-Score: 0.70 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: 0.70 X-Spamd-Result: default: False [0.70 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 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]); Fri, 08 Dec 2023 02:54:20 -0800 (PST) Drop the 'id' part of the attribute group name because we want to expose non 'id' related attributes via the ns attribute group. Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner --- drivers/nvme/host/core.c | 2 +- drivers/nvme/host/multipath.c | 2 +- drivers/nvme/host/nvme.h | 2 +- drivers/nvme/host/sysfs.c | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 2468076d64c6..c537914b75e3 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3674,7 +3674,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info) up_write(&ctrl->namespaces_rwsem); nvme_get_ctrl(ctrl); - if (device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups)) + if (device_add_disk(ctrl->device, ns->disk, nvme_ns_attr_groups)) goto out_cleanup_ns_from_list; if (!nvme_ns_head_multipath(ns->head)) diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 0a88d7bdc5e3..2dd4137a08b2 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -579,7 +579,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns) */ if (!test_and_set_bit(NVME_NSHEAD_DISK_LIVE, &head->flags)) { rc = device_add_disk(&head->subsys->dev, head->disk, - nvme_ns_id_attr_groups); + nvme_ns_attr_groups); if (rc) { clear_bit(NVME_NSHEAD_DISK_LIVE, &ns->flags); return; diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index eb748cc3e897..b783b37328fa 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -870,7 +870,7 @@ int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd, int nvme_getgeo(struct block_device *bdev, struct hd_geometry *geo); int nvme_dev_uring_cmd(struct io_uring_cmd *ioucmd, unsigned int issue_flags); -extern const struct attribute_group *nvme_ns_id_attr_groups[]; +extern const struct attribute_group *nvme_ns_attr_groups[]; extern const struct pr_ops nvme_pr_ops; extern const struct block_device_operations nvme_ns_head_ops; extern const struct attribute_group nvme_dev_attrs_group; diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c index c6b7fbd4d34d..d682d0a667a0 100644 --- a/drivers/nvme/host/sysfs.c +++ b/drivers/nvme/host/sysfs.c @@ -114,7 +114,7 @@ static ssize_t nsid_show(struct device *dev, struct device_attribute *attr, } static DEVICE_ATTR_RO(nsid); -static struct attribute *nvme_ns_id_attrs[] = { +static struct attribute *nvme_ns_attrs[] = { &dev_attr_wwid.attr, &dev_attr_uuid.attr, &dev_attr_nguid.attr, @@ -127,7 +127,7 @@ static struct attribute *nvme_ns_id_attrs[] = { NULL, }; -static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj, +static umode_t nvme_ns_attrs_are_visible(struct kobject *kobj, struct attribute *a, int n) { struct device *dev = container_of(kobj, struct device, kobj); @@ -157,13 +157,13 @@ static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj, return a->mode; } -static const struct attribute_group nvme_ns_id_attr_group = { - .attrs = nvme_ns_id_attrs, - .is_visible = nvme_ns_id_attrs_are_visible, +static const struct attribute_group nvme_ns_attr_group = { + .attrs = nvme_ns_attrs, + .is_visible = nvme_ns_attrs_are_visible, }; -const struct attribute_group *nvme_ns_id_attr_groups[] = { - &nvme_ns_id_attr_group, +const struct attribute_group *nvme_ns_attr_groups[] = { + &nvme_ns_attr_group, NULL, }; -- 2.43.0