Skip to contentSkip to conversation

fix debugging version of dm_pool_grow_object to properly use delta=0

PATCH New Milan Broz 2 participants 2 messages Apr 2, 2009

lore
Share & tools
lore

Milan Broz

author
#0 lore raw

PATCH 1/1 fix debugging version of dm_pool_grow_object to properly use delta=0

Fix debug poll grow object to properly support delta=0

(It prints garbage for some reports)

---
 libdm/mm/pool-debug.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
libdm/mm/pool-debug.c +3 -0
index 911f8e2..fd13c1b 100644
@@ -220,6 +220,9 @@ int dm_pool_grow_object(struct dm_pool *p, const void *extra, size_t delta)
 	struct block *new;
 	size_t size = delta ? : strlen(extra);
 
+	if (!delta)
+		delta = size;
+
 	assert(p->begun);
 
 	if (p->object)
#1 lore raw

PATCH 1/1 fix debugging version of dm_pool_grow_object to properly use delta=0

Quoted 1 line · Milan Broz

Fix debug poll grow object to properly support delta=0

It's a bit obfuscated.

Maybe try extra_size instead of delta within the fn, and new_size instead of size?

Alasdair

Signature · 1 line
agk at redhat.com