On Tue, Jan 08, 2013 at 12:07:34PM -0800, Zach Brown wrote:
> > This is for detecting extent map leak.
>
> Hmm, I guess it's cool to get the allocation-specific decoding which you
> don't get from the generic kernel leak tracking?
Hi Zach,
Thanks for the advice, but what allocation-specific decoding do you refer to?
Could you please show me any examples?
>
> > +static LIST_HEAD(emaps);
>
> > + while (!list_empty(&emaps)) {
> > + em = list_entry(emaps.next, struct extent_map, leak_list);
> > + printk(KERN_ERR "btrfs ext map leak: start %llu len %llu block %llu flags %llu refs %d in tree %d compress %d\n",
> > + em->start, em->len, em->block_start, em->flags, atomic_read(&em->refs), em->in_tree, em->compress_type);
> > + list_del(&em->leak_list);
> > + kmem_cache_free(extent_map_cache, em);
>
> > + struct list_head leak_list;
>
> Might as well protect all that with ifdefs, too, if you're going to do
> it that way?
All right, I'm happy to do that.
Thanks,
liubo
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html