Displaying 3 results from an estimated 3 matches for "extent_map_init".
2007 Nov 06
0
[PATCH] check return value in extent map allocation
Hello,
I just began digging through the source last night. I hope nobody minds if I just
jump in and start sending some patches. The return of extent_map_init is not
checked at module startup. The net effect of this function is checked at inode
space allocation time though, so my patch decides to quit early on if the alloc
fails.
Thanks,
Wyatt Banks
diff -r 29b8cc7794ac extent_map.c
--- a/extent_map.c Thu Sep 20 14:14:42 2007 -0400
+++ b/extent_map.c...
2013 Jan 14
5
[PATCH] mm/slab: add a leak decoder callback
..."btrfs ext map leak: start %llu len %llu block %llu "
+ "flags %lu refs %d in tree %d compress %d\n",
+ em->start, em->len, em->block_start, em->flags,
+ atomic_read(&em->refs), em->in_tree, (int)em->compress_type);
+}
+
int __init extent_map_init(void)
{
extent_map_cache = kmem_cache_create("btrfs_extent_map",
@@ -23,6 +33,8 @@ int __init extent_map_init(void)
SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD, NULL);
if (!extent_map_cache)
return -ENOMEM;
+
+ extent_map_cache->decoder = extent_map_leak_decoder;
return 0;
}...
2013 Jan 16
6
[PATCH V2] mm/slab: add a leak decoder callback
..."btrfs ext map leak: start %llu len %llu block %llu "
+ "flags %lu refs %d in tree %d compress %d\n",
+ em->start, em->len, em->block_start, em->flags,
+ atomic_read(&em->refs), em->in_tree, (int)em->compress_type);
+}
+
int __init extent_map_init(void)
{
extent_map_cache = kmem_cache_create("btrfs_extent_map",
@@ -39,7 +49,8 @@ void extent_map_exit(void)
}
if (extent_map_cache)
- kmem_cache_destroy(extent_map_cache);
+ kmem_cache_destroy_decoder(extent_map_cache,
+ extent_map_leak_decoder);
}
/**
diff --git a...