From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F034C433EF for ; Fri, 24 Jun 2022 01:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231191AbiFXBjn (ORCPT ); Thu, 23 Jun 2022 21:39:43 -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 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");