mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-28 17:39:23 +03:00
SLES10 Fixes (part 2):
- Configure check, the div64_64() function was renamed to div64_u64() as of 2.6.26. - Configure check, the global_page_state() fuction was introduced in 2.6.18 kernels. The earlier 2.6.16 based SLES10 must not try and use it, thankfully get_zone_counts() is still available. - To simplify debugging poison all symbols aquired dynamically using spl_kallsyms_lookup_name() with SYMBOL_POISON. - Add console messages when the user mode helpers fail. - spl_kmem_init_globals() use bit shifts instead of division. - When the monotonic clock is unavailable __gethrtime() must perform the HZ division as an 'unsigned long long' because the SPL only implements __udivdi3(), and not __divdi3() for 'long long' division on 32-bit arches.
This commit is contained in:
+12
-12
@@ -80,29 +80,30 @@ vmem_t *zio_arena = NULL;
|
||||
EXPORT_SYMBOL(zio_arena);
|
||||
|
||||
#ifndef HAVE_GET_VMALLOC_INFO
|
||||
get_vmalloc_info_t get_vmalloc_info_fn = NULL;
|
||||
get_vmalloc_info_t get_vmalloc_info_fn = SYMBOL_POISON;
|
||||
EXPORT_SYMBOL(get_vmalloc_info_fn);
|
||||
#endif /* HAVE_GET_VMALLOC_INFO */
|
||||
|
||||
#ifndef HAVE_FIRST_ONLINE_PGDAT
|
||||
first_online_pgdat_t first_online_pgdat_fn = NULL;
|
||||
first_online_pgdat_t first_online_pgdat_fn = SYMBOL_POISON;
|
||||
EXPORT_SYMBOL(first_online_pgdat_fn);
|
||||
#endif /* HAVE_FIRST_ONLINE_PGDAT */
|
||||
|
||||
#ifndef HAVE_NEXT_ONLINE_PGDAT
|
||||
next_online_pgdat_t next_online_pgdat_fn = NULL;
|
||||
next_online_pgdat_t next_online_pgdat_fn = SYMBOL_POISON;
|
||||
EXPORT_SYMBOL(next_online_pgdat_fn);
|
||||
#endif /* HAVE_NEXT_ONLINE_PGDAT */
|
||||
|
||||
#ifndef HAVE_NEXT_ZONE
|
||||
next_zone_t next_zone_fn = NULL;
|
||||
next_zone_t next_zone_fn = SYMBOL_POISON;
|
||||
EXPORT_SYMBOL(next_zone_fn);
|
||||
#endif /* HAVE_NEXT_ZONE */
|
||||
|
||||
#ifndef HAVE_ZONE_STAT_ITEM_FIA
|
||||
# ifndef HAVE_GET_ZONE_COUNTS
|
||||
get_zone_counts_t get_zone_counts_fn = NULL;
|
||||
get_zone_counts_t get_zone_counts_fn = SYMBOL_POISON;
|
||||
EXPORT_SYMBOL(get_zone_counts_fn);
|
||||
# endif /* HAVE_GET_ZONE_COUNTS */
|
||||
|
||||
unsigned long
|
||||
spl_global_page_state(int item)
|
||||
@@ -126,12 +127,13 @@ spl_global_page_state(int item)
|
||||
return active;
|
||||
}
|
||||
|
||||
# ifdef HAVE_GLOBAL_PAGE_STATE
|
||||
return global_page_state((enum zone_stat_item)item);
|
||||
# else
|
||||
return 0; /* Unsupported */
|
||||
# endif /* HAVE_GLOBAL_PAGE_STATE */
|
||||
}
|
||||
EXPORT_SYMBOL(spl_global_page_state);
|
||||
# else
|
||||
# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable"
|
||||
# endif /* HAVE_GET_ZONE_COUNTS */
|
||||
#endif /* HAVE_ZONE_STAT_ITEM_FIA */
|
||||
|
||||
pgcnt_t
|
||||
@@ -1785,8 +1787,8 @@ spl_kmem_init_globals(void)
|
||||
}
|
||||
|
||||
/* Solaris default values */
|
||||
swapfs_minfree = MAX(2*1024*1024 / PAGE_SIZE, physmem / 8);
|
||||
swapfs_reserve = MIN(4*1024*1024 / PAGE_SIZE, physmem / 16);
|
||||
swapfs_minfree = MAX(2*1024*1024 >> PAGE_SHIFT, physmem >> 3);
|
||||
swapfs_reserve = MIN(4*1024*1024 >> PAGE_SHIFT, physmem >> 4);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1839,8 +1841,6 @@ spl_kmem_init_kallsyms_lookup(void)
|
||||
printk(KERN_ERR "Error: Unknown symbol get_zone_counts\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
# else
|
||||
# error "HAVE_ZONE_STAT_ITEM_FIA and HAVE_GET_ZONE_COUNTS unavailable"
|
||||
# endif /* HAVE_GET_ZONE_COUNTS */
|
||||
#endif /* HAVE_ZONE_STAT_ITEM_FIA */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user