Message ID | 20220418212622.275516-1-k.shelekhin@yadro.com |
---|---|
State | New |
Headers | show |
Series | scsi: target: core: Silence the message about unknown VPD pages | expand |
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?
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.
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
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:
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(-)