Tape operation: missing filemark

From: Frans Pop (aragorn@tiscali.nl)
Date: Mon Mar 24 2003 - 09:49:16 EST


I have been working on a bug in a 'tar cf /dev/tape --verify' operation.
This results in an error 'Unexpected EOF in archive' during the verify
stage of the operation and any subsequent attempts to read the archive from
tape.

The cause of this error is that no filemark is written between writing the
tape and the start of the verification.

My question.
Which should be responsible for writing a filemark in this situation: the
tape driver or tar?

When a 'normal' backup using tar (without verify option) is made, the tape
driver writes the filemark when a release request is received while the
driver is in write mode.
So my thinking is that the driver should also write a filemark when an
ioctl request is received while the driver is in write mode. Is this
correct?
Any pointers to documentation?

tar sends (roughly) the following sequence of requests to the driver:
- open device
- write data
- ioctl MTFSB 1 (space backwards 1 filemark)
- read data
- release device

I have debugged this problem using the ide-tape driver, but I have also
seen a bug report for the same problem from someone using a scsi tape
device.

I am using kernel 2.4.21-pre4 with Debian 3.0r1 (Woody) on i686.
tar is (GNU tar) 1.13.25.

Frans Pop
-
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/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:15 EST