PREV UP NEXT The Ftape Installation Guide


8.5.1.6: MTWEOF

Write count file marks at the current position. Since version 3.03 this command is illegal when using zftape (as is all write access to the tape) unless the tape is located at either BOT (Begin Of Tape) or EOD (End Of Data, end of area that already is occupied by data).

The MTWEOF ioctl is interpreted by @zft's file mark emulation as follows:

A volume table entry is created that covers all of the data from the end of the previous volume or BOT (if the tape is empty) up to the current position. If nothing has been written, then a volume table entry for a zero-size volume is created.

If count is greater than 1 then count - 1 additional zero-size volume table entries are created.

Caveats
Note that MTWEOF is pretty useless when used with mt because the zftape driver automatically inserts a file mark when closing the device. Therefore all of the examples below will do nothing but insert empty volumes. Note that each empty volume -- although nothing is recorded -- consumes 29k of tape space.

Limitations
There is a limit of the maximum available number of file marks per cartridge. Each file marks consumes 128 bytes in the volume table segment, the volume table segment has a size of 29k which yields a maximum number of 232 file marks. The volume table overflow extension as proposed by various qic standards (see http://www.qic.org) is not supported by ftape.

Bugs
When using MTWEOF right before closing the driver then zftape will not insert a second file mark unless something has been written to the tape after the last MTWEOF. I don't know if this is a bug.

Example
count set to `1', i.e. write a single file mark:

mt -f /dev/nqft0 weof 1

or equivalently (since count has the value `1')

mt -f /dev/nqft0 weof

References
see File marks
see MTFSF
see MTBSF
see MTFSFM
see MTBSFM.


Use these buttons to jump to the top menu

TOP (parent node)

TOP (previous node) TOP (this node) TOP (next node)