All of lore.kernel.org
 help / color / mirror / Atom feed
From: <lduncan@suse.com>
To: target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	dbond@suse.com, hare@suse.de, cleech@redhat.com,
	michael.christie@oracle.com, Lee Duncan <lduncan@suse.com>
Subject: [PATCH 2/2] scsi: target: iscsi: don't warn of R/W when no data
Date: Thu,  7 Dec 2023 09:42:35 -0800	[thread overview]
Message-ID: <437f863520874ee386b6882ef749bf8d988839ca.1701540918.git.lduncan@suse.com> (raw)
In-Reply-To: <cover.1701540918.git.lduncan@suse.com>

From: Lee Duncan <lduncan@suse.com>

The LIO target code has a warning about setting the
read and/or write header bits with a PDU that has zero
transfer length, even though the code mentions that the
SPEC (RFC 3720) allows this, and that some initiators
set these bits. But in practice such initiators end up
flooding the logs with thousands of warning messages for
IO that is allowed.

So change this to a debug message, and clean up the wording
just a little bit while at it.

Signed-off-by: Lee Duncan <lduncan@suse.com>
Reviewed-by: David Bond <dbond@suse.com>
---
 drivers/target/iscsi/iscsi_target.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index f246e5015868..c82dc2cd08b3 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1039,9 +1039,10 @@ int iscsit_setup_scsi_cmd(struct iscsit_conn *conn, struct iscsit_cmd *cmd,
 		hdr->flags &= ~ISCSI_FLAG_CMD_READ;
 		hdr->flags &= ~ISCSI_FLAG_CMD_WRITE;
 
-		pr_warn("ISCSI_FLAG_CMD_READ or ISCSI_FLAG_CMD_WRITE"
+		pr_debug("ISCSI_FLAG_CMD_READ or ISCSI_FLAG_CMD_WRITE"
 			" set when Expected Data Transfer Length is 0 for"
-			" CDB: 0x%02x, Fixing up flags\n", hdr->cdb[0]);
+			" CDB: 0x%02x, cleared READ/WRITE flag(s)\n",
+			hdr->cdb[0]);
 	}
 
 	if (!(hdr->flags & ISCSI_FLAG_CMD_READ) &&
-- 
2.43.0


  parent reply	other threads:[~2023-12-07 17:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 17:42 [PATCH 0/2] scsi: target: iscsi: Fix two protocol issues lduncan
2023-12-07 17:42 ` [PATCH 1/2] scsi: target: iscsi: handle SCSI immediate commands lduncan
2023-12-13 20:06   ` Chris Leech
2023-12-14  1:24     ` Lee Duncan
2023-12-14 20:29       ` Chris Leech
2024-01-17 21:09         ` Lee Duncan
2024-03-11 16:18   ` michael.christie
2023-12-07 17:42 ` lduncan [this message]
2024-03-09 18:05   ` [PATCH 2/2] scsi: target: iscsi: don't warn of R/W when no data Lee Duncan
2024-03-11 15:59   ` michael.christie
2024-01-26 17:42 ` [PATCH 0/2] scsi: target: iscsi: Fix two protocol issues Lee Duncan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=437f863520874ee386b6882ef749bf8d988839ca.1701540918.git.lduncan@suse.com \
    --to=lduncan@suse.com \
    --cc=cleech@redhat.com \
    --cc=dbond@suse.com \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michael.christie@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.