PREV UP NEXT The Ftape Installation Guide - Ioctls


8.5.5: MTIOCVOLINFO

The following comes from the ftape replacement 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.

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 raw amount of data (i.e. without compression) 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 zftape.


Use these buttons to jump to the top menu

TOP (parent node)

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