Received: by 10.213.65.68 with SMTP id h4csp467580imn; Tue, 13 Mar 2018 09:59:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELstbEYXPKzXp5IH7W2rUoFqwkrS3XwJ5xH+PvWhtJTp6Yt983HwDrew0fRvpBXFGfL2khRk X-Received: by 10.98.198.146 with SMTP id x18mr1293795pfk.22.1520960399388; Tue, 13 Mar 2018 09:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960399; cv=none; d=google.com; s=arc-20160816; b=P4gghwGVr8xk2pN8P6Ac17suYW1XpLKNbB9tdL6I9CPrKcFTM9ZJfxm0/UZ2ujfXvl WMxpWyb+EurTi4WOODogoRf1AsJUONq8/IIA5khsmsjXjfW+DMise9nT6T53GMWDGMoR eiyrfoeMjV2WKt4rW/oZJelso7yB7YL2ltpVJlqCEKE4l8SJIL4Nulk/O8LP8lzGRdm6 E9RarG5JgspFGbdFTcY9ll2d/kJuCnl2RdQU+4STHBWPSLplIqxZJt9gsMUDs7Xsxppa aAaNt4HsrzvdpOSyobIWEe6Y3vRA4+kD1D5pDlRYd0dDm7ueC59B7v6FZfiKJFnrB0/5 dvug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=vUhRA8dIadr6QCKmvnTMxUTsfIUhcWfhTz5h3M+yqLE=; b=LHZn/rfbGb7dDD1lg8tjlQWjAW9bpeghZg1gfBeTI3pKwkqW70sAeigc9KK/+GD/xZ L4U/IXgf8asanEQHjK6u2rjj3iw0rWbH33ultdV8QIOwvqQ8hdjtPC0Fy8EDioTaxyne dlLtdAv1CTxj3N5u7PYx/DC7bJLRQiOtVH420HfDo0JkkjaWnXB9dGk4Z1Nh9eEczOPr ktAtn/XE+e75nv5R5qGh8OZOCRtMrjjPzcKWTFUn+ozuhx49WngOuBYZuWPY/2v4WwAC dYOAyY+Hr9nGvW+hGVdAuPXHjsTepuWKQylN7NnfwxP/N7MEqo5eyzi+PEa2H0gOLXhV z99A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si321493pge.478.2018.03.13.09.59.45; Tue, 13 Mar 2018 09:59:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbeCMQ6S (ORCPT + 99 others); Tue, 13 Mar 2018 12:58:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58630 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbeCMPaC (ORCPT ); Tue, 13 Mar 2018 11:30:02 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 59B711034; Tue, 13 Mar 2018 15:30:01 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Potnuri Bharat Teja , Keith Busch Subject: [PATCH 4.15 056/146] Revert "nvme: create slaves and holders entries for hidden controllers" Date: Tue, 13 Mar 2018 16:23:43 +0100 Message-Id: <20180313152324.991971050@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christoph Hellwig commit 8a30ecc6e0ecbb9ae95daf499b2680b885ed0349 upstream. This reverts commit e9a48034d7d1318ece7d4a235838a86c94db9d68. The slaves and holders link for the hidden gendisks confuse lsblk so that it errors out on, or doesn't report the nvme multipath devices. Given that we don't need holder relationships for something that can't even be directly accessed we should just stop creating those links. Signed-off-by: Christoph Hellwig Reported-by: Potnuri Bharat Teja Cc: stable@vger.kernel.org Signed-off-by: Keith Busch Signed-off-by: Greg Kroah-Hartman --- drivers/nvme/host/core.c | 2 -- drivers/nvme/host/multipath.c | 30 ------------------------------ drivers/nvme/host/nvme.h | 8 -------- 3 files changed, 40 deletions(-) --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2950,7 +2950,6 @@ static void nvme_alloc_ns(struct nvme_ct if (new) nvme_mpath_add_disk(ns->head); - nvme_mpath_add_disk_links(ns); return; out_unlink_ns: mutex_lock(&ctrl->subsys->lock); @@ -2970,7 +2969,6 @@ static void nvme_ns_remove(struct nvme_n return; if (ns->disk && ns->disk->flags & GENHD_FL_UP) { - nvme_mpath_remove_disk_links(ns); sysfs_remove_group(&disk_to_dev(ns->disk)->kobj, &nvme_ns_id_attr_group); if (ns->ndev) --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -245,25 +245,6 @@ void nvme_mpath_add_disk(struct nvme_ns_ head->disk->disk_name); } -void nvme_mpath_add_disk_links(struct nvme_ns *ns) -{ - struct kobject *slave_disk_kobj, *holder_disk_kobj; - - if (!ns->head->disk) - return; - - slave_disk_kobj = &disk_to_dev(ns->disk)->kobj; - if (sysfs_create_link(ns->head->disk->slave_dir, slave_disk_kobj, - kobject_name(slave_disk_kobj))) - return; - - holder_disk_kobj = &disk_to_dev(ns->head->disk)->kobj; - if (sysfs_create_link(ns->disk->part0.holder_dir, holder_disk_kobj, - kobject_name(holder_disk_kobj))) - sysfs_remove_link(ns->head->disk->slave_dir, - kobject_name(slave_disk_kobj)); -} - void nvme_mpath_remove_disk(struct nvme_ns_head *head) { if (!head->disk) @@ -278,14 +259,3 @@ void nvme_mpath_remove_disk(struct nvme_ blk_cleanup_queue(head->disk->queue); put_disk(head->disk); } - -void nvme_mpath_remove_disk_links(struct nvme_ns *ns) -{ - if (!ns->head->disk) - return; - - sysfs_remove_link(ns->disk->part0.holder_dir, - kobject_name(&disk_to_dev(ns->head->disk)->kobj)); - sysfs_remove_link(ns->head->disk->slave_dir, - kobject_name(&disk_to_dev(ns->disk)->kobj)); -} --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -405,9 +405,7 @@ bool nvme_req_needs_failover(struct requ void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl); int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl,struct nvme_ns_head *head); void nvme_mpath_add_disk(struct nvme_ns_head *head); -void nvme_mpath_add_disk_links(struct nvme_ns *ns); void nvme_mpath_remove_disk(struct nvme_ns_head *head); -void nvme_mpath_remove_disk_links(struct nvme_ns *ns); static inline void nvme_mpath_clear_current_path(struct nvme_ns *ns) { @@ -448,12 +446,6 @@ static inline void nvme_mpath_add_disk(s static inline void nvme_mpath_remove_disk(struct nvme_ns_head *head) { } -static inline void nvme_mpath_add_disk_links(struct nvme_ns *ns) -{ -} -static inline void nvme_mpath_remove_disk_links(struct nvme_ns *ns) -{ -} static inline void nvme_mpath_clear_current_path(struct nvme_ns *ns) { }