Stub out kmem cache defrag API

At some point we are going to need to implement the kmem cache
move callbacks to allow for kmem cache defragmentation.  This
commit simply lays a small part of the API ground work, it does
not actually implement any of this feature.  This is safe for
now because the move callbacks are just an optimization.  Even
if they are registered we don't ever really have to call them.
This commit is contained in:
Brian Behlendorf
2010-08-27 13:28:10 -07:00
parent 8dbd3fbd5e
commit 2b3543025c
2 changed files with 30 additions and 5 deletions
+12
View File
@@ -1434,6 +1434,18 @@ out:
}
EXPORT_SYMBOL(spl_kmem_cache_create);
/*
* Register a move callback to for cache defragmentation.
* XXX: Unimplemented but harmless to stub out for now.
*/
void
spl_kmem_cache_set_move(kmem_cache_t *skc,
kmem_cbrc_t (move)(void *, void *, size_t, void *))
{
ASSERT(move != NULL);
}
EXPORT_SYMBOL(spl_kmem_cache_set_move);
/*
* Destroy a cache and all objects assoicated with the cache.
*/