Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6397742iog; Thu, 23 Jun 2022 18:53:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sMKfA3BBr5wjG/JAH3WOa0LmxXLKIZR0PzINCgVJe2AdV+UYbZGxciQTLnt+ZtlK9YJMCu X-Received: by 2002:a17:902:f681:b0:16a:4ca8:65e2 with SMTP id l1-20020a170902f68100b0016a4ca865e2mr9851919plg.63.1656035605919; Thu, 23 Jun 2022 18:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656035605; cv=none; d=google.com; s=arc-20160816; b=cMMR/F01UrjyHUKcYnK8xn52uVeHWFyTv1a+7wNz3DJc/reUBIkgx7eE2K1MG6V/lc dNKGpNlqGpk9WpzAFePl3JlLHM9t6gB/WbU4N+ZPZyyZw2I+gGup3aOZiKwtLc79wG1N bLK/T8TFPFqza9YWvtoOx4X/uj9Zc9lh+t5GfwjCiEIGauxGEd7J1kqKDfjvvdrw8Hjw KfzNmJCorcKH0fXuE5UdJFNrZPbO2kz3zrt1gpFZCsDBJHavhwKvkvfVFIiiN4lfsnQ/ HZQumfjFnhacKsjdkf3eXhoUfLEyAuZqtrH+T6V76M5Vvj+MYuFPu0eSkwYPq9B++0KD m/2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:feedback-id:dkim-signature; bh=565TWR/uy2A0QxlobJCGVdPrSxTkrfuJfZYcREIrUeo=; b=khHPBNbiwvbTlJnTHP5+xHChMNEXIDM7pmSRdBa/3drP233mXN6pHxr33Kyjg3HMz+ j5+tAtFXZcog5FJazpc8gF0XToMf8vzi43ToBHhwlxF7T8pfFlnzfR5fDu2+ah7EXOqI dO6u0FNwmC9defCljZixEIQozHgatsH5vJDxRXQTB2RBVp3ikxtjuT4ZYquN4cXJZis5 8VOKCPJcw+Mc4PuyKIqmljKFeOP2O993TTQ+3JEvQgk0jfglRj3AIbcFCAqIuOz5WzlP Xm8jX1XiKB+1Rs7RagcUEbCRzQqzOxiB3H9jh2RrA81O1NfGu7uFrI1hd47+aHat7QQb MCwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=MZYy8O0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020a056a0010c700b0050d4265128dsi993890pfu.313.2022.06.23.18.53.14; Thu, 23 Jun 2022 18:53:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=MZYy8O0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbiFXBjm (ORCPT + 99 others); Thu, 23 Jun 2022 21:39:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiFXBjl (ORCPT ); Thu, 23 Jun 2022 21:39:41 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06CF56C17; Thu, 23 Jun 2022 18:39:39 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 81E815C0186; Thu, 23 Jun 2022 21:39:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 23 Jun 2022 21:39:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1656034777; x=1656121177; bh=565TWR/uy2A0QxlobJCGVdPrSxTk rfuJfZYcREIrUeo=; b=MZYy8O0KJEwXEMZ8aazL1zILdov7ZnG7azysEGnZ1lJr A68IPbgIjmhkShae+eeUEqKjFVR5mtejFtrivBmUnHvJUK3vERL9pOxyHiphins6 UW9YvO+DBkjXR1kryvZwVwonpA3azs5fz+BKUIJim53PZ5IDLChEIUInWEP3XP19 0ix3Gl+ePef4Ajr14gN8aHzS3bU/2rCQvClkSY0ZT1Zjy7uyT7sIBNitnGUQLM5q QslErpMB8aEQ45M7sAbLrqaBZKLvxXY6UjX4ZHp4KOjhSeL9gfH+62TiG03cjLZD UaCflCv7JbgyTqvgokDq9gn7j3sKVH3ddwCG816U3Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefkedghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevufgjkfhfgggtsehttdertddttddvnecuhfhrohhmpefhihhnnhcu vfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrg htthgvrhhnpeelueehleehkefgueevtdevteejkefhffekfeffffdtgfejveekgeefvdeu heeuleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hfthhhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Jun 2022 21:39:34 -0400 (EDT) Date: Fri, 24 Jun 2022 11:39:32 +1000 (AEST) From: Finn Thain To: Li Zhijian cc: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: Enlarge log buffer length to 256 In-Reply-To: <20220624012542.1384858-1-lizhijian@fujitsu.com> Message-ID: <9831381e-f9c7-f7af-e6da-a757a76f34@linux-m68k.org> References: <20220624012542.1384858-1-lizhijian@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 24 Jun 2022, Li Zhijian wrote: > scsi_report_sense() is possble to print messages exceeding 128 bytes: > [ 475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatical > > Signed-off-by: Li Zhijian > --- > drivers/scsi/scsi_logging.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/scsi_logging.c b/drivers/scsi/scsi_logging.c > index b02af340c2d3..edc3fe8c7e0f 100644 > --- a/drivers/scsi/scsi_logging.c > +++ b/drivers/scsi/scsi_logging.c > @@ -17,7 +17,7 @@ > > static char *scsi_log_reserve_buffer(size_t *len) > { > - *len = 128; > + *len = 256; > return kmalloc(*len, GFP_ATOMIC); > } > Perhaps it's better to waste fewer words (both kinds). E.g. diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 49ef864df581..e7283bf23db3 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -463,13 +463,11 @@ static void scsi_report_sense(struct scsi_device *sdev, evt_type = SDEV_EVT_LUN_CHANGE_REPORTED; scsi_report_lun_change(sdev); sdev_printk(KERN_WARNING, sdev, - "Warning! Received an indication that the " "LUN assignments on this target have " "changed. The Linux SCSI layer does not " "automatically remap LUN assignments.\n"); } else if (sshdr->asc == 0x3f) sdev_printk(KERN_WARNING, sdev, - "Warning! Received an indication that the " "operating parameters on this target have " "changed. The Linux SCSI layer does not " "automatically adjust these parameters.\n");