All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: target: core: Silence the message about unknown VPD pages
@ 2022-04-18 21:26 Konstantin Shelekhin
  2022-04-19  3:08 ` Martin K. Petersen
  2022-05-03  0:51 ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Konstantin Shelekhin @ 2022-04-18 21:26 UTC (permalink / raw)
  To: Martin Petersen, Mike Christie, target-devel
  Cc: linux-scsi, linux, Konstantin Shelekhin

Target does not support some VPD pages and is very verbose about it.
Sometimes initiators don't bother and just keep sending the same request
from time to time, filling up the logs.

This patch lowers the message priority to debug.

Signed-off-by: Konstantin Shelekhin <k.shelekhin@yadro.com>
---
 drivers/target/target_core_spc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index 4c76498d3fb0..c14441c89bed 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -769,7 +769,7 @@ spc_emulate_inquiry(struct se_cmd *cmd)
 		}
 	}
 
-	pr_err("Unknown VPD Code: 0x%02x\n", cdb[2]);
+	pr_debug("Unknown VPD Code: 0x%02x\n", cdb[2]);
 	ret = TCM_INVALID_CDB_FIELD;
 
 out:
-- 
2.35.1


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

* Re: [PATCH] scsi: target: core: Silence the message about unknown VPD pages
  2022-04-18 21:26 [PATCH] scsi: target: core: Silence the message about unknown VPD pages Konstantin Shelekhin
@ 2022-04-19  3:08 ` Martin K. Petersen
  2022-04-19  8:29   ` Konstantin Shelekhin
  2022-05-03  0:51 ` Martin K. Petersen
  1 sibling, 1 reply; 4+ messages in thread
From: Martin K. Petersen @ 2022-04-19  3:08 UTC (permalink / raw)
  To: Konstantin Shelekhin
  Cc: Martin Petersen, Mike Christie, target-devel, linux-scsi, linux


Konstantin,

> Target does not support some VPD pages and is very verbose about it.
> Sometimes initiators don't bother and just keep sending the same
> request from time to time, filling up the logs.
>
> This patch lowers the message priority to debug.

This essentially means the message will never be seen since it is not
particularly common to twiddle the syslog level. Have you considered
pr_err_once() or similar?

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: target: core: Silence the message about unknown VPD pages
  2022-04-19  3:08 ` Martin K. Petersen
@ 2022-04-19  8:29   ` Konstantin Shelekhin
  0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Shelekhin @ 2022-04-19  8:29 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: Mike Christie, target-devel, linux-scsi, linux

On Mon, Apr 18, 2022 at 11:08:12PM -0400, Martin K. Petersen wrote:
> Konstantin,
> 
> > Target does not support some VPD pages and is very verbose about it.
> > Sometimes initiators don't bother and just keep sending the same
> > request from time to time, filling up the logs.
> >
> > This patch lowers the message priority to debug.
> 
> This essentially means the message will never be seen since it is not
> particularly common to twiddle the syslog level. Have you considered
> pr_err_once() or similar?

Hi,

Basically I was going the same route as with this message:

  pr_debug_ratelimited("%s/%s: Unsupported SCSI Opcode 0x%02x, sending CHECK_CONDITION.\n"

IMO it's kinda the same situation. I'm not sure that not implemented VPD
will be of any interest to anyone except for the developers.

Also if I recall correctly pr_err_once() will be triggered once per code
line, not per message, so it's possible to actually lose the info if
more that one page is not implemented.

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

* Re: [PATCH] scsi: target: core: Silence the message about unknown VPD pages
  2022-04-18 21:26 [PATCH] scsi: target: core: Silence the message about unknown VPD pages Konstantin Shelekhin
  2022-04-19  3:08 ` Martin K. Petersen
@ 2022-05-03  0:51 ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-05-03  0:51 UTC (permalink / raw)
  To: target-devel, Mike Christie, Konstantin Shelekhin
  Cc: Martin K . Petersen, linux, linux-scsi

On Tue, 19 Apr 2022 00:26:22 +0300, Konstantin Shelekhin wrote:

> Target does not support some VPD pages and is very verbose about it.
> Sometimes initiators don't bother and just keep sending the same request
> from time to time, filling up the logs.
> 
> This patch lowers the message priority to debug.
> 
> 
> [...]

Applied to 5.19/scsi-queue, thanks!

[1/1] scsi: target: core: Silence the message about unknown VPD pages
      https://git.kernel.org/mkp/scsi/c/95af09fabf37

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2022-05-03  1:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 21:26 [PATCH] scsi: target: core: Silence the message about unknown VPD pages Konstantin Shelekhin
2022-04-19  3:08 ` Martin K. Petersen
2022-04-19  8:29   ` Konstantin Shelekhin
2022-05-03  0:51 ` Martin K. Petersen

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.