Skip to content

Commit 83560c9

Browse files
mikechristieBrian Maly
authored andcommitted
vhost-scsi: Fix log flooding with target does not exist errors
As part of the normal initiator side scanning the guest's scsi layer will loop over all possible targets and send an inquiry. Since the max number of targets for virtio-scsi is 256, this results in 255 error messages about targets not existing. When there's more than 1 vhost-scsi device, then you get N * 255 log messages. It looks like the log message was added by accident in: commit 09d7583 ("vhost/scsi: Use common handling code in request queue handler") The patch was just making some coce common but added the vq_err call and I'm guessing the patch author forgot to enable the vq_err call (vq_err is implemented by pr_debug which defaults to off). So this patch removes the call since it's expected to hit this path during device discovery. Fixes: 09d7583 ("vhost/scsi: Use common handling code in request queue handler") Signed-off-by: Mike Christie <[email protected]> Orabug: 38099085 Signed-off-by: Mike Christie <[email protected]> Reviewed-by: Karolina Stolarek <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent 1298ad8 commit 83560c9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/vhost/scsi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,10 +1166,8 @@ vhost_scsi_get_req(struct vhost_virtqueue *vq, struct vhost_scsi_ctx *vc,
11661166
/* validated at handler entry */
11671167
vs_tpg = vhost_vq_get_backend(vq);
11681168
tpg = READ_ONCE(vs_tpg[*vc->target]);
1169-
if (unlikely(!tpg)) {
1170-
vq_err(vq, "Target 0x%x does not exist\n", *vc->target);
1169+
if (unlikely(!tpg))
11711170
goto out;
1172-
}
11731171
}
11741172

11751173
if (tpgp)

0 commit comments

Comments
 (0)