2.6.27+ portability changes

- Added SPL_AC_3ARGS_ON_EACH_CPU configure check to determine
  if the older 4 argument version of on_each_cpu() should be
  used or the new 3 argument version.  The retry argument was
  dropped in the new API which was never used anyway.
- Updated work queue compatibility wrappers.  The old way this
  worked was to pass a data point when initialized the workqueue.
  The new API assumed the work item is embedding in a structure
  and we us container_of() to find that data pointer.
- Updated skc->skc_flags to be an unsigned long which is now
  type checked in the bit operations.  This silences the warnings.
- Updated autogen products and splat tests accordingly
This commit is contained in:
Brian Behlendorf
2009-02-02 15:12:30 -08:00
parent f220894e1f
commit 31a033ecd4
11 changed files with 139 additions and 75 deletions
+3 -3
View File
@@ -783,7 +783,7 @@ spl_cache_age(void *data)
spl_get_work_data(data, spl_kmem_cache_t, skc_work.work);
ASSERT(skc->skc_magic == SKC_MAGIC);
on_each_cpu(spl_magazine_age, skc, 0, 1);
spl_on_each_cpu(spl_magazine_age, skc, 1);
spl_slab_reclaim(skc, 0);
if (!test_bit(KMC_BIT_DESTROY, &skc->skc_flags))
@@ -923,7 +923,7 @@ spl_magazine_create(spl_kmem_cache_t *skc)
skc->skc_mag_size = spl_magazine_size(skc);
skc->skc_mag_refill = (skc->skc_mag_size + 1) / 2;
on_each_cpu(__spl_magazine_create, skc, 0, 1);
spl_on_each_cpu(__spl_magazine_create, skc, 1);
RETURN(0);
}
@@ -945,7 +945,7 @@ static void
spl_magazine_destroy(spl_kmem_cache_t *skc)
{
ENTRY;
on_each_cpu(__spl_magazine_destroy, skc, 0, 1);
spl_on_each_cpu(__spl_magazine_destroy, skc, 1);
EXIT;
}