All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix debugging version of dm_pool_grow_object to properly use delta=0
@ 2009-04-02 14:19 Milan Broz
  2009-04-02 14:37 ` Alasdair G Kergon
  0 siblings, 1 reply; 2+ messages in thread
From: Milan Broz @ 2009-04-02 14:19 UTC (permalink / raw)
  To: lvm-devel

Fix debug poll grow object to properly support delta=0

(It prints garbage for some reports)

Signed-off-by: Milan Broz <mbroz@redhat.com>
---
 libdm/mm/pool-debug.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libdm/mm/pool-debug.c b/libdm/mm/pool-debug.c
index 911f8e2..fd13c1b 100644
--- a/libdm/mm/pool-debug.c
+++ b/libdm/mm/pool-debug.c
@@ -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)




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] fix debugging version of dm_pool_grow_object to properly use delta=0
  2009-04-02 14:19 [PATCH] fix debugging version of dm_pool_grow_object to properly use delta=0 Milan Broz
@ 2009-04-02 14:37 ` Alasdair G Kergon
  0 siblings, 0 replies; 2+ messages in thread
From: Alasdair G Kergon @ 2009-04-02 14:37 UTC (permalink / raw)
  To: lvm-devel

On Thu, Apr 02, 2009 at 04:19:41PM +0200, Milan Broz wrote:
> 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
-- 
agk at redhat.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-02 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 14:19 [PATCH] fix debugging version of dm_pool_grow_object to properly use delta=0 Milan Broz
2009-04-02 14:37 ` Alasdair G Kergon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.