mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
- Fixes broken build if io_context patch not applied
- #warning's cleanup git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@715 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -24,10 +24,10 @@
|
||||
#include "digest.h"
|
||||
|
||||
#if !defined(CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION)
|
||||
#warning "Patch put_page_callback-<kernel-version>.patch not applied on your \
|
||||
kernel or CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION \
|
||||
config option not set. ISCSI-SCST will be working with not the best \
|
||||
performance. Refer README file for details."
|
||||
#warning "Patch put_page_callback-<kernel-version>.patch not applied on your\
|
||||
kernel or CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION\
|
||||
config option not set. ISCSI-SCST will be working with not the best\
|
||||
performance. Refer README file for details."
|
||||
#endif
|
||||
|
||||
#define ISCSI_INIT_WRITE_WAKE 0x1
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
#include "scst_dev_handler.h"
|
||||
|
||||
#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 changing \
|
||||
VMSPLIT option or use a 64-bit configuration instead. See README file \
|
||||
for details."
|
||||
#warning "HIGHMEM kernel configurations are not supported by this module,\
|
||||
because nowadays it doesn't worth the effort. Consider changing\
|
||||
VMSPLIT option or use a 64-bit configuration instead. See README file\
|
||||
for details."
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18))
|
||||
|
||||
@@ -794,11 +794,7 @@ void scst_free_device(struct scst_device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
#if defined(CONFIG_BLOCK) && defined(SCST_IO_CONTEXT)
|
||||
__exit_io_context(dev->dev_io_ctx);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
kfree(dev);
|
||||
|
||||
@@ -1173,11 +1169,7 @@ static void scst_free_tgt_dev(struct scst_tgt_dev *tgt_dev)
|
||||
scst_del_global_threads(vtt->threads_num);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
#if defined(CONFIG_BLOCK) && defined(SCST_IO_CONTEXT)
|
||||
__exit_io_context(tgt_dev->tgt_dev_io_ctx);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
kmem_cache_free(scst_tgtd_cachep, tgt_dev);
|
||||
|
||||
|
||||
@@ -34,23 +34,23 @@
|
||||
#include "scst_mem.h"
|
||||
|
||||
#if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G)
|
||||
#warning "HIGHMEM kernel configurations are fully supported, but not \
|
||||
recommended for performance reasons. Consider changing VMSPLIT \
|
||||
option or use a 64-bit configuration instead. See README file for \
|
||||
details."
|
||||
#warning "HIGHMEM kernel configurations are fully supported, but not\
|
||||
recommended for performance reasons. Consider changing VMSPLIT\
|
||||
option or use a 64-bit configuration instead. See README file for\
|
||||
details."
|
||||
#endif
|
||||
|
||||
#if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && \
|
||||
!defined(CONFIG_SCST_STRICT_SERIALIZING)
|
||||
#warning "Patch scst_exec_req_fifo-<kernel-version>.patch was not applied on \
|
||||
your kernel and CONFIG_SCST_STRICT_SERIALIZING isn't defined. \
|
||||
Pass-through dev handlers will not be supported."
|
||||
#warning "Patch scst_exec_req_fifo-<kernel-version>.patch was not applied on\
|
||||
your kernel and CONFIG_SCST_STRICT_SERIALIZING isn't defined.\
|
||||
Pass-through dev handlers will not work."
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
#if !defined(SCST_IO_CONTEXT)
|
||||
#warning "Patch io_context-<kernel-version>.patch was not applied \
|
||||
on your kernel. SCST will be working with not the best performance."
|
||||
#warning "Patch io_context-<kernel-version>.patch was not applied\
|
||||
on your kernel. SCST will be working with not the best performance."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1128,8 +1128,6 @@ int scst_add_dev_threads(struct scst_device *dev, int num)
|
||||
|
||||
list_add(&thr->thread_list_entry, &dev->threads_list);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
#if defined(CONFIG_BLOCK) && defined(SCST_IO_CONTEXT)
|
||||
/*
|
||||
* ToDo: better to use tgt_dev_io_context instead, but we
|
||||
* are not ready for that yet.
|
||||
@@ -1138,8 +1136,7 @@ int scst_add_dev_threads(struct scst_device *dev, int num)
|
||||
thr->cmd_thread->io_context = ioc_task_link(dev->dev_io_ctx);
|
||||
TRACE_DBG("Setting dev io ctx %p on thr %d", dev->dev_io_ctx,
|
||||
thr->cmd_thread->pid);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
wake_up_process(thr->cmd_thread);
|
||||
}
|
||||
|
||||
|
||||
@@ -177,10 +177,10 @@ struct scst_cmd_thread_t {
|
||||
struct list_head thread_list_entry;
|
||||
};
|
||||
|
||||
#if defined(SCST_IO_CONTEXT)
|
||||
|
||||
static inline void scst_set_io_context(struct scst_tgt_dev *tgt_dev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
#if defined(CONFIG_BLOCK) && defined(SCST_IO_CONTEXT)
|
||||
if (tgt_dev->dev->p_cmd_lists == &scst_main_cmd_lists) {
|
||||
EXTRACHECKS_BUG_ON(current->io_context);
|
||||
/*
|
||||
@@ -190,22 +190,30 @@ static inline void scst_set_io_context(struct scst_tgt_dev *tgt_dev)
|
||||
current->io_context = tgt_dev->tgt_dev_io_ctx;
|
||||
TRACE_DBG("io_context %p", tgt_dev->tgt_dev_io_ctx);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void scst_reset_io_context(struct scst_tgt_dev *tgt_dev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
#if defined(CONFIG_BLOCK) && defined(SCST_IO_CONTEXT)
|
||||
if (current->io_context == tgt_dev->tgt_dev_io_ctx) {
|
||||
current->io_context = NULL;
|
||||
TRACE_DBG("io_context %p reset", tgt_dev->tgt_dev_io_ctx);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void scst_set_io_context(struct scst_tgt_dev *tgt_dev) {}
|
||||
static inline void scst_reset_io_context(struct scst_tgt_dev *tgt_dev) {}
|
||||
static inline void __exit_io_context(struct io_context *ioc) {}
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
|
||||
static inline struct io_context *ioc_task_link(struct io_context *ioc)
|
||||
{
|
||||
return NULL;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
extern struct mutex scst_global_threads_mutex;
|
||||
extern u32 scst_nr_global_threads;
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G)
|
||||
#warning "HIGHMEM kernel configurations are not supported by this module, \
|
||||
because nowadays it isn't worth the effort. Consider changing \
|
||||
VMSPLIT option or use a 64-bit configuration instead. See SCST core \
|
||||
README file for details."
|
||||
#warning "HIGHMEM kernel configurations are not supported by this module,\
|
||||
because nowadays it isn't worth the effort. Consider changing\
|
||||
VMSPLIT option or use a 64-bit configuration instead. See SCST core\
|
||||
README file for details."
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCST_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user