diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2010-04-25 08:03:57 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:03:51 -0400 |
commit | 6e49949c5e9e04d64e16df3723dd3f5bd25a29e2 (patch) | |
tree | 730c4910ae19a1108b074264f487da967f7dd8cd /drivers/scsi/scsi_error.c | |
parent | 3e84beba608dee5a7c7711a3503eb2f335c78fca (diff) |
[SCSI] Log msg when getting Unit Attention
If the user accidentally changes LUN mappings or it occurs
due to a bug, then it can cause data corruption that can take
months and months to track down. This patch adds a log
message when getting REPORT_LUNS_DATA_CHANGED and it adds
a generic message for other Unit Attentions with asc == 0x3f.
We are working on adding support for handling of these errors,
but I think until then we should at least log a message so
tracking down problems as a result of one of these changes
is a little easier.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index a5d630f5f519..c60cffbefa3c 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -307,6 +307,19 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
307 | (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) | 307 | (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) |
308 | return FAILED; | 308 | return FAILED; |
309 | 309 | ||
310 | if (sshdr.asc == 0x3f && sshdr.ascq == 0x0e) | ||
311 | scmd_printk(KERN_WARNING, scmd, | ||
312 | "Warning! Received an indication that the " | ||
313 | "LUN assignments on this target have " | ||
314 | "changed. The Linux SCSI layer does not " | ||
315 | "automatically remap LUN assignments.\n"); | ||
316 | else if (sshdr.asc == 0x3f) | ||
317 | scmd_printk(KERN_WARNING, scmd, | ||
318 | "Warning! Received an indication that the " | ||
319 | "operating parameters on this target have " | ||
320 | "changed. The Linux SCSI layer does not " | ||
321 | "automatically adjust these parameters.\n"); | ||
322 | |||
310 | if (blk_barrier_rq(scmd->request)) | 323 | if (blk_barrier_rq(scmd->request)) |
311 | /* | 324 | /* |
312 | * barrier requests should always retry on UA | 325 | * barrier requests should always retry on UA |