]> git.proxmox.com Git - mirror_spl.git/commit
Fix KMC_OFFSLAB type caches
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Jul 2013 21:39:35 +0000 (14:39 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 30 Jul 2013 22:39:23 +0000 (15:39 -0700)
commitceb387282577b872264143515fc4f55043368b0f
treea86aca9e560b78c94bc26fab28537c293aa52ab0
parentb9b3715346b2748b2e512099862f1eabf076cf51
Fix KMC_OFFSLAB type caches

Because spl_slab_size() was always returning -ENOSPC for caches of
type KMC_OFFSLAB the cache could never be created.  Additionally
the slab size is rounded up to a page which is what kv_alloc()
expects.  The kv_alloc() code will minimally allocate a page,
in the KMC_OFFSLAB case this could be reduced.

The basic regression tests kmem:slab_small, kmem:slab_large,
and kmem:slab_align regression were updated to test KMC_OFFSLAB.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ying Zhu <casualfisher@gmail.com>
Closes #266
module/spl/spl-kmem.c
module/splat/splat-kmem.c