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.
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().
}
}
+#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",
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;
}
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);
}