mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-24 17:04:18 +00:00
- Implemented temporary workaround to work on 2.6.22+ kernels
- qla2x00-target/ChangeLog updated - Typo in scst_page.html fixed git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@156 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3,12 +3,15 @@ Summary of changes between versions 0.9.5 and 0.9.6
|
|||||||
|
|
||||||
- Support for per-target default security groups added.
|
- Support for per-target default security groups added.
|
||||||
|
|
||||||
- Update to work on 2.6.19.x.
|
- Update to work on the latest kernel (2.6.22.x).
|
||||||
|
|
||||||
- Updated to work with SCST 0.9.6.
|
- Updated to work with SCST 0.9.6.
|
||||||
|
|
||||||
|
- /proc support routines changed to work with seq_file interface.
|
||||||
|
|
||||||
- Cleanups and minor bug fixes.
|
- Cleanups and minor bug fixes.
|
||||||
|
|
||||||
|
|
||||||
Summary of changes between versions 0.9.3.8 and 0.9.5
|
Summary of changes between versions 0.9.3.8 and 0.9.5
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
+31
-11
@@ -42,16 +42,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
|
||||||
#error 2.6.22+ kernels are not supported yet, because some oversmart nerd \
|
#warning SCST on 2.6.22+ kernels will run in performance degraded mode, \
|
||||||
has deleted support for destructors from SLABs in those kernels and was \
|
because some oversmart mainline kernel developers have deleted in those \
|
||||||
unresponsible enough to made that without even set it in the deprecated \
|
kernels support for destructors in SLAB cache and they were unresponsible \
|
||||||
status for some time to allow depending on it projects fix it without \
|
enough to made that change without even set that feature in the deprecated \
|
||||||
disturbing their users. Blame him for that! So, now to be usable on \
|
status for some time to allow depending on it projects to fix themself without \
|
||||||
2.6.22+ kernels SCST requires a complete rewrite of one of its major low \
|
disturbing their users. Blame those people for that! So, now to run in full \
|
||||||
|
power on those kernels SCST requires a complete rewrite of one of its major low \
|
||||||
level parts: all kmem_cache_*() functions in this file should be replaced \
|
level parts: all kmem_cache_*() functions in this file should be replaced \
|
||||||
with new ones with similar functionality. I'm not sure I will have time for \
|
with new ones with similar functionality. I'm not sure I will have time for \
|
||||||
that in the near future, therefore you are welcome to implement that. \
|
that in the near future, therefore you are welcome to implement it. Don't \
|
||||||
Don't hesitate to ask me how to do it most effectively. VLNB.
|
hesitate to ask me how I think it should be done most effectively. VLNB.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Chosen to have one page per slab for all orders */
|
/* Chosen to have one page per slab for all orders */
|
||||||
@@ -68,6 +69,10 @@ atomic_t sgv_other_total_alloc;
|
|||||||
DEFINE_MUTEX(scst_sgv_pool_mutex);
|
DEFINE_MUTEX(scst_sgv_pool_mutex);
|
||||||
LIST_HEAD(scst_sgv_pool_list);
|
LIST_HEAD(scst_sgv_pool_list);
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
|
||||||
|
static void sgv_dtor(void *data, struct kmem_cache *k, unsigned long f);
|
||||||
|
#endif
|
||||||
|
|
||||||
static int scst_check_clustering(struct scatterlist *sg, int cur, int hint)
|
static int scst_check_clustering(struct scatterlist *sg, int cur, int hint)
|
||||||
{
|
{
|
||||||
int res = -1;
|
int res = -1;
|
||||||
@@ -481,9 +486,12 @@ out_fail_free_sg_entries:
|
|||||||
}
|
}
|
||||||
|
|
||||||
out_fail_free:
|
out_fail_free:
|
||||||
if (cache)
|
if (cache) {
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
|
||||||
|
sgv_dtor(obj, NULL, 0);
|
||||||
|
#endif
|
||||||
kmem_cache_free(pool->caches[order], obj);
|
kmem_cache_free(pool->caches[order], obj);
|
||||||
else
|
} else
|
||||||
kfree(obj);
|
kfree(obj);
|
||||||
|
|
||||||
out_fail:
|
out_fail:
|
||||||
@@ -505,8 +513,12 @@ void sgv_pool_free(struct sgv_pool_obj *sgv)
|
|||||||
"sg_count %d, allocator_priv %p", sgv, sgv->owner_cache,
|
"sg_count %d, allocator_priv %p", sgv, sgv->owner_cache,
|
||||||
sgv->sg_entries, sgv->sg_count, sgv->allocator_priv);
|
sgv->sg_entries, sgv->sg_count, sgv->allocator_priv);
|
||||||
if (sgv->owner_cache != NULL) {
|
if (sgv->owner_cache != NULL) {
|
||||||
|
struct kmem_cache *c = sgv->owner_cache;
|
||||||
sgv->sg_entries[sgv->orig_sg].length = sgv->orig_length;
|
sgv->sg_entries[sgv->orig_sg].length = sgv->orig_length;
|
||||||
kmem_cache_free(sgv->owner_cache, sgv);
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
|
||||||
|
sgv_dtor(sgv, NULL, 0);
|
||||||
|
#endif
|
||||||
|
kmem_cache_free(c, sgv);
|
||||||
} else {
|
} else {
|
||||||
sgv->owner_pool->alloc_fns.free_pages_fn(sgv->sg_entries,
|
sgv->owner_pool->alloc_fns.free_pages_fn(sgv->sg_entries,
|
||||||
sgv->sg_count, sgv->allocator_priv);
|
sgv->sg_count, sgv->allocator_priv);
|
||||||
@@ -545,6 +557,9 @@ static void sgv_dtor(void *data, struct kmem_cache *k, unsigned long f)
|
|||||||
}
|
}
|
||||||
kfree(obj->sg_entries);
|
kfree(obj->sg_entries);
|
||||||
}
|
}
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
|
||||||
|
memset(obj, 0, sizeof(*obj));
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,8 +650,13 @@ int sgv_pool_init(struct sgv_pool *pool, const char *name, int clustered)
|
|||||||
|
|
||||||
scnprintf(pool->cache_names[i], sizeof(pool->cache_names[i]),
|
scnprintf(pool->cache_names[i], sizeof(pool->cache_names[i]),
|
||||||
"%s-%luK", name, (PAGE_SIZE >> 10) << i);
|
"%s-%luK", name, (PAGE_SIZE >> 10) << i);
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22))
|
||||||
|
pool->caches[i] = kmem_cache_create(pool->cache_names[i],
|
||||||
|
size, 0, SCST_SLAB_FLAGS, sgv_ctor, NULL);
|
||||||
|
#else
|
||||||
pool->caches[i] = kmem_cache_create(pool->cache_names[i],
|
pool->caches[i] = kmem_cache_create(pool->cache_names[i],
|
||||||
size, 0, SCST_SLAB_FLAGS, sgv_ctor, sgv_dtor);
|
size, 0, SCST_SLAB_FLAGS, sgv_ctor, sgv_dtor);
|
||||||
|
#endif
|
||||||
if (pool->caches[i] == NULL) {
|
if (pool->caches[i] == NULL) {
|
||||||
TRACE(TRACE_OUT_OF_MEM, "Allocation of sgv_pool cache "
|
TRACE(TRACE_OUT_OF_MEM, "Allocation of sgv_pool cache "
|
||||||
"%s(%d) failed", name, i);
|
"%s(%d) failed", name, i);
|
||||||
|
|||||||
@@ -92,8 +92,6 @@ handler (see below) .<br>
|
|||||||
</li>
|
</li>
|
||||||
<li> Complete SMP support.<br>
|
<li> Complete SMP support.<br>
|
||||||
</li>
|
</li>
|
||||||
<li> <br>
|
|
||||||
</li>
|
|
||||||
<li>Well documented.<br>
|
<li>Well documented.<br>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user