sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget/translations/zh_CN/scsi/stmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/zh_TW/scsi/stmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/it_IT/scsi/stmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/ja_JP/scsi/stmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/ko_KR/scsi/stmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/sp_SP/scsi/stmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh5/var/lib/git/docbuild/linux/Documentation/scsi/st.rsthKubhsection)}(hhh](htitle)}(hThe SCSI Tape Driverh]hThe SCSI Tape Driver}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hThis file contains brief information about the SCSI tape driver. The driver is currently maintained by Kai Mäkisara (email Kai.Makisara@kolumbus.fi)h](h|This file contains brief information about the SCSI tape driver. The driver is currently maintained by Kai Mäkisara (email }(hhhhhNhNubh reference)}(hKai.Makisara@kolumbus.fih]hKai.Makisara@kolumbus.fi}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:Kai.Makisara@kolumbus.fiuh1hhhubh)}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h7Last modified: Tue Feb 9 21:54:16 2016 by kai.makisarah]h7Last modified: Tue Feb 9 21:54:16 2016 by kai.makisara}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hBasicsh]hBasics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hThe driver is generic, i.e., it does not contain any code tailored to any specific tape drive. The tape parameters can be specified with one of the following three methods:h]hThe driver is generic, i.e., it does not contain any code tailored to any specific tape drive. The tape parameters can be specified with one of the following three methods:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX/1. Each user can specify the tape parameters he/she wants to use directly with ioctls. This is administratively a very simple and flexible method and applicable to single-user workstations. However, in a multiuser environment the next user finds the tape parameters in state the previous user left them.h]hX/1. Each user can specify the tape parameters he/she wants to use directly with ioctls. This is administratively a very simple and flexible method and applicable to single-user workstations. However, in a multiuser environment the next user finds the tape parameters in state the previous user left them.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXr2. The system manager (root) can define default values for some tape parameters, like block size and density using the MTSETDRVBUFFER ioctl. These parameters can be programmed to come into effect either when a new tape is loaded into the drive or if writing begins at the beginning of the tape. The second method is applicable if the tape drive performs auto-detection of the tape format well (like some QIC-drives). The result is that any tape can be read, writing can be continued using existing format, and the default format is used if the tape is rewritten from the beginning (or a new tape is written for the first time). The first method is applicable if the drive does not perform auto-detection well enough and there is a single "sensible" mode for the device. An example is a DAT drive that is used only in variable block mode (I don't know if this is sensible or not :-).h]hXx2. The system manager (root) can define default values for some tape parameters, like block size and density using the MTSETDRVBUFFER ioctl. These parameters can be programmed to come into effect either when a new tape is loaded into the drive or if writing begins at the beginning of the tape. The second method is applicable if the tape drive performs auto-detection of the tape format well (like some QIC-drives). The result is that any tape can be read, writing can be continued using existing format, and the default format is used if the tape is rewritten from the beginning (or a new tape is written for the first time). The first method is applicable if the drive does not perform auto-detection well enough and there is a single “sensible” mode for the device. An example is a DAT drive that is used only in variable block mode (I don’t know if this is sensible or not :-).}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe user can override the parameters defined by the system manager. The changes persist until the defaults again come into effect.h]hThe user can override the parameters defined by the system manager. The changes persist until the defaults again come into effect.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hhhhubh)}(hX3. By default, up to four modes can be defined and selected using the minor number (bits 5 and 6). The number of modes can be changed by changing ST_NBR_MODE_BITS in st.h. Mode 0 corresponds to the defaults discussed above. Additional modes are dormant until they are defined by the system manager (root). When specification of a new mode is started, the configuration of mode 0 is used to provide a starting point for definition of the new mode.h]hX3. By default, up to four modes can be defined and selected using the minor number (bits 5 and 6). The number of modes can be changed by changing ST_NBR_MODE_BITS in st.h. Mode 0 corresponds to the defaults discussed above. Additional modes are dormant until they are defined by the system manager (root). When specification of a new mode is started, the configuration of mode 0 is used to provide a starting point for definition of the new mode.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hhhhubh)}(hXDUsing the modes allows the system manager to give the users choices over some of the buffering parameters not directly accessible to the users (buffered and asynchronous writes). The modes also allow choices between formats in multi-tape operations (the explicitly overridden parameters are reset when a new tape is loaded).h]hXDUsing the modes allows the system manager to give the users choices over some of the buffering parameters not directly accessible to the users (buffered and asynchronous writes). The modes also allow choices between formats in multi-tape operations (the explicitly overridden parameters are reset when a new tape is loaded).}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hhhhubh)}(hcIf more than one mode is used, all modes should contain definitions for the same set of parameters.h]hcIf more than one mode is used, all modes should contain definitions for the same set of parameters.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/stats directory (where is a directory entry from /sys/class/scsi_tape that matched the extended regular expression) h]h)}(hAccess the statistics from the /sys/class/scsi_tape//stats directory (where is a directory entry from /sys/class/scsi_tape that matched the extended regular expression)h]hAccess the statistics from the /sys/class/scsi_tape//stats directory (where is a directory entry from /sys/class/scsi_tape that matched the extended regular expression)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj"ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjhhhhhKubh)}(hThe reason for using this approach is that all the character devices pointing to the same tape drive use the same statistics. That means that st0 would have the same statistics as nst0.h]hThe reason for using this approach is that all the character devices pointing to the same tape drive use the same statistics. That means that st0 would have the same statistics as nst0.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h6The directory contains the following statistics files:h]h6The directory contains the following statistics files:}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(hFin_flight - The number of I/Os currently outstanding to this device.h]hdefinition_list)}(hhh]hdefinition_list_item)}(hDin_flight - The number of I/Os currently outstanding to this device.h](hterm)}(h in_flighth]h in_flight}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjoubh definition)}(hhh]h bullet_list)}(hhh]j)}(h8The number of I/Os currently outstanding to this device.h]h)}(hjh]h8The number of I/Os currently outstanding to this device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]bullet-uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjjubah}(h]h ]h"]h$]h&]uh1jhhjdubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(hXio_ns - The amount of time spent waiting (in nanoseconds) for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.h]ji)}(hhh]jn)}(hXio_ns - The amount of time spent waiting (in nanoseconds) for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.h](jt)}(hio_nsh]hio_ns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjubj)}(hhh]j)}(hhh]j)}(hXThe amount of time spent waiting (in nanoseconds) for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.h]h)}(hXThe amount of time spent waiting (in nanoseconds) for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.h]hXThe amount of time spent waiting (in nanoseconds) for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(hother_cnt - The number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_ms-read_ms-write_ms.h]ji)}(hhh]jn)}(hother_cnt - The number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_ms-read_ms-write_ms.h](jt)}(h other_cnth]h other_cnt}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhj ubj)}(hhh]j)}(hhh]j)}(hThe number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_ms-read_ms-write_ms.h]h)}(hThe number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_ms-read_ms-write_ms.h]hThe number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_ms-read_ms-write_ms.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8ubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]jjuh1jhhhKhj2ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(h?read_byte_cnt - The number of bytes read from the tape drive.h]ji)}(hhh]jn)}(h=read_byte_cnt - The number of bytes read from the tape drive.h](jt)}(h read_byte_cnth]h read_byte_cnt}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjuubj)}(hhh]j)}(hhh]j)}(h-The number of bytes read from the tape drive.h]h)}(hjh]h-The number of bytes read from the tape drive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjrubah}(h]h ]h"]h$]h&]uh1jhhjnubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(hBread_cnt - The number of read requests issued to the tape drive.h]ji)}(hhh]jn)}(h@read_cnt - The number of read requests issued to the tape drive.h](jt)}(hread_cnth]hread_cnt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjubj)}(hhh]j)}(hhh]j)}(h5The number of read requests issued to the tape drive.h]h)}(hjh]h5The number of read requests issued to the tape drive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(h`read_ns - The amount of time (in nanoseconds) spent waiting for read requests to complete.h]ji)}(hhh]jn)}(h\read_ns - The amount of time (in nanoseconds) spent waiting for read requests to complete.h](jt)}(hread_nsh]hread_ns}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjubj)}(hhh]j)}(hhh]j)}(hPThe amount of time (in nanoseconds) spent waiting for read requests to complete.h]h)}(hPThe amount of time (in nanoseconds) spent waiting for read requests to complete.h]hPThe amount of time (in nanoseconds) spent waiting for read requests to complete.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5ubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]jjuh1jhhhKhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(hAwrite_byte_cnt - The number of bytes written to the tape drive.h]ji)}(hhh]jn)}(h?write_byte_cnt - The number of bytes written to the tape drive.h](jt)}(hwrite_byte_cnth]hwrite_byte_cnt}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjrubj)}(hhh]j)}(hhh]j)}(h.The number of bytes written to the tape drive.h]h)}(hjh]h.The number of bytes written to the tape drive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjoubah}(h]h ]h"]h$]h&]uh1jhhjkubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(hDwrite_cnt - The number of write requests issued to the tape drive.h]ji)}(hhh]jn)}(hBwrite_cnt - The number of write requests issued to the tape drive.h](jt)}(h write_cnth]h write_cnt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjubj)}(hhh]j)}(hhh]j)}(h6The number of write requests issued to the tape drive.h]h)}(hjh]h6The number of write requests issued to the tape drive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(hbwrite_ns - The amount of time (in nanoseconds) spent waiting for write requests to complete.h]ji)}(hhh]jn)}(h^write_ns - The amount of time (in nanoseconds) spent waiting for write requests to complete.h](jt)}(hwrite_nsh]hwrite_ns}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjubj)}(hhh]j)}(hhh]j)}(hQThe amount of time (in nanoseconds) spent waiting for write requests to complete.h]h)}(hQThe amount of time (in nanoseconds) spent waiting for write requests to complete.h]hQThe amount of time (in nanoseconds) spent waiting for write requests to complete.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj2ubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]jjuh1jhhhKhj,ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubj)}(hresid_cnt - The number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape. h]ji)}(hhh]jn)}(hresid_cnt - The number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape. h](jt)}(h resid_cnth]h resid_cnt}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhKhjoubj)}(hhh]j)}(hhh]j)}(hThe number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape. h]h)}(hThe number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape.h]hThe number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jmhhhKhjlubah}(h]h ]h"]h$]h&]uh1jhhjhubah}(h]h ]h"]h$]h&]uh1jhjahhhNhNubeh}(h]h ]h"]h$]h&]j@jAjBhjCjDuh1jhjhhhhhKubhnote)}(hwThe in_flight value is incremented when an I/O starts the I/O itself is not added to the statistics until it completes.h]h)}(hwThe in_flight value is incremented when an I/O starts the I/O itself is not added to the statistics until it completes.h]hwThe in_flight value is incremented when an I/O starts the I/O itself is not added to the statistics until it completes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hThe total of read_cnt, write_cnt, and other_cnt may not total to the same value as iodone_cnt at the device level. The tape statistics only count I/O issued via the st module.h]hThe total of read_cnt, write_cnt, and other_cnt may not total to the same value as iodone_cnt at the device level. The tape statistics only count I/O issued via the st module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXWhen read the statistics may not be temporally consistent while I/O is in progress. The individual values are read and written to atomically however when reading them back via sysfs they may be in the process of being updated when starting an I/O or when it is completed.h]hXWhen read the statistics may not be temporally consistent while I/O is in progress. The individual values are read and written to atomically however when reading them back via sysfs they may be in the process of being updated when starting an I/O or when it is completed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX<The value shown in in_flight is incremented before any statstics are updated and decremented when an I/O completes after updating statistics. The value of in_flight is 0 when there are no I/Os outstanding that are issued by the st driver. Tape statistics do not take into account any I/O performed via the sg device.h]hX<The value shown in in_flight is incremented before any statstics are updated and decremented when an I/O completes after updating statistics. The value of in_flight is 0 when there are no I/Os outstanding that are issued by the st driver. Tape statistics do not take into account any I/O performed via the sg device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]%sysfs-and-statistics-for-tape-devicesah ]h"]%sysfs and statistics for tape devicesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hBSD and Sys V Semanticsh]hBSD and Sys V Semantics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXLThe user can choose between these two behaviours of the tape driver by defining the value of the symbol ST_SYSV. The semantics differ when a file being read is closed. The BSD semantics leaves the tape where it currently is whereas the SYS V semantics moves the tape past the next filemark unless the filemark has just been crossed.h]hXLThe user can choose between these two behaviours of the tape driver by defining the value of the symbol ST_SYSV. The semantics differ when a file being read is closed. The BSD semantics leaves the tape where it currently is whereas the SYS V semantics moves the tape past the next filemark unless the filemark has just been crossed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe default is BSD semantics.h]hThe default is BSD semantics.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]bsd-and-sys-v-semanticsah ]h"]bsd and sys v semanticsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Bufferingh]h Buffering}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhKubh)}(hXNThe driver tries to do transfers directly to/from user space. If this is not possible, a driver buffer allocated at run-time is used. If direct i/o is not possible for the whole transfer, the driver buffer is used (i.e., bounce buffers for individual pages are not used). Direct i/o can be impossible because of several reasons, e.g.:h]hXNThe driver tries to do transfers directly to/from user space. If this is not possible, a driver buffer allocated at run-time is used. If direct i/o is not possible for the whole transfer, the driver buffer is used (i.e., bounce buffers for individual pages are not used). Direct i/o can be impossible because of several reasons, e.g.:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDhhubj)}(hhh](j)}(h;one or more pages are at addresses not reachable by the HBAh]h)}(hjhh]h;one or more pages are at addresses not reachable by the HBA}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubah}(h]h ]h"]h$]h&]uh1jhjchhhhhNubj)}(hfthe number of pages in the transfer exceeds the number of scatter/gather segments permitted by the HBAh]h)}(hfthe number of pages in the transfer exceeds the number of scatter/gather segments permitted by the HBAh]hfthe number of pages in the transfer exceeds the number of scatter/gather segments permitted by the HBA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}ubah}(h]h ]h"]h$]h&]uh1jhjchhhhhNubj)}(h^one or more pages can't be locked into memory (should not happen in any reasonable situation) h]h)}(h]one or more pages can't be locked into memory (should not happen in any reasonable situation)h]h_one or more pages can’t be locked into memory (should not happen in any reasonable situation)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjchhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhMhjDhhubh)}(hXLThe size of the driver buffers is always at least one tape block. In fixed block mode, the minimum buffer size is defined (in 1024 byte units) by ST_FIXED_BUFFER_BLOCKS. With small block size this allows buffering of several blocks and using one SCSI read or write to transfer all of the blocks. Buffering of data across write calls in fixed block mode is allowed if ST_BUFFER_WRITES is non-zero and direct i/o is not used. Buffer allocation uses chunks of memory having sizes 2^n * (page size). Because of this the actual buffer size may be larger than the minimum allowable buffer size.h]hXLThe size of the driver buffers is always at least one tape block. In fixed block mode, the minimum buffer size is defined (in 1024 byte units) by ST_FIXED_BUFFER_BLOCKS. With small block size this allows buffering of several blocks and using one SCSI read or write to transfer all of the blocks. Buffering of data across write calls in fixed block mode is allowed if ST_BUFFER_WRITES is non-zero and direct i/o is not used. Buffer allocation uses chunks of memory having sizes 2^n * (page size). Because of this the actual buffer size may be larger than the minimum allowable buffer size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjDhhubh)}(hXjNOTE that if direct i/o is used, the small writes are not buffered. This may cause a surprise when moving from 2.4. There small writes (e.g., tar without -b option) may have had good throughput but this is not true any more with 2.6. Direct i/o can be turned off to solve this problem but a better solution is to use bigger write() byte counts (e.g., tar -b 64).h]hXjNOTE that if direct i/o is used, the small writes are not buffered. This may cause a surprise when moving from 2.4. There small writes (e.g., tar without -b option) may have had good throughput but this is not true any more with 2.6. Direct i/o can be turned off to solve this problem but a better solution is to use bigger write() byte counts (e.g., tar -b 64).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDhhubh)}(hAsynchronous writing. Writing the buffer contents to the tape is started and the write call returns immediately. The status is checked at the next tape operation. Asynchronous writes are not done with direct i/o and not in fixed block mode.h]hAsynchronous writing. Writing the buffer contents to the tape is started and the write call returns immediately. The status is checked at the next tape operation. Asynchronous writes are not done with direct i/o and not in fixed block mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDhhubh)}(hBuffered writes and asynchronous writes may in some rare cases cause problems in multivolume operations if there is not enough space on the tape after the early-warning mark to flush the driver buffer.h]hBuffered writes and asynchronous writes may in some rare cases cause problems in multivolume operations if there is not enough space on the tape after the early-warning mark to flush the driver buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjDhhubh)}(hXRead ahead for fixed block mode (ST_READ_AHEAD). Filling the buffer is attempted even if the user does not want to get all of the data at this read command. Should be disabled for those drives that don't like a filemark to truncate a read request or that don't like backspacing.h]hXRead ahead for fixed block mode (ST_READ_AHEAD). Filling the buffer is attempted even if the user does not want to get all of the data at this read command. Should be disabled for those drives that don’t like a filemark to truncate a read request or that don’t like backspacing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjDhhubh)}(hXScatter/gather buffers (buffers that consist of chunks non-contiguous in the physical memory) are used if contiguous buffers can't be allocated. To support all SCSI adapters (including those not supporting scatter/gather), buffer allocation is using the following three kinds of chunks:h]hX Scatter/gather buffers (buffers that consist of chunks non-contiguous in the physical memory) are used if contiguous buffers can’t be allocated. To support all SCSI adapters (including those not supporting scatter/gather), buffer allocation is using the following three kinds of chunks:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjDhhubj)}(hhh](j)}(hXThe initial segment that is used for all SCSI adapters including those not supporting scatter/gather. The size of this buffer will be (PAGE_SIZE << ST_FIRST_ORDER) bytes if the system can give a chunk of this size (and it is not larger than the buffer size specified by ST_BUFFER_BLOCKS). If this size is not available, the driver halves the size and tries again until the size of one page. The default settings in st_options.h make the driver to try to allocate all of the buffer as one chunk.h]h)}(hXThe initial segment that is used for all SCSI adapters including those not supporting scatter/gather. The size of this buffer will be (PAGE_SIZE << ST_FIRST_ORDER) bytes if the system can give a chunk of this size (and it is not larger than the buffer size specified by ST_BUFFER_BLOCKS). If this size is not available, the driver halves the size and tries again until the size of one page. The default settings in st_options.h make the driver to try to allocate all of the buffer as one chunk.h]hXThe initial segment that is used for all SCSI adapters including those not supporting scatter/gather. The size of this buffer will be (PAGE_SIZE << ST_FIRST_ORDER) bytes if the system can give a chunk of this size (and it is not larger than the buffer size specified by ST_BUFFER_BLOCKS). If this size is not available, the driver halves the size and tries again until the size of one page. The default settings in st_options.h make the driver to try to allocate all of the buffer as one chunk.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hThe scatter/gather segments to fill the specified buffer size are allocated so that as many segments as possible are used but the number of segments does not exceed ST_FIRST_SG.h]h)}(hThe scatter/gather segments to fill the specified buffer size are allocated so that as many segments as possible are used but the number of segments does not exceed ST_FIRST_SG.h]hThe scatter/gather segments to fill the specified buffer size are allocated so that as many segments as possible are used but the number of segments does not exceed ST_FIRST_SG.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj"ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXThe remaining segments between ST_MAX_SG (or the module parameter max_sg_segs) and the number of segments used in phases 1 and 2 are used to extend the buffer at run-time if this is necessary. The number of scatter/gather segments allowed for the SCSI adapter is not exceeded if it is smaller than the maximum number of scatter/gather segments specified. If the maximum number allowed for the SCSI adapter is smaller than the number of segments used in phases 1 and 2, extending the buffer will always fail. h]h)}(hXThe remaining segments between ST_MAX_SG (or the module parameter max_sg_segs) and the number of segments used in phases 1 and 2 are used to extend the buffer at run-time if this is necessary. The number of scatter/gather segments allowed for the SCSI adapter is not exceeded if it is smaller than the maximum number of scatter/gather segments specified. If the maximum number allowed for the SCSI adapter is smaller than the number of segments used in phases 1 and 2, extending the buffer will always fail.h]hXThe remaining segments between ST_MAX_SG (or the module parameter max_sg_segs) and the number of segments used in phases 1 and 2 are used to extend the buffer at run-time if this is necessary. The number of scatter/gather segments allowed for the SCSI adapter is not exceeded if it is smaller than the maximum number of scatter/gather segments specified. If the maximum number allowed for the SCSI adapter is smaller than the number of segments used in phases 1 and 2, extending the buffer will always fail.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj:ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]j@jAjBhjCjDuh1jhjDhhhhhM0ubeh}(h] bufferingah ]h"] bufferingah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hEOM Behaviour When Writingh]hEOM Behaviour When Writing}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hhhhhMFubh)}(hXWhen the end of medium early warning is encountered, the current write is finished and the number of bytes is returned. The next write returns -1 and errno is set to ENOSPC. To enable writing a trailer, the next write is allowed to proceed and, if successful, the number of bytes is returned. After this, -1 and the number of bytes are alternately returned until the physical end of medium (or some other error) is encountered.h]hXWhen the end of medium early warning is encountered, the current write is finished and the number of bytes is returned. The next write returns -1 and errno is set to ENOSPC. To enable writing a trailer, the next write is allowed to proceed and, if successful, the number of bytes is returned. After this, -1 and the number of bytes are alternately returned until the physical end of medium (or some other error) is encountered.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj`hhubeh}(h]eom-behaviour-when-writingah ]h"]eom behaviour when writingah$]h&]uh1hhhhhhhhMFubh)}(hhh](h)}(hModule Parametersh]hModule Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMQubh)}(hThe buffer size, write threshold, and the maximum number of allocated buffers are configurable when the driver is loaded as a module. The keywords are:h]hThe buffer size, write threshold, and the maximum number of allocated buffers are configurable when the driver is loaded as a module. The keywords are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK+uh1jhjubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hbuffer_kbs=xxxh]hbuffer_kbs=xxx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h= 18 (values 1 - 17 reserved) and <= the maximum requested sense data sixe), a mask to select the relevant bits (the bits 9-16), and the bit pattern (bits 17-23). If the bit pattern is zero, one or more bits under the mask indicate cleaning request. If the pattern is non-zero, the pattern must match the masked sense data byte. (The cleaning bit is set if the additional sense code and qualifier 00h 17h are seen regardless of the setting of MT_ST_SET_CLN.) h](jt)}(hMTSETDRVBUFFERh]hMTSETDRVBUFFER}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMVhjqubj)}(hhh](h)}(hIs used for several purposes. The command is obtained from count with mask MT_SET_OPTIONS, the low order bits are used as argument. This command is only allowed for the superuser (root). The subcommands are:h]hIs used for several purposes. The command is obtained from count with mask MT_SET_OPTIONS, the low order bits are used as argument. This command is only allowed for the superuser (root). The subcommands are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](j)}(hL0 The drive buffer option is set to the argument. Zero means no buffering.h]ji)}(hhh]jn)}(hJ0 The drive buffer option is set to the argument. Zero means no buffering.h](jt)}(h0h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(hHThe drive buffer option is set to the argument. Zero means no buffering.h]hHThe drive buffer option is set to the argument. Zero means no buffering.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hX5MT_ST_BOOLEANS Sets the buffering options. The bits are the new states (enabled/disabled) the following options (in the parenthesis is specified whether the option is global or can be specified differently for each mode): MT_ST_BUFFER_WRITES write buffering (mode) MT_ST_ASYNC_WRITES asynchronous writes (mode) MT_ST_READ_AHEAD read ahead (mode) MT_ST_TWO_FM writing of two filemarks (global) MT_ST_FAST_EOM using the SCSI spacing to EOD (global) MT_ST_AUTO_LOCK automatic locking of the drive door (global) MT_ST_DEF_WRITES the defaults are meant only for writes (mode) MT_ST_CAN_BSR backspacing over more than one records can be used for repositioning the tape (global) MT_ST_NO_BLKLIMS the driver does not ask the block limits from the drive (block size can be changed only to variable) (global) MT_ST_CAN_PARTITIONS enables support for partitioned tapes (global) MT_ST_SCSI2LOGICAL the logical block number is used in the MTSEEK and MTIOCPOS for SCSI-2 drives instead of the device dependent address. It is recommended to set this flag unless there are tapes using the device dependent (from the old times) (global) MT_ST_SYSV sets the SYSV semantics (mode) MT_ST_NOWAIT enables immediate mode (i.e., don't wait for the command to finish) for some commands (e.g., rewind) MT_ST_NOWAIT_EOF enables immediate filemark mode (i.e. when writing a filemark, don't wait for it to complete). Please see the BASICS note about MTWEOFI with respect to the possible dangers of writing immediate filemarks. MT_ST_SILI enables setting the SILI bit in SCSI commands when reading in variable block mode to enhance performance when reading blocks shorter than the byte count; set this only if you are sure that the drive supports SILI and the HBA correctly returns transfer residuals MT_ST_DEBUGGING debugging (global; debugging must be compiled into the driver) h]ji)}(hhh]jn)}(hXMT_ST_BOOLEANS Sets the buffering options. The bits are the new states (enabled/disabled) the following options (in the parenthesis is specified whether the option is global or can be specified differently for each mode): MT_ST_BUFFER_WRITES write buffering (mode) MT_ST_ASYNC_WRITES asynchronous writes (mode) MT_ST_READ_AHEAD read ahead (mode) MT_ST_TWO_FM writing of two filemarks (global) MT_ST_FAST_EOM using the SCSI spacing to EOD (global) MT_ST_AUTO_LOCK automatic locking of the drive door (global) MT_ST_DEF_WRITES the defaults are meant only for writes (mode) MT_ST_CAN_BSR backspacing over more than one records can be used for repositioning the tape (global) MT_ST_NO_BLKLIMS the driver does not ask the block limits from the drive (block size can be changed only to variable) (global) MT_ST_CAN_PARTITIONS enables support for partitioned tapes (global) MT_ST_SCSI2LOGICAL the logical block number is used in the MTSEEK and MTIOCPOS for SCSI-2 drives instead of the device dependent address. It is recommended to set this flag unless there are tapes using the device dependent (from the old times) (global) MT_ST_SYSV sets the SYSV semantics (mode) MT_ST_NOWAIT enables immediate mode (i.e., don't wait for the command to finish) for some commands (e.g., rewind) MT_ST_NOWAIT_EOF enables immediate filemark mode (i.e. when writing a filemark, don't wait for it to complete). Please see the BASICS note about MTWEOFI with respect to the possible dangers of writing immediate filemarks. MT_ST_SILI enables setting the SILI bit in SCSI commands when reading in variable block mode to enhance performance when reading blocks shorter than the byte count; set this only if you are sure that the drive supports SILI and the HBA correctly returns transfer residuals MT_ST_DEBUGGING debugging (global; debugging must be compiled into the driver) h](jt)}(hMT_ST_BOOLEANSh]hMT_ST_BOOLEANS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM"hjubj)}(hhh](h)}(hSets the buffering options. The bits are the new states (enabled/disabled) the following options (in the parenthesis is specified whether the option is global or can be specified differently for each mode):h]hSets the buffering options. The bits are the new states (enabled/disabled) the following options (in the parenthesis is specified whether the option is global or can be specified differently for each mode):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj: )}(hXMT_ST_BUFFER_WRITES write buffering (mode) MT_ST_ASYNC_WRITES asynchronous writes (mode) MT_ST_READ_AHEAD read ahead (mode) MT_ST_TWO_FM writing of two filemarks (global) MT_ST_FAST_EOM using the SCSI spacing to EOD (global) MT_ST_AUTO_LOCK automatic locking of the drive door (global) MT_ST_DEF_WRITES the defaults are meant only for writes (mode) MT_ST_CAN_BSR backspacing over more than one records can be used for repositioning the tape (global) MT_ST_NO_BLKLIMS the driver does not ask the block limits from the drive (block size can be changed only to variable) (global) MT_ST_CAN_PARTITIONS enables support for partitioned tapes (global) MT_ST_SCSI2LOGICAL the logical block number is used in the MTSEEK and MTIOCPOS for SCSI-2 drives instead of the device dependent address. It is recommended to set this flag unless there are tapes using the device dependent (from the old times) (global) MT_ST_SYSV sets the SYSV semantics (mode) MT_ST_NOWAIT enables immediate mode (i.e., don't wait for the command to finish) for some commands (e.g., rewind) MT_ST_NOWAIT_EOF enables immediate filemark mode (i.e. when writing a filemark, don't wait for it to complete). Please see the BASICS note about MTWEOFI with respect to the possible dangers of writing immediate filemarks. MT_ST_SILI enables setting the SILI bit in SCSI commands when reading in variable block mode to enhance performance when reading blocks shorter than the byte count; set this only if you are sure that the drive supports SILI and the HBA correctly returns transfer residuals MT_ST_DEBUGGING debugging (global; debugging must be compiled into the driver) h]ji)}(hhh](jn)}(h*MT_ST_BUFFER_WRITES write buffering (mode)h](jt)}(hMT_ST_BUFFER_WRITESh]hMT_ST_BUFFER_WRITES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhj ubj)}(hhh]h)}(hwrite buffering (mode)h]hwrite buffering (mode)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(h-MT_ST_ASYNC_WRITES asynchronous writes (mode)h](jt)}(hMT_ST_ASYNC_WRITESh]hMT_ST_ASYNC_WRITES}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhj9ubj)}(hhh]h)}(hasynchronous writes (mode)h]hasynchronous writes (mode)}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(h"MT_ST_READ_AHEAD read ahead (mode)h](jt)}(hMT_ST_READ_AHEADh]hMT_ST_READ_AHEAD}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjhubj)}(hhh]h)}(hread ahead (mode)h]hread ahead (mode)}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjzubah}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(h.MT_ST_TWO_FM writing of two filemarks (global)h](jt)}(h MT_ST_TWO_FMh]h MT_ST_TWO_FM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(h!writing of two filemarks (global)h]h!writing of two filemarks (global)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(h5MT_ST_FAST_EOM using the SCSI spacing to EOD (global)h](jt)}(hMT_ST_FAST_EOMh]hMT_ST_FAST_EOM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(h&using the SCSI spacing to EOD (global)h]h&using the SCSI spacing to EOD (global)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hMT_ST_DEF_WRITES the defaults are meant only for writes (mode)h](jt)}(hMT_ST_DEF_WRITESh]hMT_ST_DEF_WRITES}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhj$ubj)}(hhh]h)}(h-the defaults are meant only for writes (mode)h]h-the defaults are meant only for writes (mode)}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hdMT_ST_CAN_BSR backspacing over more than one records can be used for repositioning the tape (global)h](jt)}(h MT_ST_CAN_BSRh]h MT_ST_CAN_BSR}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjSubj)}(hhh]h)}(hVbackspacing over more than one records can be used for repositioning the tape (global)h]hVbackspacing over more than one records can be used for repositioning the tape (global)}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(h~MT_ST_NO_BLKLIMS the driver does not ask the block limits from the drive (block size can be changed only to variable) (global)h](jt)}(hMT_ST_NO_BLKLIMSh]hMT_ST_NO_BLKLIMS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(hmthe driver does not ask the block limits from the drive (block size can be changed only to variable) (global)h]hmthe driver does not ask the block limits from the drive (block size can be changed only to variable) (global)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hCMT_ST_CAN_PARTITIONS enables support for partitioned tapes (global)h](jt)}(hMT_ST_CAN_PARTITIONSh]hMT_ST_CAN_PARTITIONS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(h.enables support for partitioned tapes (global)h]h.enables support for partitioned tapes (global)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hMT_ST_SCSI2LOGICAL the logical block number is used in the MTSEEK and MTIOCPOS for SCSI-2 drives instead of the device dependent address. It is recommended to set this flag unless there are tapes using the device dependent (from the old times) (global)h](jt)}(hMT_ST_SCSI2LOGICALh]hMT_ST_SCSI2LOGICAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(hthe logical block number is used in the MTSEEK and MTIOCPOS for SCSI-2 drives instead of the device dependent address. It is recommended to set this flag unless there are tapes using the device dependent (from the old times) (global)h]hthe logical block number is used in the MTSEEK and MTIOCPOS for SCSI-2 drives instead of the device dependent address. It is recommended to set this flag unless there are tapes using the device dependent (from the old times) (global)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(h)MT_ST_SYSV sets the SYSV semantics (mode)h](jt)}(h MT_ST_SYSVh]h MT_ST_SYSV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(hsets the SYSV semantics (mode)h]hsets the SYSV semantics (mode)}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hqMT_ST_NOWAIT enables immediate mode (i.e., don't wait for the command to finish) for some commands (e.g., rewind)h](jt)}(h MT_ST_NOWAITh]h MT_ST_NOWAIT}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhj>ubj)}(hhh]h)}(hdenables immediate mode (i.e., don't wait for the command to finish) for some commands (e.g., rewind)h]hfenables immediate mode (i.e., don’t wait for the command to finish) for some commands (e.g., rewind)}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hMT_ST_NOWAIT_EOF enables immediate filemark mode (i.e. when writing a filemark, don't wait for it to complete). Please see the BASICS note about MTWEOFI with respect to the possible dangers of writing immediate filemarks.h](jt)}(hMT_ST_NOWAIT_EOFh]hMT_ST_NOWAIT_EOF}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjmubj)}(hhh]h)}(henables immediate filemark mode (i.e. when writing a filemark, don't wait for it to complete). Please see the BASICS note about MTWEOFI with respect to the possible dangers of writing immediate filemarks.h]henables immediate filemark mode (i.e. when writing a filemark, don’t wait for it to complete). Please see the BASICS note about MTWEOFI with respect to the possible dangers of writing immediate filemarks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hXMT_ST_SILI enables setting the SILI bit in SCSI commands when reading in variable block mode to enhance performance when reading blocks shorter than the byte count; set this only if you are sure that the drive supports SILI and the HBA correctly returns transfer residualsh](jt)}(h MT_ST_SILIh]h MT_ST_SILI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMhjubj)}(hhh]h)}(hXenables setting the SILI bit in SCSI commands when reading in variable block mode to enhance performance when reading blocks shorter than the byte count; set this only if you are sure that the drive supports SILI and the HBA correctly returns transfer residualsh]hXenables setting the SILI bit in SCSI commands when reading in variable block mode to enhance performance when reading blocks shorter than the byte count; set this only if you are sure that the drive supports SILI and the HBA correctly returns transfer residuals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMhjubjn)}(hOMT_ST_DEBUGGING debugging (global; debugging must be compiled into the driver) h](jt)}(hMT_ST_DEBUGGINGh]hMT_ST_DEBUGGING}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM"hjubj)}(hhh]h)}(h>debugging (global; debugging must be compiled into the driver)h]h>debugging (global; debugging must be compiled into the driver)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhM"hjubeh}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1j9 hhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhM"hjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hGMT_ST_SETBOOLEANS, MT_ST_CLEARBOOLEANS Sets or clears the option bits.h]ji)}(hhh]jn)}(hFMT_ST_SETBOOLEANS, MT_ST_CLEARBOOLEANS Sets or clears the option bits.h](jt)}(h&MT_ST_SETBOOLEANS, MT_ST_CLEARBOOLEANSh]h&MT_ST_SETBOOLEANS, MT_ST_CLEARBOOLEANS}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM$hj%ubj)}(hhh]h)}(hSets or clears the option bits.h]hSets or clears the option bits.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj7ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jmhhhM$hj"ubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hkMT_ST_WRITE_THRESHOLD Sets the write threshold for this device to kilobytes specified by the lowest bits.h]ji)}(hhh]jn)}(hiMT_ST_WRITE_THRESHOLD Sets the write threshold for this device to kilobytes specified by the lowest bits.h](jt)}(hMT_ST_WRITE_THRESHOLDh]hMT_ST_WRITE_THRESHOLD}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM'hjgubj)}(hhh]h)}(hSSets the write threshold for this device to kilobytes specified by the lowest bits.h]hSSets the write threshold for this device to kilobytes specified by the lowest bits.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjyubah}(h]h ]h"]h$]h&]uh1jhjgubeh}(h]h ]h"]h$]h&]uh1jmhhhM'hjdubah}(h]h ]h"]h$]h&]uh1jhhj`ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hMT_ST_DEF_BLKSIZE Defines the default block size set automatically. Value 0xffffff means that the default is not used any more.h]ji)}(hhh]jn)}(hMT_ST_DEF_BLKSIZE Defines the default block size set automatically. Value 0xffffff means that the default is not used any more.h](jt)}(hMT_ST_DEF_BLKSIZEh]hMT_ST_DEF_BLKSIZE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM*hjubj)}(hhh]h)}(hmDefines the default block size set automatically. Value 0xffffff means that the default is not used any more.h]hmDefines the default block size set automatically. Value 0xffffff means that the default is not used any more.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhM*hjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXMT_ST_DEF_DENSITY, MT_ST_DEF_DRVBUFFER Used to set or clear the density (8 bits), and drive buffer state (3 bits). If the value is MT_ST_CLEAR_DEFAULT (0xfffff) the default will not be used any more. Otherwise the lowermost bits of the value contain the new value of the parameter.h]ji)}(hhh]jn)}(hXMT_ST_DEF_DENSITY, MT_ST_DEF_DRVBUFFER Used to set or clear the density (8 bits), and drive buffer state (3 bits). If the value is MT_ST_CLEAR_DEFAULT (0xfffff) the default will not be used any more. Otherwise the lowermost bits of the value contain the new value of the parameter.h](jt)}(h&MT_ST_DEF_DENSITY, MT_ST_DEF_DRVBUFFERh]h&MT_ST_DEF_DENSITY, MT_ST_DEF_DRVBUFFER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM0hjubj)}(hhh]h)}(hUsed to set or clear the density (8 bits), and drive buffer state (3 bits). If the value is MT_ST_CLEAR_DEFAULT (0xfffff) the default will not be used any more. Otherwise the lowermost bits of the value contain the new value of the parameter.h]hUsed to set or clear the density (8 bits), and drive buffer state (3 bits). If the value is MT_ST_CLEAR_DEFAULT (0xfffff) the default will not be used any more. Otherwise the lowermost bits of the value contain the new value of the parameter.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhM0hjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXpMT_ST_DEF_COMPRESSION The compression default will not be used if the value of the lowermost byte is 0xff. Otherwise the lowermost bit contains the new default. If the bits 8-15 are set to a non-zero number, and this number is not 0xff, the number is used as the compression algorithm. The value MT_ST_CLEAR_DEFAULT can be used to clear the compression default.h]ji)}(hhh]jn)}(hXiMT_ST_DEF_COMPRESSION The compression default will not be used if the value of the lowermost byte is 0xff. Otherwise the lowermost bit contains the new default. If the bits 8-15 are set to a non-zero number, and this number is not 0xff, the number is used as the compression algorithm. The value MT_ST_CLEAR_DEFAULT can be used to clear the compression default.h](jt)}(hMT_ST_DEF_COMPRESSIONh]hMT_ST_DEF_COMPRESSION}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM8hj-ubj)}(hhh]h)}(hXSThe compression default will not be used if the value of the lowermost byte is 0xff. Otherwise the lowermost bit contains the new default. If the bits 8-15 are set to a non-zero number, and this number is not 0xff, the number is used as the compression algorithm. The value MT_ST_CLEAR_DEFAULT can be used to clear the compression default.h]hXSThe compression default will not be used if the value of the lowermost byte is 0xff. Otherwise the lowermost bit contains the new default. If the bits 8-15 are set to a non-zero number, and this number is not 0xff, the number is used as the compression algorithm. The value MT_ST_CLEAR_DEFAULT can be used to clear the compression default.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj?ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jmhhhM8hj*ubah}(h]h ]h"]h$]h&]uh1jhhj&ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hMT_ST_SET_TIMEOUT Set the normal timeout in seconds for this device. The default is 900 seconds (15 minutes). The timeout should be long enough for the retries done by the device while reading/writing.h]ji)}(hhh]jn)}(hMT_ST_SET_TIMEOUT Set the normal timeout in seconds for this device. The default is 900 seconds (15 minutes). The timeout should be long enough for the retries done by the device while reading/writing.h](jt)}(hMT_ST_SET_TIMEOUTh]hMT_ST_SET_TIMEOUT}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM=hjoubj)}(hhh]h)}(hSet the normal timeout in seconds for this device. The default is 900 seconds (15 minutes). The timeout should be long enough for the retries done by the device while reading/writing.h]hSet the normal timeout in seconds for this device. The default is 900 seconds (15 minutes). The timeout should be long enough for the retries done by the device while reading/writing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jmhhhM=hjlubah}(h]h ]h"]h$]h&]uh1jhhjhubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hMT_ST_SET_LONG_TIMEOUT Set the long timeout that is used for operations that are known to take a long time. The default is 14000 seconds (3.9 hours). For erase this value is further multiplied by eight.h]ji)}(hhh]jn)}(hMT_ST_SET_LONG_TIMEOUT Set the long timeout that is used for operations that are known to take a long time. The default is 14000 seconds (3.9 hours). For erase this value is further multiplied by eight.h](jt)}(hMT_ST_SET_LONG_TIMEOUTh]hMT_ST_SET_LONG_TIMEOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMBhjubj)}(hhh]h)}(hSet the long timeout that is used for operations that are known to take a long time. The default is 14000 seconds (3.9 hours). For erase this value is further multiplied by eight.h]hSet the long timeout that is used for operations that are known to take a long time. The default is 14000 seconds (3.9 hours). For erase this value is further multiplied by eight.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMBhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXMT_ST_SET_CLN Set the cleaning request interpretation parameters using the lowest 24 bits of the argument. The driver can set the generic status bit GMT_CLN if a cleaning request bit pattern is found from the extended sense data. Many drives set one or more bits in the extended sense data when the drive needs cleaning. The bits are device-dependent. The driver is given the number of the sense data byte (the lowest eight bits of the argument; must be >= 18 (values 1 - 17 reserved) and <= the maximum requested sense data sixe), a mask to select the relevant bits (the bits 9-16), and the bit pattern (bits 17-23). If the bit pattern is zero, one or more bits under the mask indicate cleaning request. If the pattern is non-zero, the pattern must match the masked sense data byte. (The cleaning bit is set if the additional sense code and qualifier 00h 17h are seen regardless of the setting of MT_ST_SET_CLN.) h]ji)}(hhh]jn)}(hXMT_ST_SET_CLN Set the cleaning request interpretation parameters using the lowest 24 bits of the argument. The driver can set the generic status bit GMT_CLN if a cleaning request bit pattern is found from the extended sense data. Many drives set one or more bits in the extended sense data when the drive needs cleaning. The bits are device-dependent. The driver is given the number of the sense data byte (the lowest eight bits of the argument; must be >= 18 (values 1 - 17 reserved) and <= the maximum requested sense data sixe), a mask to select the relevant bits (the bits 9-16), and the bit pattern (bits 17-23). If the bit pattern is zero, one or more bits under the mask indicate cleaning request. If the pattern is non-zero, the pattern must match the masked sense data byte. (The cleaning bit is set if the additional sense code and qualifier 00h 17h are seen regardless of the setting of MT_ST_SET_CLN.) h](jt)}(h MT_ST_SET_CLNh]h MT_ST_SET_CLN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMVhjubj)}(hhh](h)}(hXSet the cleaning request interpretation parameters using the lowest 24 bits of the argument. The driver can set the generic status bit GMT_CLN if a cleaning request bit pattern is found from the extended sense data. Many drives set one or more bits in the extended sense data when the drive needs cleaning. The bits are device-dependent. The driver is given the number of the sense data byte (the lowest eight bits of the argument; must be >= 18 (values 1 - 17 reserved) and <= the maximum requested sense data sixe), a mask to select the relevant bits (the bits 9-16), and the bit pattern (bits 17-23). If the bit pattern is zero, one or more bits under the mask indicate cleaning request. If the pattern is non-zero, the pattern must match the masked sense data byte.h]hXSet the cleaning request interpretation parameters using the lowest 24 bits of the argument. The driver can set the generic status bit GMT_CLN if a cleaning request bit pattern is found from the extended sense data. Many drives set one or more bits in the extended sense data when the drive needs cleaning. The bits are device-dependent. The driver is given the number of the sense data byte (the lowest eight bits of the argument; must be >= 18 (values 1 - 17 reserved) and <= the maximum requested sense data sixe), a mask to select the relevant bits (the bits 9-16), and the bit pattern (bits 17-23). If the bit pattern is zero, one or more bits under the mask indicate cleaning request. If the pattern is non-zero, the pattern must match the masked sense data byte.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjubh)}(h(The cleaning bit is set if the additional sense code and qualifier 00h 17h are seen regardless of the setting of MT_ST_SET_CLN.)h]h(The cleaning bit is set if the additional sense code and qualifier 00h 17h are seen regardless of the setting of MT_ST_SET_CLN.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMVhjubah}(h]h ]h"]h$]h&]uh1jhhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j*uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jmhhhMVhj hhubeh}(h]h ]h"]h$]h&]uh1jhhj hhhhhNubh)}(h-The following ioctl uses the structure mtpos:h]h-The following ioctl uses the structure mtpos:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj hhubji)}(hhh]jn)}(hMTIOCPOS Reads the current position from the drive. Uses Tandberg-compatible QFA for SCSI-1 drives and the SCSI-2 command for the SCSI-2 drives. h](jt)}(hMTIOCPOSh]hMTIOCPOS}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhM]hjfubj)}(hhh]h)}(hReads the current position from the drive. Uses Tandberg-compatible QFA for SCSI-1 drives and the SCSI-2 command for the SCSI-2 drives.h]hReads the current position from the drive. Uses Tandberg-compatible QFA for SCSI-1 drives and the SCSI-2 command for the SCSI-2 drives.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjxubah}(h]h ]h"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]uh1jmhhhM]hjcubah}(h]h ]h"]h$]h&]uh1jhhj hhhhhNubh)}(hBThe following ioctl uses the structure mtget to return the status:h]hBThe following ioctl uses the structure mtget to return the status:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hj hhubji)}(hhh]jn)}(hXMTIOCGET Returns some status information. The file number and block number within file are returned. The block is -1 when it can't be determined (e.g., after MTBSF). The drive type is either MTISSCSI1 or MTISSCSI2. The number of recovered errors since the previous status call is stored in the lower word of the field mt_erreg. The current block size and the density code are stored in the field mt_dsreg (shifts for the subfields are MT_ST_BLKSIZE_SHIFT and MT_ST_DENSITY_SHIFT). The GMT_xxx status bits reflect the drive status. GMT_DR_OPEN is set if there is no tape in the drive. GMT_EOD means either end of recorded data or end of tape. GMT_EOT means end of tape. h](jt)}(hMTIOCGETh]hMTIOCGET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jshhhMnhjubj)}(hhh]h)}(hXReturns some status information. The file number and block number within file are returned. The block is -1 when it can't be determined (e.g., after MTBSF). The drive type is either MTISSCSI1 or MTISSCSI2. The number of recovered errors since the previous status call is stored in the lower word of the field mt_erreg. The current block size and the density code are stored in the field mt_dsreg (shifts for the subfields are MT_ST_BLKSIZE_SHIFT and MT_ST_DENSITY_SHIFT). The GMT_xxx status bits reflect the drive status. GMT_DR_OPEN is set if there is no tape in the drive. GMT_EOD means either end of recorded data or end of tape. GMT_EOT means end of tape.h]hXReturns some status information. The file number and block number within file are returned. The block is -1 when it can’t be determined (e.g., after MTBSF). The drive type is either MTISSCSI1 or MTISSCSI2. The number of recovered errors since the previous status call is stored in the lower word of the field mt_erreg. The current block size and the density code are stored in the field mt_dsreg (shifts for the subfields are MT_ST_BLKSIZE_SHIFT and MT_ST_DENSITY_SHIFT). The GMT_xxx status bits reflect the drive status. GMT_DR_OPEN is set if there is no tape in the drive. GMT_EOD means either end of recorded data or end of tape. GMT_EOT means end of tape.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jmhhhMnhjubah}(h]h ]h"]h$]h&]uh1jhhj hhhhhNubeh}(h]ioctlsah ]h"]ioctlsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hMiscellaneous Compile Optionsh]hMiscellaneous Compile Options}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMqubh)}(hWThe recovered write errors are considered fatal if ST_RECOVERED_WRITE_FATAL is defined.h]hWThe recovered write errors are considered fatal if ST_RECOVERED_WRITE_FATAL is defined.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjhhubh)}(hThe maximum number of tape devices is determined by the define ST_MAX_TAPES. If more tapes are detected at driver initialization, the maximum is adjusted accordingly.h]hThe maximum number of tape devices is determined by the define ST_MAX_TAPES. If more tapes are detected at driver initialization, the maximum is adjusted accordingly.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjhhubh)}(hXqImmediate return from tape positioning SCSI commands can be enabled by defining ST_NOWAIT. If this is defined, the user should take care that the next tape operation is not started before the previous one has finished. The drives and SCSI adapters should handle this condition gracefully, but some drive/adapter combinations are known to hang the SCSI bus in this case.h]hXqImmediate return from tape positioning SCSI commands can be enabled by defining ST_NOWAIT. If this is defined, the user should take care that the next tape operation is not started before the previous one has finished. The drives and SCSI adapters should handle this condition gracefully, but some drive/adapter combinations are known to hang the SCSI bus in this case.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjhhubh)}(hX#The MTEOM command is by default implemented as spacing over 32767 filemarks. With this method the file number in the status is correct. The user can request using direct spacing to EOD by setting ST_FAST_EOM 1 (or using the MT_ST_OPTIONS ioctl). In this case the file number will be invalid.h]hX#The MTEOM command is by default implemented as spacing over 32767 filemarks. With this method the file number in the status is correct. The user can request using direct spacing to EOD by setting ST_FAST_EOM 1 (or using the MT_ST_OPTIONS ioctl). In this case the file number will be invalid.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXWhen using read ahead or buffered writes the position within the file may not be correct after the file is closed (correct position may require backspacing over more than one record). The correct position within file can be obtained if ST_IN_FILE_POS is defined at compile time or the MT_ST_CAN_BSR bit is set for the drive with an ioctl. (The driver always backs over a filemark crossed by read ahead if the user does not request data that far.)h]hXWhen using read ahead or buffered writes the position within the file may not be correct after the file is closed (correct position may require backspacing over more than one record). The correct position within file can be obtained if ST_IN_FILE_POS is defined at compile time or the MT_ST_CAN_BSR bit is set for the drive with an ioctl. (The driver always backs over a filemark crossed by read ahead if the user does not request data that far.)}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]miscellaneous-compile-optionsah ]h"]miscellaneous compile optionsah$]h&]uh1hhhhhhhhMqubh)}(hhh](h)}(hDebugging Hintsh]hDebugging Hints}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhMubh)}(hXDebugging code is now compiled in by default but debugging is turned off with the kernel module parameter debug_flag defaulting to 0. Debugging can still be switched on and off with an ioctl. To enable debug at module load time add debug_flag=1 to the module load options, the debugging output is not voluminous. Debugging can also be enabled and disabled by writing a '0' (disable) or '1' (enable) to the sysfs file /sys/bus/scsi/drivers/st/debug_flag.h]hXDebugging code is now compiled in by default but debugging is turned off with the kernel module parameter debug_flag defaulting to 0. Debugging can still be switched on and off with an ioctl. To enable debug at module load time add debug_flag=1 to the module load options, the debugging output is not voluminous. Debugging can also be enabled and disabled by writing a ‘0’ (disable) or ‘1’ (enable) to the sysfs file /sys/bus/scsi/drivers/st/debug_flag.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubh)}(hXIf the tape seems to hang, I would be very interested to hear where the driver is waiting. With the command 'ps -l' you can see the state of the process using the tape. If the state is D, the process is waiting for something. The field WCHAN tells where the driver is waiting. If you have the current System.map in the correct place (in /boot for the procps I use) or have updated /etc/psdatabase (for kmem ps), ps writes the function name in the WCHAN field. If not, you have to look up the function from System.map.h]hX If the tape seems to hang, I would be very interested to hear where the driver is waiting. With the command ‘ps -l’ you can see the state of the process using the tape. If the state is D, the process is waiting for something. The field WCHAN tells where the driver is waiting. If you have the current System.map in the correct place (in /boot for the procps I use) or have updated /etc/psdatabase (for kmem ps), ps writes the function name in the WCHAN field. If not, you have to look up the function from System.map.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubh)}(hNote also that the timeouts are very long compared to most other drivers. This means that the Linux driver may appear hung although the real reason is that the tape firmware has got confused.h]hNote also that the timeouts are very long compared to most other drivers. This means that the Linux driver may appear hung although the real reason is that the tape firmware has got confused.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubeh}(h]debugging-hintsah ]h"]debugging hintsah$]h&]uh1hhhhhhhhMubeh}(h]the-scsi-tape-driverah ]h"]the scsi tape driverah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjjTjQjjj j jAj>j]jZjjj j j j jjjEjBjju nametypes}(jjjTjj jAj]jj j jjEjuh}(jhjhjQjjjWj jj>jjZjDjj`j jj j jj jBjjjHu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.