The Ftape Installation and Usage Guide - Ioctls
The following comes from the ftape replacement
[/usr/src/ftape-4.03/]include/linux/mtio.h
for the kernel's `mtio.h
' (see MTSETBLK). Note that
mt_blksz
is measured in bytes but mt_size
and
mt_rawsize
are measured in kilobytes.
struct mtvolinfo { unsigned int mt_volno; /* vol-number */ unsigned int mt_blksz; /* blocksize used when recording */ unsigned int mt_rawsize; /* raw tape space consumed, in kb */ unsigned int mt_size; /* volume size after decompression, in kb */ unsigned int mt_cmpr:1; /* this volume has been compressed */ }; #define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo)
This ioctl queries information about the volume the tape drive is positioned at. The meaning of the components of the structure are:
mt_volno
|
The number of the current volume. |
mt_blksz
|
The block-size the volume was recorded with measured in bytes
(see MTSETBLK, see Tape blocks).
|
mt_rawsize
|
The amount of space the volume occupies on the tape measured in
kilobytes
|
mt_size
|
The real size of the volume after decompression measured in
kilobytes
|
mt_cmpr
|
This indicates whether compression was used to record the volume, See zftape devices. Note that ftape-4.03 no longer supports writing of compressed archives while support for reading compressed archives is kept for compatibility reasons. |
When this ioctl is send to the driver when it is located at EOM (end of
recorded media, end of data), then mt_rawsize
gives the amount of
data still usable on the tape. In this case the mt_size
component
will be set to zero and mt_blksz
reflects block size currently
used by ftape-3.04d (and later versions).
![]() |
Use these buttons to jump to the top menu |