LVM2 ./WHATS_NEW lib/mm/memlock.c libdm/mm/poo ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-03-30 12:43:33
Modified files:
. : WHATS_NEW lib/mm : memlock.c libdm/mm : pool-fast.c
Log message:
Valgrind updates
Avoid locking sum testing with valgrind compilation.
Make memory unaccessible in the valgrind for dm_pool_abadon_object.
Valgrind hinting should not be needed in _free_chunk for dm_free.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1964&r2=1.1965
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mm/memlock.c.diff?cvsroot=lvm2&r1=1.37&r2=1.38
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/mm/pool-fast.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.85 - =================================== + Enhance usability with the valgrind memcheck tool. Support regular quit of the lvm_thread_fn function in clvmd. Fix reading of unallocated memory in lvm1 format import function. Replace several strncmp() calls with id_equal().
lib/mm/memlock.c +8 -0
@@ -195,6 +195,14 @@ } } +#ifdef VALGRIND_POOL +/* +* Valgrind is continually eating memory while executing code +* so we need to deactivate check of locked memory size +*/ + sz -= sz;/* = 0, but avoids getting warning about dead assigment */ + +#endif *mstats += sz; log_debug("%s %10ldKiB %12lx - %12lx %c%c%c%c%s", (lock == LVM_MLOCK) ? "mlock" : "munlock",
libdm/mm/pool-fast.c +4 -7
@@ -238,6 +238,9 @@void dm_pool_abandon_object (struct dm_pool *p) { +#ifdef VALGRIND_POOL +VALGRIND_MAKE_MEM_NOACCESS (p->chunk, p->object_len); +#endif p->object_len =0 ; p->object_alignment =DEFAULT_ALIGNMENT ; }
@@ -278,11 +281,5 @@static void _free_chunk (struct chunk *c) { -if (c) { -#ifdef VALGRIND_POOL -VALGRIND_MAKE_MEM_UNDEFINED (c, c->end - (char *) c); -#endif - -dm_free (c); - } +dm_free (c); }