mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-31 11:14:09 +03:00
Initial pass at a file API getf/releasef hooks
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@50 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
@@ -272,3 +272,27 @@ __kmem_reap(void) {
|
||||
kmem_cache_generic_shrinker(KMC_REAP_CHUNK, GFP_KERNEL);
|
||||
}
|
||||
EXPORT_SYMBOL(__kmem_reap);
|
||||
|
||||
int
|
||||
kmem_init(void)
|
||||
{
|
||||
#ifdef DEBUG_KMEM
|
||||
atomic64_set(&kmem_alloc_used, 0);
|
||||
atomic64_set(&vmem_alloc_used, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
kmem_fini(void)
|
||||
{
|
||||
#ifdef DEBUG_KMEM
|
||||
if (atomic64_read(&kmem_alloc_used) != 0)
|
||||
printk("Warning: kmem leaked %ld/%ld bytes\n",
|
||||
atomic_read(&kmem_alloc_used), kmem_alloc_max);
|
||||
|
||||
if (atomic64_read(&vmem_alloc_used) != 0)
|
||||
printk("Warning: vmem leaked %ld/%ld bytes\n",
|
||||
atomic_read(&vmem_alloc_used), vmem_alloc_max);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user