Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2847013lqo; Tue, 14 May 2024 10:54:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7JczmfmyYYD3UY3WsgZ+b3mOeoj9b7ZM5QOOeXodA0TTUXnHNQQ+G8ucJe/DWQK5ZCfN5ue+xVs4DQXiEjb0+fHOMOXGobmMYbvTCcA== X-Google-Smtp-Source: AGHT+IHXKeL+1FiikuTi3otbwc33qM6zGvtQKj4oj+jCEeTjc6vT5QpBu5iTBwtQwDJobj2s3WTV X-Received: by 2002:a05:6358:5694:b0:18d:b8bf:dff with SMTP id e5c5f4694b2df-193baed816cmr1359712555d.0.1715709273352; Tue, 14 May 2024 10:54:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715709273; cv=pass; d=google.com; s=arc-20160816; b=dkpLMr6ykwW39J/JCB6PpCFFYof8SkIKm74bVSLLiHdrcEdWg+bHqMd0lcB1LreJQ9 6/S87JcBcZWpa8iDUFI/EJiYVT0Z2HsJOrIcVRZUjf9/TckXQjaDgbmt8pNYubXk5PQ/ fSaFyhPQQS5a1sLKLXC4RklB5ZIRPTDoBi9th0yl8CMQi3oiV2ndYTmqtMJGKfHovmgZ DI2OQhcFCREp4YWna6sm5rcbL1rIfSzkyIuIAvis/FQllPqL7mBNXerMlE7TmUwGyHN4 8zNdUlvjuBOUTPaPkZmzomWgFstSk43gJSZkiF1tElaWj0H9zvMvWlZHQ7m7tG0XR9lP duiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=J8WReQiv4GBqlDuegj32JcgtpHrEsWG68ox5pprOL3Y=; fh=Vp5A/OTKD3gdjg3xHfOo+qidg2bVYgeElaNdFREia74=; b=Lf/qQdYiNPY+7Bldz/1RQH9jomMBASjZYD0wAWwnoj8fR+wNDcBNtRvoPj8v0cGsdQ SlzTjGycZdLiZkTKkMzRKYETG5ONh7r0VIpZLqznciHnFsB6AZ5kP4rPcaZvGo4XoyFn fqdTV35vTLIsFrYGaZTEkqTHbrR2SdWT7TmIxjkk/jFMbUhALW/4r274vuLyxCAc3Nb6 gfNMTetUXyKyLV8VfvNWG37piDy6eY3AtFq3vb6NPFLCNZVwo7JGJaf8PxacJ3klh4ux f3ZI/CaAOwIzN8ZkL9RHcqE71MCi4XjkqKnwJBQlT8H+FM4aaanwlsgcCPhHMovv2cJr Km6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H+QZPFSo; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-179024-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63411902ea1si11177428a12.601.2024.05.14.10.54.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 10:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179024-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H+QZPFSo; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-179024-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C83E281D2C for ; Tue, 14 May 2024 17:54:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E7D218132F; Tue, 14 May 2024 17:53:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H+QZPFSo" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB022181307 for ; Tue, 14 May 2024 17:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715709222; cv=none; b=eQukMzuuERbRtHzGLIG2B/1pWZiNJSRqASIIe+0qtDa7tYLwLfUr5aYNRqtKAt8LDXPKBdg2IeLjBv+YLZdl/ZGu1Dz23xQTdpEmCOpV4a2aMn49zlj6FfB8YGXA/fQawhatxDJRTYkAhBtbgO0DgpAFtEi1HS8v4reiCUHDHxs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715709222; c=relaxed/simple; bh=29Ogzu8HUgDu3PF9FKvjcGb+SavKhmrv7g+xDkNBUkY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-type; b=n+u4mqnMNyirs9t+nDisLkUvw8aHRJNAQ/ec2ZQFGGbGjk9CQX30eyS4/ndMHLDU7eeP9D/AfSRolKdCdBg6feSBwwWnObGJG8LsVWKzQOoVfrwzhdDzTY5DKtNzNkYlpKI7ObbrjOurkAZLlNp8qvTTT90EGiqqUhMmRk5CsyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=H+QZPFSo; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715709220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J8WReQiv4GBqlDuegj32JcgtpHrEsWG68ox5pprOL3Y=; b=H+QZPFSohMIki4oHu8rhha/RnYOE0Ow+Fe08dLlpFN2Ya/IJErvO8Tzvnp1fFOav4zWgro sIbKKe2JnToOA24vLAzEflM1G1xmDUXH6yE5+2rQ6QhDvm2fl1YUg3BIvC7WiNeLNiya6u K4ZHDpKwdl23egNhrinoC2SP0ZwToOg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-494-qrfXvdWFNuuPCZl6fv1CTg-1; Tue, 14 May 2024 13:53:36 -0400 X-MC-Unique: qrfXvdWFNuuPCZl6fv1CTg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E2D1229AA2C9; Tue, 14 May 2024 17:53:35 +0000 (UTC) Received: from jmeneghi.bos.com (unknown [10.2.17.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id A433A400057; Tue, 14 May 2024 17:53:34 +0000 (UTC) From: John Meneghini To: tj@kernel.org, josef@toxicpanda.com, axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, emilne@redhat.com, hare@kernel.org Cc: linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, jmeneghi@redhat.com, jrani@purestorage.com, randyj@purestorage.com Subject: [PATCH v4 6/6] nvme: multipath: pr_notice when iopolicy changes Date: Tue, 14 May 2024 13:53:22 -0400 Message-Id: <20240514175322.19073-7-jmeneghi@redhat.com> In-Reply-To: <20240514175322.19073-1-jmeneghi@redhat.com> References: <20240514175322.19073-1-jmeneghi@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 Send a pr_notice when ever the iopolicy on a subsystem is changed. This is important for support reasons. It is fully expected that users will be changing the iopolicy with active IO in progress. Signed-off-by: John Meneghini --- drivers/nvme/host/multipath.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index e9330bb1990b..0286e44a081f 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -67,6 +67,10 @@ static int nvme_activate_iopolicy(struct nvme_subsystem *subsys, int iopolicy) } } mutex_unlock(&subsys->lock); + + pr_notice("%s: %s enable %d status %d for subsysnqn %s\n", __func__, + nvme_iopolicy_names[iopolicy], enable, ret, subsys->subnqn); + return ret; } @@ -890,6 +894,8 @@ void nvme_subsys_iopolicy_update(struct nvme_subsystem *subsys, int iopolicy) { struct nvme_ctrl *ctrl; + int old_iopolicy = READ_ONCE(subsys->iopolicy); + WRITE_ONCE(subsys->iopolicy, iopolicy); mutex_lock(&nvme_subsystems_lock); @@ -898,6 +904,10 @@ void nvme_subsys_iopolicy_update(struct nvme_subsystem *subsys, int iopolicy) nvme_mpath_clear_ctrl_paths(ctrl); } mutex_unlock(&nvme_subsystems_lock); + + pr_notice("%s: changed from %s to %s for subsysnqn %s\n", __func__, + nvme_iopolicy_names[old_iopolicy], nvme_iopolicy_names[iopolicy], + subsys->subnqn); } static ssize_t nvme_subsys_iopolicy_store(struct device *dev, -- 2.39.3