diff options
author | Lee Duncan <lduncan@suse.com> | 2012-03-01 12:41:01 -0800 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-03-27 08:26:34 +0100 |
commit | c743e44fbb1f8668941e83de07662b1ecd33d083 (patch) | |
tree | c0a5eacf103f566942b8e8e7c222b3fa588657a4 /include/linux/mtio.h | |
parent | 3194eef325c126d1f3bfa28317e2acd78292250d (diff) | |
download | talos-op-linux-c743e44fbb1f8668941e83de07662b1ecd33d083.tar.gz talos-op-linux-c743e44fbb1f8668941e83de07662b1ecd33d083.zip |
[SCSI] st: expand ability to write immediate filemarks
The st tape driver recently added the MTWEOFI ioctl, which writes
a tape filemark (EOF), like the MTWEOF ioctl, except that MTWEOFI
returns immediately. This makes certain applications, like backup
software, run much more quickly on buffered tape drives.
Since legacy applications do not know about this new MTWEOFI ioctl,
this patch adds a new ioctl option that tells the st driver to return
immediately when writing an EOF (i.e. a filemark). This new flag
is much like the existing flag that tells the st driver to perform
writes (and certain other IOs) immediately, but this new flag only
applies to writing EOFs.
This new feature is controlled via the MTSETDRVBUFFER ioctl, using
the newly-defined MT_ST_NOWAIT_EOF flag.
Use of this new feature is displayed via the sysfs tape "options"
attribute.
The st documentation was updated to mention this new flag, as well
as the problems that can occur from using it.
Signed-off-by: Lee Duncan <lduncan@suse.com>
Acked-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/linux/mtio.h')
-rw-r--r-- | include/linux/mtio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mtio.h b/include/linux/mtio.h index 8f825756c459..18543e2db06f 100644 --- a/include/linux/mtio.h +++ b/include/linux/mtio.h @@ -194,6 +194,7 @@ struct mtpos { #define MT_ST_SYSV 0x1000 #define MT_ST_NOWAIT 0x2000 #define MT_ST_SILI 0x4000 +#define MT_ST_NOWAIT_EOF 0x8000 /* The mode parameters to be controlled. Parameter chosen with bits 20-28 */ #define MT_ST_CLEAR_DEFAULT 0xfffff |