Breaking the world for a little bit. If anyone is going to continue

working on this branch for the next few days I suggested you work
off of the 0.3.1 tag.  The following changes are fairly extensive
and are designed to make the SPL compatible with all kernels in
the range of 2.6.18-2.6.25.  There were 13 relevant API changes
between these releases and I have added the needed autoconf tests
to check for them.  However, this has not all been tested extensively.
I'll sort of the breakage on Fedora Core 9 and RHEL5 this week.

SPL_AC_TYPE_UINTPTR_T
SPL_AC_TYPE_KMEM_CACHE_T
SPL_AC_KMEM_CACHE_DESTROY_INT
SPL_AC_ATOMIC_PANIC_NOTIFIER
SPL_AC_3ARGS_INIT_WORK
SPL_AC_2ARGS_REGISTER_SYSCTL
SPL_AC_KMEM_CACHE_T
SPL_AC_KMEM_CACHE_CREATE_DTOR
SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR
SPL_AC_SET_SHRINKER
SPL_AC_PATH_IN_NAMEIDATA
SPL_AC_TASK_CURR
SPL_AC_CTL_UNNUMBERED



git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@119 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-06-02 17:28:49 +00:00
parent 65a045dace
commit 57d862349b
25 changed files with 809 additions and 247 deletions
+3 -10
View File
@@ -41,6 +41,7 @@ extern "C" {
#include <linux/rwsem.h>
#include <linux/hash.h>
#include <linux/ctype.h>
#include <sys/types.h>
#include <sys/debug.h>
/*
* Memory allocation interfaces
@@ -316,15 +317,6 @@ kmem_alloc_tryhard(size_t size, size_t *alloc_size, int kmflags)
#define KMC_REAP_CHUNK 256
#define KMC_DEFAULT_SEEKS DEFAULT_SEEKS
/* Defined by linux slab.h
* typedef struct kmem_cache_s kmem_cache_t;
*/
/* No linux analog
* extern int kmem_ready;
* extern pgcnt_t kmem_reapahead;
*/
#ifdef DEBUG_KMEM_UNIMPLEMENTED
static __inline__ void kmem_init(void) {
#error "kmem_init() not implemented"
@@ -380,6 +372,7 @@ __kmem_cache_create(char *name, size_t size, size_t align,
extern int __kmem_cache_destroy(kmem_cache_t *cache);
extern void *__kmem_cache_alloc(kmem_cache_t *cache, gfp_t flags);
extern void __kmem_cache_free(kmem_cache_t *cache, void *obj);
extern void __kmem_reap(void);
int kmem_init(void);
@@ -389,7 +382,7 @@ void kmem_fini(void);
__kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags)
#define kmem_cache_destroy(cache) __kmem_cache_destroy(cache)
#define kmem_cache_alloc(cache, flags) __kmem_cache_alloc(cache, flags)
#define kmem_cache_free(cache, ptr) kmem_cache_free(cache, ptr)
#define kmem_cache_free(cache, obj) __kmem_cache_free(cache, obj)
#define kmem_cache_reap_now(cache) kmem_cache_shrink(cache)
#define kmem_reap() __kmem_reap()
+9
View File
@@ -39,6 +39,15 @@
#include <sys/kstat.h>
#include <sys/debug.h>
#ifdef CONFIG_SYSCTL
#ifdef HAVE_2ARGS_REGISTER_SYSCTL
#define spl_register_sysctl_table(t, a) register_sysctl_table(t, a)
#else
#define spl_register_sysctl_table(t, a) register_sysctl_table(t)
#endif /* HAVE_2ARGS_REGISTER_SYSCTL */
#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t)
#endif /* CONFIG_SYSCTL */
#ifdef DEBUG_KSTAT
extern struct proc_dir_entry *proc_sys_spl_kstat;
struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root,
+12
View File
@@ -197,6 +197,18 @@ extern int ddi_strtoul(const char *str, char **nptr,
#define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
#endif
#ifdef HAVE_3ARGS_INIT_WORK
#define spl_init_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), (void *)(d))
#define spl_get_work_data(type,field,data) (data)
#else
#define spl_init_work(wq,cb,d) INIT_WORK((wq), (void *)(cb));
#define spl_get_work_data(type,field,data) container_of(data,type,field)
#endif
#ifdef __cplusplus
}
#endif
+9 -1
View File
@@ -7,9 +7,17 @@ extern "C" {
#include <linux/types.h>
#include <sys/sysmacros.h>
#include "spl_config.h"
#ifndef HAVE_UINTPTR_T
typedef unsigned long uintptr_t;
#endif
#ifndef HAVE_KMEM_CACHE_T
typedef struct kmem_cache kmem_cache_t;
#endif
typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t;
typedef unsigned long uintptr_t;
typedef unsigned long intptr_t;
typedef unsigned long ulong_t;
typedef unsigned int uint_t;
+9
View File
@@ -40,6 +40,7 @@ extern "C" {
#include <linux/namei.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/mount.h>
#include <sys/kmem.h>
#include <sys/mutex.h>
#include <sys/types.h>
@@ -92,6 +93,14 @@ extern "C" {
#define B_INVAL 0x01
#define B_TRUNC 0x02
#ifdef HAVE_PATH_IN_NAMEIDATA
# define nd_dentry path.dentry
# define nd_mnt path.mnt
#else
# define nd_dentry dentry
# define nd_mnt mnt
#endif
typedef enum vtype {
VNON = 0,
VREG = 1,