Re: 2.5.72: SCSI tape error handling

Kai Makisara (Kai.Makisara@kolumbus.fi)
Fri, 20 Jun 2003 15:11:29 +0300 (EEST)


On Thu, 19 Jun 2003, Bob Tracy wrote:

> I was trying to do the responsible thing and back up my system today
> (for the first time in too many weeks :-)), and got the following
> errors in syslog about 15 minutes into the process:
>
> Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Info fld=0x3ba, Deferred stst0: sense key Medium Error
> Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
> Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Current stst0: sense key Medium Error
> Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
> Jun 19 09:55:04 gherkin kernel: st0: Error with sense data: Current stst0: sense key Medium Error
> Jun 19 09:55:04 gherkin kernel: Additional sense: Write append position error
> (... ad infinitum for the next three hours -- backup was unattended.
> There were no error messages of any kind on the console.)
>
st does not currently return error for any write problems except when at
EOT. The following one-liner fixes the bug (probably mangled by my mail
client):

--- linux-2.5.72-bk2/drivers/scsi/st.c 2003-06-19 20:43:38.000000000 +0300
+++ linux-2.5.72-bk2-km/drivers/scsi/st.c 2003-06-20 14:56:44.000000000 +0300
@@ -1555,6 +1555,7 @@
}
} else {
filp->f_pos -= do_count;
+ count += do_count;
STps->drv_block = (-1); /* Too cautious? */
retval = (-EIO);
}

Thanks for the report.

-- 
Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/