Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
67aa3988
Commit
67aa3988
authored
Jun 17, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge home.transmeta.com:/home/torvalds/v2.5/scsi-tape
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
94173f68
f179b6ce
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
152 additions
and
338 deletions
+152
-338
drivers/scsi/README.st
drivers/scsi/README.st
+13
-33
drivers/scsi/st.c
drivers/scsi/st.c
+134
-295
drivers/scsi/st_options.h
drivers/scsi/st_options.h
+5
-10
No files found.
drivers/scsi/README.st
View file @
67aa3988
...
...
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
The
driver
is
currently
maintained
by
Kai
M
{
kisara
(
email
Kai
.
Makisara
@
metla
.
fi
)
Last
modified:
Tue
J
an
22
21
:
08
:
57
2002
by
makisara
Last
modified:
Tue
J
un
18
18
:
13
:
50
2002
by
makisara
BASICS
...
...
@@ -105,15 +105,19 @@ The default is BSD semantics.
BUFFERING
The driver uses tape buffers allocated either at system initialization
or at run-time when needed. One buffer is used for each open tape
device. The size of the buffers is selectable at compile and/or boot
time. The buffers are used to store the data being transferred to/from
the SCSI adapter. The following buffering options are selectable at
compile time and/or at run time (via ioctl):
The driver uses tape buffers allocated at run-time when needed and it
is freed when the device file is closed. One buffer is used for each
open tape device.
The size of the 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. 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.
Buffering of data across write calls in fixed block mode (define
ST_BUFFER_WRITES).
Asynchronous writing. Writing the buffer contents to the tape is
started and the write call returns immediately. The status is checked
...
...
@@ -128,30 +132,6 @@ 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.
The buffer size is defined (in 1024 byte units) by ST_BUFFER_BLOCKS or
at boot time. If this size is not large enough, the driver tries to
temporarily enlarge the buffer. Buffer allocation uses chunks of
memory having sizes 2^n * (page size). Because of this the actual
buffer size may be larger than the buffer size specified with
ST_BUFFER_BLOCKS.
A small number of buffers are allocated at driver initialisation. The
maximum number of these buffers is defined by ST_MAX_BUFFERS. The
maximum can be changed with kernel or module startup options. One
buffer is allocated for each drive detected when the driver is
initialized up to the maximum.
The driver tries to allocate new buffers at run-time if
necessary. These buffers are freed after use. If the maximum number of
initial buffers is set to zero, all buffer allocation is done at
run-time. The advantage of run-time allocation is that memory is not
wasted for buffers not being used. The disadvantage is that there may
not be memory available at the time when a buffer is needed for the
first time (once a buffer is allocated, it is not released). This risk
should not be big if the tape drive is connected to a PCI adapter that
supports scatter/gather (the allocation is not limited to "DMA memory"
and the buffer can be composed of several fragments).
The threshold for triggering asynchronous write in fixed block mode
is defined by ST_WRITE_THRESHOLD. This may be optimized for each
use pattern. The default triggers asynchronous write after three
...
...
drivers/scsi/st.c
View file @
67aa3988
This diff is collapsed.
Click to expand it.
drivers/scsi/st_options.h
View file @
67aa3988
...
...
@@ -3,7 +3,7 @@
Copyright 1995-2000 Kai Makisara.
Last modified:
Tue Jan 22 21:52:34
2002 by makisara
Last modified:
Sun May 5 15:09:56
2002 by makisara
*/
#ifndef _ST_OPTIONS_H
...
...
@@ -30,22 +30,17 @@
SENSE. */
#define ST_DEFAULT_BLOCK 0
/* The tape driver buffer size in kilobytes. Must be non-zero. */
#define ST_BUFFER_BLOCKS 32
/* The minimum tape driver buffer size in kilobytes in fixed block mode.
Must be non-zero. */
#define ST_FIXED_BUFFER_BLOCKS 32
/* The number of kilobytes of data in the buffer that triggers an
asynchronous write in fixed block mode. See also ST_ASYNC_WRITES
below. */
#define ST_WRITE_THRESHOLD_BLOCKS 30
/* The maximum number of tape buffers the driver tries to allocate at
driver initialisation. The number is also constrained by the number
of drives detected. If more buffers are needed, they are allocated
at run time and freed after use. */
#define ST_MAX_BUFFERS 4
/* Maximum number of scatter/gather segments */
#define ST_MAX_SG
16
#define ST_MAX_SG
64
/* The number of scatter/gather segments to allocate at first try (must be
smaller or equal to the maximum). */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment