Bug 12481
Summary: | mt takes two minutes to determine that the tape drive is empty | ||
---|---|---|---|
Product: | SCSI Drivers | Reporter: | Kevin Shanahan (kmshanah) |
Component: | Other | Assignee: | scsi_drivers-other |
Status: | REJECTED INVALID | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.28 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: | Kernel config |
Description
Kevin Shanahan
2009-01-18 18:37:24 UTC
Created attachment 19882 [details]
Kernel config
This is an application bug: it opens the device without the O_NONBLOCK flag. The driver waits up to two minutes for the drive to become ready. You probably earlier had an mt that opens tape with O_NONBLOCK (from mt-st?). Thanks, I think you are probably right. strace shows it (GNU mt) is using open("/dev/nst0", O_RDONLY). That would also explain why I remember something about the output being different. I remember now that I had to change my backup script - mt-st outputs to stdout and shows the status bits of the drive with "DR_OPEN" to indicate the tape isn't yet loaded, but exits with status 0. GNU mt prints it's error message to stderr and exits with status 1 when the tape isn't loaded. |