Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp322391lqo; Fri, 10 May 2024 00:19:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQZPvJPmgUoomAdmuOu7RlOYd0fCQBqvUj7cw3GSKOnUCtXtUfjhYzP+lomA3VJTiLqbBX53kE+YP3RL7yccICzqrfolE/Uz6xWU+LOw== X-Google-Smtp-Source: AGHT+IG8KbX1cQSAGzit/sX11ENSx8tYF5vVKDrjUr08dx6HVUBOzSWP4KrK4eDxMpAkOrTS4QuS X-Received: by 2002:a17:906:fa8c:b0:a55:554b:1f5d with SMTP id a640c23a62f3a-a5a2d5d3597mr108464266b.41.1715325592464; Fri, 10 May 2024 00:19:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715325592; cv=pass; d=google.com; s=arc-20160816; b=0aGWJOReVrnJSVuM0BQVXE3FFNZkW/NipeHwAq761KIhfLsTTlhV/MI0jJvv5HYsIt ppmfzWgZBHpbLtctsWhSv0DTUmsQPJ7fMm6L/RQytL4lZRd8FpB2+Hvu0qvyRXtulW8B 535wS0lnwiFn3PDsyIVBO+ODDsrJVgNR/RlnwoTwJG6ASBX8dbIF8+AW9nWux30WHJRc 6Qq5NoLGG5hDZqIHGgTZYms8TGXDyn5lTENXrlhiibf1sWYPXR0be2ZR0hRdRfpoepen 6IL59GhMO4K5urJhETw4wl7LFb0+xWHv6hQA/EBxnXfEEiliNu3cvl8qC1VHWCANI+9J A9JA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=iAS/Kp2bHj3YZ9MWyY1P9+6qAbCULfe3872Ku8hkGbU=; fh=X4iTOAIHvfWq0hn/HKsdRPJq5udcG6B/2OttivBZETE=; b=0UU3bO/Mb3oXeTzBNUTN21F2Jg0HtxzCUEOMULb0WZLFl3GwPUKKr5KORtTvkv2W2Q 4OU9ZvpPj3HY1JiL0D0nT3Fej/63CVDp58YgK4jcS3VL3ORO1ynozuphLAVgqOt7iFtd 1Bnt8Lf5z4TongZiAhhEaqD/3PdGaDdCs7oojvFfGeO9X8YCTfKXgyOdo27NYD8kcncl ENZ/QxLKRizPSB7qvP+8s/uOEMEHzeehpyEI+JtokkG73T6B7GbdCIID2M8mkyaxki8e IxxX8jMkSNEe2gGzimxUFC9u75mbiZ0hiGvpN4aZorM/jRjUdBAc6dZ/7n5C+yoetS0m 8daw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XqkCokKp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba39a1si179803566b.518.2024.05.10.00.19.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 00:19:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XqkCokKp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-175395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id EE5421F21C0E for ; Fri, 10 May 2024 07:19:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E09715ECEC; Fri, 10 May 2024 07:19:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XqkCokKp" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C07E61DFEA; Fri, 10 May 2024 07:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715325579; cv=none; b=VxnyqJhUe7mAul7nmR9Mqb2yp2Tl+u7la3gDGQEjDDhsiIDXLGvHEsul0MXBTFBHC/r1qMUbwEmXKwoTzA/y8G5o8hk/uPBPDUk6tmruaoUyo64eHvM+PPDcM5xstVUcwLz3Au09NSuI1mBmaq/eRza3K5rPjzJk+C/yptktHdQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715325579; c=relaxed/simple; bh=SArSvmFrU4xzTpk/q0k2FSyZRlXsa+EKseXL4ao2Wfg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PFQdKZgJ6pFm3/ngzttCzA40dk5ViGi4eg8J78LIt0Sd+kzbpJrS3nQ/ufRY8Bq0o2qT3MW9sWzXu8F8hmKPmskPWSGAb645ZpLO4mGi/SWH2STByW3Y/D96Fe0UPrZyE39GP6Y30OYPGcX13XRM6HLRkog/P10F/UkyGO7q7Jg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XqkCokKp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E5BAC113CC; Fri, 10 May 2024 07:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715325579; bh=SArSvmFrU4xzTpk/q0k2FSyZRlXsa+EKseXL4ao2Wfg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XqkCokKpj7bmZLvsJn0DvwzMdVG3W9jhKgTCwMtZqc+uyePLZWw9Zupm2DAuLjgae jFnqcNfR4UEn2EGZEqK65UY4UZuBcLhKdvPfmumX4Sle6HLCIXRxYo+L8bpHzPP3mn hoa+ZI83GiPtCgoZOMfMN6lYS8oa36X5KRiDWImga/Uk/Gog3f+WkXdZxjVAhjxXId FUTYiMy88x1qrQFXOUQ5+qTFU2ch2x/bT3K/GDJtBBdCJmAmQtCH7lq1Q04ci0e3BS 0AmRZnWQz3fNWAANyKjunD9DS/FQ/r65qSgILVl3WY6OwvozsEo8IomaJUBSWFiwba dbFIqmZ8YLFSA== Message-ID: Date: Fri, 10 May 2024 16:19:36 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/3] nvme: multipath: pr_notice when iopolicy changes To: John Meneghini , 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, jrani@purestorage.com, randyj@purestorage.com, aviv.coro@ibm.com References: <20240403141756.88233-1-hare@kernel.org> <20240509204324.832846-4-jmeneghi@redhat.com> Content-Language: en-US From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20240509204324.832846-4-jmeneghi@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/10/24 05:43, John Meneghini wrote: > 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); No need for the white line before this. > + > 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); Using dev_notice(&subsys->dev, "...", ...); may be better. Same for the other messages. > } > > static ssize_t nvme_subsys_iopolicy_store(struct device *dev, -- Damien Le Moal Western Digital Research