Skip to contentSkip to conversation

scsi_error: blank out reservation conflict printk

PATCH In review Hannes Reinecke 2 participants 2 messages Jun 1, 2010 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_error: blank out reservation conflict printk

When using SCSI reservations a 'reservation conflict' error is actually expected. So we should better use the normal SCSI_LOG_XXX functions to make it configurable for those cases where we're actually interested in the error.

drivers/scsi/scsi_error.c +2 -2
index a5d630f..def540d 100644
@@ -1509,8 +1509,8 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
 		return SUCCESS;
 
 	case RESERVATION_CONFLICT:
-		sdev_printk(KERN_INFO, scmd->device,
-			    "reservation conflict\n");
+		SCSI_LOG_ERROR_RECOVERY(3, sdev_printk(KERN_INFO, scmd->device,
+						"reservation conflict\n"));
 		return SUCCESS; /* causes immediate i/o error */
 	default:
 		return FAILED;
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Hannes Reinecke

When using SCSI reservations a 'reservation conflict' error is actually expected. So we should better use the normal SCSI_LOG_XXX functions to make it configurable for those cases where we're actually interested in the error.

drivers/scsi/scsi_error.c +0 -0
index a5d630f..def540d 100644

drivers/scsi/scsi_error.c int scsi_decide_disposition(struct scsi_cmnd *scmd) · line 1516

Quoted 10 lines
drivers/scsi/scsi_error.c +2 -2
@@ -1509,8 +1509,8 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
 		return SUCCESS;
 
 	case RESERVATION_CONFLICT:
-		sdev_printk(KERN_INFO, scmd->device,
-			    "reservation conflict\n");
+		SCSI_LOG_ERROR_RECOVERY(3, sdev_printk(KERN_INFO, scmd->device,
+						"reservation conflict\n"));
 		return SUCCESS; /* causes immediate i/o error */
 	default:
 		return FAILED;

Makes perfect sense to me.

:-)