brintos

brintos / linux-shallow public Read only

0
0
Text · 3.9 KiB · 2b6cabd Raw
106 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/*3   The compile-time configurable defaults for the Linux SCSI tape driver.4 5   Copyright 1995-2003 Kai Makisara.6 7   Last modified: Thu Feb 21 21:47:07 2008 by kai.makisara8*/9 10#ifndef _ST_OPTIONS_H11#define _ST_OPTIONS_H12 13/* If TRY_DIRECT_IO is non-zero, the driver tries to transfer data directly14   between the user buffer and tape drive. If this is not possible, driver15   buffer is used. If TRY_DIRECT_IO is zero, driver buffer is always used. */16#define TRY_DIRECT_IO 117 18/* The driver does not wait for some operations to finish before returning19   to the user program if ST_NOWAIT is non-zero. This helps if the SCSI20   adapter does not support multiple outstanding commands. However, the user21   should not give a new tape command before the previous one has finished. */22#define ST_NOWAIT 023 24/* If ST_IN_FILE_POS is nonzero, the driver positions the tape after the25   record been read by the user program even if the tape has moved further26   because of buffered reads. Should be set to zero to support also drives27   that can't space backwards over records. NOTE: The tape will be28   spaced backwards over an "accidentally" crossed filemark in any case. */29#define ST_IN_FILE_POS 030 31/* If ST_RECOVERED_WRITE_FATAL is non-zero, recovered errors while writing32   are considered "hard errors". */33#define ST_RECOVERED_WRITE_FATAL 034 35/* The "guess" for the block size for devices that don't support MODE36   SENSE. */37#define ST_DEFAULT_BLOCK 038 39/* The minimum tape driver buffer size in kilobytes in fixed block mode.40   Must be non-zero. */41#define ST_FIXED_BUFFER_BLOCKS 3242 43/* Maximum number of scatter/gather segments */44#define ST_MAX_SG      25645 46/* The number of scatter/gather segments to allocate at first try (must be47   smaller or equal to the maximum). */48#define ST_FIRST_SG    849 50/* The size of the first scatter/gather segments (determines the maximum block51   size for SCSI adapters not supporting scatter/gather). The default is set52   to try to allocate the buffer as one chunk. */53#define ST_FIRST_ORDER  554 55 56/* The following lines define defaults for properties that can be set57   separately for each drive using the MTSTOPTIONS ioctl. */58 59/* If ST_TWO_FM is non-zero, the driver writes two filemarks after a60   file being written. Some drives can't handle two filemarks at the61   end of data. */62#define ST_TWO_FM 063 64/* If ST_BUFFER_WRITES is non-zero, writes in fixed block mode are65   buffered until the driver buffer is full or asynchronous write is66   triggered. May make detection of End-Of-Medium early enough fail. */67#define ST_BUFFER_WRITES 168 69/* If ST_ASYNC_WRITES is non-zero, the SCSI write command may be started70   without waiting for it to finish. May cause problems in multiple71   tape backups. */72#define ST_ASYNC_WRITES 173 74/* If ST_READ_AHEAD is non-zero, blocks are read ahead in fixed block75   mode. */76#define ST_READ_AHEAD 177 78/* If ST_AUTO_LOCK is non-zero, the drive door is locked at the first79   read or write command after the device is opened. The door is opened80   when the device is closed. */81#define ST_AUTO_LOCK 082 83/* If ST_FAST_MTEOM is non-zero, the MTEOM ioctl is done using the84   direct SCSI command. The file number status is lost but this method85   is fast with some drives. Otherwise MTEOM is done by spacing over86   files and the file number status is retained. */87#define ST_FAST_MTEOM 088 89/* If ST_SCSI2LOGICAL is nonzero, the logical block addresses are used for90   MTIOCPOS and MTSEEK by default. Vendor addresses are used if ST_SCSI2LOGICAL91   is zero. */92#define ST_SCSI2LOGICAL 093 94/* If ST_SYSV is non-zero, the tape behaves according to the SYS V semantics.95   The default is BSD semantics. */96#define ST_SYSV 097 98/* If ST_SILI is non-zero, the SILI bit is set when reading in variable block99   mode and the block size is determined using the residual returned by the HBA. */100#define ST_SILI 0101 102/* Time to wait for the drive to become ready if blocking open */103#define ST_BLOCK_SECONDS     120104 105#endif106