aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2014-06-04 10:58:30 -0400
committerChristoph Hellwig <hch@lst.de>2014-07-17 22:07:34 +0200
commit16070cc189c5e343696c29c8cff779e692cfcb8d (patch)
tree00edc84093c62557235b118fe8e3e28441c07dce /include/scsi
parentsg: relax 16 byte cdb restriction (diff)
downloadlinux-dev-16070cc189c5e343696c29c8cff779e692cfcb8d.tar.xz
linux-dev-16070cc189c5e343696c29c8cff779e692cfcb8d.zip
sg: add SG_FLAG_Q_AT_TAIL flag
When the SG_IO ioctl was copied into the block layer and later into the bsg driver, subtle differences emerged. One difference is the way injected commands are queued through the block layer (i.e. this is not SCSI device queueing nor SATA NCQ). Summarizing: - SG_IO in the block layer: blk_exec*(at_head=false) - sg SG_IO: at_head=true - bsg SG_IO: at_head=true Some time ago Boaz Harrosh introduced a sg v4 flag called BSG_FLAG_Q_AT_TAIL to override the bsg driver default. This patch does the equivalent for the sg driver. ChangeLog: Introduce SG_FLAG_Q_AT_TAIL flag to cause commands to be injected into the block layer with at_head=false. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/sg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/sg.h b/include/scsi/sg.h
index d8c0c4307fca..9859355a7cf9 100644
--- a/include/scsi/sg.h
+++ b/include/scsi/sg.h
@@ -86,6 +86,7 @@ typedef struct sg_io_hdr
#define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */
#define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */
/* user space (debug indirect IO) */
+#define SG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */
/* following 'info' values are "or"-ed together */
#define SG_INFO_OK_MASK 0x1