以下大多数编译选项都可以通过启动/模块参数和/或运行时配置(即 ioctl)来覆盖。
以下参数在 linux/drivers/scsi/st_options.h 中定义
ST_NOWAIT {0} ST_IN_FILE_POS {0} ST_RECOVERED_WRITE_FATAL {0} ST_DEFAULT_BLOCK {0} ST_BUFFER_BLOCKS {32} ST_WRITE_THRESHOLD_BLOCKS {30} ST_MAX_BUFFERS {4} ST_MAX_SG {16} ST_FIRST_SG {8} ST_FIRST_ORDER {5} ST_TWO_FM {0} ST_BUFFER_WRITES {1} ST_ASYNC_WRITES {1} ST_READ_AHEAD {1} ST_AUTO_LOCK {0} ST_FAST_MTEOM {0} ST_SCSI2LOGICAL {0} ST_SYSV {0} |
以下参数在 linux/drivers/scsi/st.c 中定义
ST_TIMEOUT {900*HZ} ST_LONG_TIMEOUT {14000*HZ} |
Linux 磁带接口在以下文件中定义:/usr/src/linux/include/linux/mtio.h.
以下 ioctl() 按字母顺序排列,右侧附有简要说明。[有关更多详细信息,请参阅 st 文档(尤其是 man 4 st)。]
MTIOCTOP [execute tape commands and set drive/driver options] MTIOCGET [get the status of the drive] MTIOCPOS [get the current tape location] open() O_RDONLY, O_RDWR close() read() write() ioctl() |