From: <vl...@us...> - 2007-07-05 14:37:40
|
Revision: 142 http://svn.sourceforge.net/scst/?rev=142&view=rev Author: vlnb Date: 2007-07-05 07:37:36 -0700 (Thu, 05 Jul 2007) Log Message: ----------- - Kernel patches were renamed (in this commit only deleted) - VDISK_ONLY was removed, SCSI_EXEC_REQ_FIFO_DEFINED, defined by corresponding kernel patch used instead - Minor fixes - Docs updates All users will need to revert old SCST kernel patch and apply the corresponding new one. Modified Paths: -------------- trunk/scst/README trunk/scst/src/Makefile trunk/scst/src/dev_handlers/scst_user.c trunk/scst/src/scst.c trunk/scst/src/scst_debug.c trunk/scst/src/scst_priv.h Added Paths: ----------- trunk/scst/kernel/old_unsupported/ Removed Paths: ------------- trunk/scst/kernel/26_scst-2.6.14-.patch trunk/scst/kernel/26_scst-2.6.15+.patch trunk/scst/kernel/26_scst-2.6.16.patch trunk/scst/kernel/26_scst-2.6.18.patch trunk/scst/kernel/26_scst-2.6.21.patch Modified: trunk/scst/README =================================================================== --- trunk/scst/README 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/README 2007-07-05 14:37:36 UTC (rev 142) @@ -22,7 +22,7 @@ devices as virtual remotely available SCSI disks or CDROMs with benefits of the Linux page cache - * BLOCKIO mode, which performsd irect block IO with a block device, + * BLOCKIO mode, which performs direct block IO with a block device, bypassing page-cache for all operations. This mode works ideally with high-end storage HBAs and for applications that either do not need caching between application and disk or need the large block @@ -53,11 +53,11 @@ Then, since in the mainstream kernels scsi_do_req()/scsi_execute_async() work in LIFO order, instead of expected and required FIFO, SCST needs a new functions scsi_do_req_fifo()/scsi_execute_async_fifo() to be added -in the kernel. Patch 26_scst-2.6.X.patch from "kernel" directory does -that. If it doesn't apply to your kernel, apply it manually, it only -adds one of those functions and nothing more. You may not patch the -kernel if STRICT_SERIALIZING or VDISK_ONLY are defined during the -compilation (see their description below). +in the kernel. Patch scst_exec_req_fifo.patch from "kernel" directory +does that. If it doesn't apply to your kernel, apply it manually, it +only adds one of those functions and nothing more. You may not patch the +kernel if you don't need pass-through support or STRICT_SERIALIZING is +defined during the compilation (see description below). To compile SCST type 'make'. It will build SCST itself and its device handlers. To install them type 'make install'. The driver modules will @@ -161,11 +161,6 @@ There are the following compilation options, that could be commented in/out in Makefile: - - VDISK_ONLY - if defined, the pass-through device handlers - (scst_disk, scst_tape) will not work, but SCST will not require the - kernel patching. Defined by default to ease new people try SCST on - their kernels. - - DEBUG - turns on some debugging code, including some logging. Makes the driver considerably bigger and slower, producing large amount of log data. @@ -196,17 +191,34 @@ patching is necessary. - SCST_HIGHMEM - if defined on HIGHMEM systems with 2.6 kernels, it - allows SCST to use HIGHMEM. This is very experimental feature and it - is unclear, if it brings something valuable, except some performance - hit, so in the current version it is disabled. Note, that + allows SCST to use HIGHMEM. This is very experimental feature, which + is currently broken and unsupported, since it is unclear, if it + brings something valuable, except some performance hit. Note, that SCST_HIGHMEM isn't required for HIGHMEM systems and SCST will work - fine on them with SCST_HIGHMEM off. Untested. + fine on them with SCST_HIGHMEM off. - - SCST_STRICT_SECURITY - if defined, makes SCST clean allocated data + - SCST_STRICT_SECURITY - if defined, makes SCST zero allocated data buffers. Undefining it (default) considerably improves performance and eases CPU load, but could create a security hole (information leakage), so enable it, if you have strict security requirements. +HIGHMEM kernel configurations are fully supported, but not recommended +for performance reasons, except for scst_user, where they are not +supported, because this module deals with user supplied memory on a +zero-copy manner. Consider change VMSPLIT option or use 64-bit system +configuration instead. + +For changing VMSPLIT option (CONFIG_VMSPLIT to be precise) you should in +"make menuconfig" command set the following variables: + + - General setup->Configure standard kernel features (for small systems): ON + + - Processor type and features->High Memory Support: OFF + + - Processor type and features->Memory split: according to amount of + memory you have. If it is less than 800MB, you may not touch this + option at all. + Module parameters ----------------- @@ -491,7 +503,7 @@ same as BLOCKIO, but also supports files, so for some loads it could be significantly faster, than regular FILEIO access, provided by scst_vdisk. All the words about BLOCKIO from above apply to O_DIRECT as -well. While running fileio_tgt if you don't uderstand some its options, +well. While running fileio_tgt if you don't understand some its options, use defaults for them, those values are the fastest. Performance @@ -606,7 +618,7 @@ * Nathaniel Clark <na...@mi...> for fixes and comments. - * Calvin Morrow <cal...@co...> for testing and usful + * Calvin Morrow <cal...@co...> for testing and useful suggestions. * Hu Gang <hu...@so...> for the original version of the Deleted: trunk/scst/kernel/26_scst-2.6.14-.patch =================================================================== --- trunk/scst/kernel/26_scst-2.6.14-.patch 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/kernel/26_scst-2.6.14-.patch 2007-07-05 14:37:36 UTC (rev 142) @@ -1,77 +0,0 @@ ---- linux-2.6.12-rc6/drivers/scsi/scsi_lib.c_scst 2005-06-15 16:15:01.000000000 +0400 -+++ linux-2.6.12-rc6/drivers/scsi/scsi_lib.c 2005-06-23 20:28:20.802971272 +0400 -@@ -235,6 +235,61 @@ void scsi_do_req(struct scsi_request *sr - } - EXPORT_SYMBOL(scsi_do_req); - -+/* -+ * Function: scsi_do_req_fifo -+ * -+ * Purpose: Queue a SCSI request -+ * -+ * Arguments: sreq - command descriptor. -+ * cmnd - actual SCSI command to be performed. -+ * buffer - data buffer. -+ * bufflen - size of data buffer. -+ * done - completion function to be run. -+ * timeout - how long to let it run before timeout. -+ * retries - number of retries we allow. -+ * -+ * Lock status: No locks held upon entry. -+ * -+ * Returns: Nothing. -+ * -+ * Notes: This function is used for queueing requests in FIFO order. -+ * It is a copy of scsi_do_req() with only changed the last -+ * parameter of scsi_insert_special_req(). Not sure, if it -+ * breaks quiesce, but, anyway, I don't see another way to -+ * queue requests in FIFO order, which is necessary for SCST. -+ */ -+void scsi_do_req_fifo(struct scsi_request *sreq, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done)(struct scsi_cmnd *), -+ int timeout, int retries) -+{ -+ /* -+ * If the upper level driver is reusing these things, then -+ * we should release the low-level block now. Another one will -+ * be allocated later when this request is getting queued. -+ */ -+ __scsi_release_request(sreq); -+ -+ /* -+ * Our own function scsi_done (which marks the host as not busy, -+ * disables the timeout counter, etc) will be called by us or by the -+ * scsi_hosts[host].queuecommand() function needs to also call -+ * the completion function for the high level driver. -+ */ -+ memcpy(sreq->sr_cmnd, cmnd, sizeof(sreq->sr_cmnd)); -+ sreq->sr_bufflen = bufflen; -+ sreq->sr_buffer = buffer; -+ sreq->sr_allowed = retries; -+ sreq->sr_done = done; -+ sreq->sr_timeout_per_command = timeout; -+ -+ if (sreq->sr_cmd_len == 0) -+ sreq->sr_cmd_len = COMMAND_SIZE(sreq->sr_cmnd[0]); -+ -+ scsi_insert_special_req(sreq, 0); -+} -+EXPORT_SYMBOL(scsi_do_req_fifo); -+ - static void scsi_wait_done(struct scsi_cmnd *cmd) - { - struct request *req = cmd->request; ---- linux-2.6.12-rc6/include/scsi/scsi_request.h_scst 2005-06-23 20:08:59.475519880 +0400 -+++ linux-2.6.12-rc6/include/scsi/scsi_request.h 2005-06-23 20:08:26.881474928 +0400 -@@ -54,6 +54,10 @@ extern void scsi_do_req(struct scsi_requ - void *buffer, unsigned bufflen, - void (*done) (struct scsi_cmnd *), - int timeout, int retries); -+extern void scsi_do_req_fifo(struct scsi_request *, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done) (struct scsi_cmnd *), -+ int timeout, int retries); - - struct scsi_mode_data { - __u32 length; Deleted: trunk/scst/kernel/26_scst-2.6.15+.patch =================================================================== --- trunk/scst/kernel/26_scst-2.6.15+.patch 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/kernel/26_scst-2.6.15+.patch 2007-07-05 14:37:36 UTC (rev 142) @@ -1,75 +0,0 @@ ---- linux-2.6.15.6/drivers/scsi/scsi_lib.c_scst 2006-03-05 22:07:54.000000000 +0300 -+++ linux-2.6.15.6/drivers/scsi/scsi_lib.c 2006-03-27 17:56:59.000000000 +0400 -@@ -254,6 +254,61 @@ - } - EXPORT_SYMBOL(scsi_do_req); - -+/* -+ * Function: scsi_do_req_fifo -+ * -+ * Purpose: Queue a SCSI request -+ * -+ * Arguments: sreq - command descriptor. -+ * cmnd - actual SCSI command to be performed. -+ * buffer - data buffer. -+ * bufflen - size of data buffer. -+ * done - completion function to be run. -+ * timeout - how long to let it run before timeout. -+ * retries - number of retries we allow. -+ * -+ * Lock status: No locks held upon entry. -+ * -+ * Returns: Nothing. -+ * -+ * Notes: This function is used for queueing requests in FIFO order. -+ * It is a copy of scsi_do_req() with only changed the last -+ * parameter of scsi_insert_special_req(). Not sure, if it -+ * breaks quiesce, but, anyway, I don't see another way to -+ * queue requests in FIFO order, which is necessary for SCST. -+ */ -+void scsi_do_req_fifo(struct scsi_request *sreq, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done)(struct scsi_cmnd *), -+ int timeout, int retries) -+{ -+ /* -+ * If the upper level driver is reusing these things, then -+ * we should release the low-level block now. Another one will -+ * be allocated later when this request is getting queued. -+ */ -+ __scsi_release_request(sreq); -+ -+ /* -+ * Our own function scsi_done (which marks the host as not busy, -+ * disables the timeout counter, etc) will be called by us or by the -+ * scsi_hosts[host].queuecommand() function needs to also call -+ * the completion function for the high level driver. -+ */ -+ memcpy(sreq->sr_cmnd, cmnd, sizeof(sreq->sr_cmnd)); -+ sreq->sr_bufflen = bufflen; -+ sreq->sr_buffer = buffer; -+ sreq->sr_allowed = retries; -+ sreq->sr_done = done; -+ sreq->sr_timeout_per_command = timeout; -+ -+ if (sreq->sr_cmd_len == 0) -+ sreq->sr_cmd_len = COMMAND_SIZE(sreq->sr_cmnd[0]); -+ -+ scsi_insert_special_req(sreq, 0); -+} -+EXPORT_SYMBOL(scsi_do_req_fifo); -+ - /** - * scsi_execute - insert request and wait for the result - * @sdev: scsi device ---- linux-2.6.15.6/include/scsi/scsi_request.h_scst 2006-03-27 17:54:21.000000000 +0400 -+++ linux-2.6.15.6/include/scsi/scsi_request.h 2006-03-27 17:56:00.000000000 +0400 -@@ -51,4 +51,8 @@ - void *buffer, unsigned bufflen, - void (*done) (struct scsi_cmnd *), - int timeout, int retries); -+extern void scsi_do_req_fifo(struct scsi_request *, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done) (struct scsi_cmnd *), -+ int timeout, int retries); - #endif /* _SCSI_SCSI_REQUEST_H */ Deleted: trunk/scst/kernel/26_scst-2.6.16.patch =================================================================== --- trunk/scst/kernel/26_scst-2.6.16.patch 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/kernel/26_scst-2.6.16.patch 2007-07-05 14:37:36 UTC (rev 142) @@ -1,77 +0,0 @@ ---- linux-2.6.16/drivers/scsi/scsi_lib.c.orig 2006-03-20 00:53:29.000000000 -0500 -+++ linux-2.6.16/drivers/scsi/scsi_lib.c 2006-04-07 10:04:42.077637750 -0400 -@@ -227,6 +227,63 @@ void scsi_do_req(struct scsi_request *sr - } - EXPORT_SYMBOL(scsi_do_req); - -+/* -+ * Function: scsi_do_req_fifo -+ * -+ * Purpose: Queue a SCSI request -+ * -+ * Arguments: sreq - command descriptor. -+ * cmnd - actual SCSI command to be performed. -+ * buffer - data buffer. -+ * bufflen - size of data buffer. -+ * done - completion function to be run. -+ * timeout - how long to let it run before timeout. -+ * retries - number of retries we allow. -+ * -+ * Lock status: No locks held upon entry. -+ * -+ * Returns: Nothing. -+ * -+ * Notes: This function is used for queueing requests in FIFO order. -+ * It is a copy of scsi_do_req() with only changed the last -+ * parameter of scsi_insert_special_req(). Not sure, if it -+ * breaks quiesce, but, anyway, I don't see another way to -+ * queue requests in FIFO order, which is necessary for SCST. -+ */ -+void scsi_do_req_fifo(struct scsi_request *sreq, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done)(struct scsi_cmnd *), -+ int timeout, int retries) -+{ -+ /* -+ * If the upper level driver is reusing these things, then -+ * we should release the low-level block now. Another one will -+ * be allocated later when this request is getting queued. -+ */ -+ __scsi_release_request(sreq); -+ -+ /* -+ * Our own function scsi_done (which marks the host as not busy, -+ * disables the timeout counter, etc) will be called by us or by the -+ * scsi_hosts[host].queuecommand() function needs to also call -+ * the completion function for the high level driver. -+ */ -+ memcpy(sreq->sr_cmnd, cmnd, sizeof(sreq->sr_cmnd)); -+ sreq->sr_bufflen = bufflen; -+ sreq->sr_buffer = buffer; -+ sreq->sr_allowed = retries; -+ sreq->sr_done = done; -+ sreq->sr_timeout_per_command = timeout; -+ -+ if (sreq->sr_cmd_len == 0) -+ sreq->sr_cmd_len = COMMAND_SIZE(sreq->sr_cmnd[0]); -+ -+ sreq->sr_request->flags &= ~REQ_DONTPREP; -+ blk_insert_request(sreq->sr_device->request_queue, sreq->sr_request, -+ 1, sreq); -+} -+EXPORT_SYMBOL(scsi_do_req_fifo); -+ - /** - * scsi_execute - insert request and wait for the result - * @sdev: scsi device ---- linux-2.6.16/include/scsi/scsi_request.h.orig 2006-04-07 10:06:02.506664250 -0400 -+++ linux-2.6.16/include/scsi/scsi_request.h 2006-04-07 10:06:19.039697500 -0400 -@@ -51,4 +51,8 @@ extern void scsi_do_req(struct scsi_requ - void *buffer, unsigned bufflen, - void (*done) (struct scsi_cmnd *), - int timeout, int retries); -+extern void scsi_do_req_fifo(struct scsi_request *, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done) (struct scsi_cmnd *), -+ int timeout, int retries); - #endif /* _SCSI_SCSI_REQUEST_H */ Deleted: trunk/scst/kernel/26_scst-2.6.18.patch =================================================================== --- trunk/scst/kernel/26_scst-2.6.18.patch 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/kernel/26_scst-2.6.18.patch 2007-07-05 14:37:36 UTC (rev 142) @@ -1,106 +0,0 @@ ---- linux-2.6.18.1-scst-dbg/drivers/scsi/scsi_lib.c_scst 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18.1-scst-dbg/drivers/scsi/scsi_lib.c 2006-10-25 20:52:58.000000000 +0400 -@@ -367,7 +367,7 @@ - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -378,11 +378,14 @@ - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ - kfree(sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifi - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * ---- linux-2.6.18.1-scst-dbg/include/scsi/scsi_device.h_scst 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18.1-scst-dbg/include/scsi/scsi_device.h 2006-10-25 20:09:23.000000000 +0400 -@@ -297,6 +297,12 @@ - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline void scsi_device_reprobe(struct scsi_device *sdev) - { Deleted: trunk/scst/kernel/26_scst-2.6.21.patch =================================================================== --- trunk/scst/kernel/26_scst-2.6.21.patch 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/kernel/26_scst-2.6.21.patch 2007-07-05 14:37:36 UTC (rev 142) @@ -1,106 +0,0 @@ ---- linux-2.6.21.1-scst-dbg/drivers/scsi/scsi_lib.c.orig 2007-04-28 01:49:26.000000000 +0400 -+++ linux-2.6.21.1-scst-dbg/drivers/scsi/scsi_lib.c 2007-05-02 13:37:38.000000000 +0400 -@@ -366,7 +366,7 @@ - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -377,11 +377,14 @@ - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifi - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * ---- linux-2.6.21.1-scst-dbg/include/scsi/scsi_device.h.orig 2007-04-28 01:49:26.000000000 +0400 -+++ linux-2.6.21.1-scst-dbg/include/scsi/scsi_device.h 2007-05-02 13:37:38.000000000 +0400 -@@ -298,6 +298,12 @@ - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { Modified: trunk/scst/src/Makefile =================================================================== --- trunk/scst/src/Makefile 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/src/Makefile 2007-07-05 14:37:36 UTC (rev 142) @@ -98,7 +98,6 @@ #EXTRA_CFLAGS += -DSTRICT_SERIALIZING EXTRA_CFLAGS += -DEXTRACHECKS -#EXTRA_CFLAGS += -DVDISK_ONLY #EXTRA_CFLAGS += -fno-inline Modified: trunk/scst/src/dev_handlers/scst_user.c =================================================================== --- trunk/scst/src/dev_handlers/scst_user.c 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/src/dev_handlers/scst_user.c 2007-07-05 14:37:36 UTC (rev 142) @@ -26,9 +26,11 @@ #include "scst_user.h" #include "scst_dev_handler.h" -#if !defined(CONFIG_NOHIGHMEM) && !defined(CONFIG_64BIT) -#warning HIGHMEM kernel configurations are not supported. Consider \ - changing VMSPLIT option or using 64-bit configuration. +#if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G) +#warning HIGHMEM kernel configurations are not supported by this module, \ + because nowadays it doesn't worth the effort. Consider change \ + VMSPLIT option or use 64-bit configuration instead. See README file \ + for details. #endif #if defined(DEBUG) && defined(CONFIG_DEBUG_SLAB) @@ -2933,10 +2935,10 @@ TRACE_ENTRY(); -#if !defined(CONFIG_NOHIGHMEM) && !defined(CONFIG_64BIT) +#if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G) PRINT_ERROR_PR("%s", "HIGHMEM kernel configurations are not supported. " - "Consider changing VMSPLIT option or using 64-bit " - "configuration."); + "Consider change VMSPLIT option or use 64-bit " + "configuration instead. See README file for details."); res = -EINVAL; goto out; #endif Modified: trunk/scst/src/scst.c =================================================================== --- trunk/scst/src/scst.c 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/src/scst.c 2007-07-05 14:37:36 UTC (rev 142) @@ -32,15 +32,27 @@ #include "scst_priv.h" #include "scst_mem.h" -#if !defined(CONFIG_NOHIGHMEM) && !defined(CONFIG_64BIT) -#warning HIGHMEM kernel configurations are supported, but not recommended. \ - Consider changing VMSPLIT option or using 64-bit configuration instead. +#if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G) +#warning HIGHMEM kernel configurations are fully supported, but not \ + recommended for performance reasons. Consider change VMSPLIT \ + option or use 64-bit configuration instead. See README file for \ + details. #endif -/* - * All targets, devices and dev_types management is done under - * this mutex. - */ +#ifdef SCST_HIGHMEM +#error SCST_HIGHMEM configuration isn't supported and broken, because there \ + is no real point to support it, at least it definitely doesn't worth \ + the effort. Better use no-HIGHMEM kernel with VMSPLIT option \ + or in 64-bit configuration instead. See README file for details. +#endif + +#if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && !defined(STRICT_SERIALIZING) +#warning Patch scst_exec_req_fifo.patch was not applied on your kernel and \ + STRICT_SERIALIZING isn't defined. Pass-through dev handlers will \ + not be supported. +#endif + +/* All targets, devices and dev_types management is done under this mutex */ DECLARE_MUTEX(scst_mutex); LIST_HEAD(scst_template_list); @@ -732,10 +744,11 @@ if (res != 0) goto out_err; -#ifdef VDISK_ONLY +#if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && !defined(STRICT_SERIALIZING) if (dev_type->exec == NULL) { PRINT_ERROR_PR("Pass-through dev handlers (handler \"%s\") not " - "supported. Recompile SCST with undefined VDISK_ONLY", + "supported. Consider applying on your kernel patch " + "scst_exec_req_fifo.patch or define STRICT_SERIALIZING", dev_type->name); res = -EINVAL; goto out_err; Modified: trunk/scst/src/scst_debug.c =================================================================== --- trunk/scst/src/scst_debug.c 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/src/scst_debug.c 2007-07-05 14:37:36 UTC (rev 142) @@ -18,8 +18,8 @@ * GNU General Public License for more details. */ +#include "scsi_tgt.h" #include "scst_debug.h" -#include "scsi_tgt.h" #if defined(DEBUG) || defined(TRACING) Modified: trunk/scst/src/scst_priv.h =================================================================== --- trunk/scst/src/scst_priv.h 2007-07-05 14:20:17 UTC (rev 141) +++ trunk/scst/src/scst_priv.h 2007-07-05 14:37:36 UTC (rev 142) @@ -313,7 +313,7 @@ { #ifdef STRICT_SERIALIZING scsi_do_req(sreq, cmnd, buffer, bufflen, done, timeout, retries); - #elif defined(VDISK_ONLY) + #elif !defined(SCSI_EXEC_REQ_FIFO_DEFINED) sBUG(); #else scsi_do_req_fifo(sreq, cmnd, buffer, bufflen, done, timeout, retries); @@ -328,7 +328,7 @@ #ifdef STRICT_SERIALIZING return scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, bufflen, use_sg, timeout, retries, privdata, done, gfp); - #elif defined(VDISK_ONLY) + #elif !defined(SCSI_EXEC_REQ_FIFO_DEFINED) sBUG(); return -1; #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |