All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: Enlarge log buffer length to 256
@ 2022-06-24  1:25 Li Zhijian
  2022-06-24  1:39 ` Finn Thain
  0 siblings, 1 reply; 3+ messages in thread
From: Li Zhijian @ 2022-06-24  1:25 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, linux-scsi
  Cc: linux-kernel, Li Zhijian

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 <lizhijian@fujitsu.com>
---
 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);
 }
 
-- 
2.31.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: Enlarge log buffer length to 256
  2022-06-24  1:25 [PATCH] scsi: Enlarge log buffer length to 256 Li Zhijian
@ 2022-06-24  1:39 ` Finn Thain
  2022-06-28  9:38   ` Li, Zhijian
  0 siblings, 1 reply; 3+ messages in thread
From: Finn Thain @ 2022-06-24  1:39 UTC (permalink / raw)
  To: Li Zhijian
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi, linux-kernel


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 <lizhijian@fujitsu.com>
> ---
>  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");

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: Enlarge log buffer length to 256
  2022-06-24  1:39 ` Finn Thain
@ 2022-06-28  9:38   ` Li, Zhijian
  0 siblings, 0 replies; 3+ messages in thread
From: Li, Zhijian @ 2022-06-28  9:38 UTC (permalink / raw)
  To: fthain; +Cc: jejb, linux-kernel, linux-scsi, lizhijian, martin.petersen


Sorry for the late reply. (Strange! this reply didn't arrive to my mailbox)

> 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 <lizhijian@fujitsu.com> 
> > --- > 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.
Yes, it's an option. if no objection, i will apply your suggestion in 
24h later. hahaha :)

Thanks
Zhijian


>
> 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");




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-28  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24  1:25 [PATCH] scsi: Enlarge log buffer length to 256 Li Zhijian
2022-06-24  1:39 ` Finn Thain
2022-06-28  9:38   ` Li, Zhijian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.