FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 03-24-2009, 02:25 PM
Konrad Rzeszutek
 
Default Allocate only once the EMC-clariion global checker's stage area instead of multiple times.

The multi-path global context on every path checker init would be
set. In scenarios where you have four paths per multipath, that context
would be set four times instead of once causing a small memory leak
(4 bytes per block disk).
---
libmultipath/checkers/emc_clariion.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libmultipath/checkers/emc_clariion.c b/libmultipath/checkers/emc_clariion.c
index 200daee..08c9c26 100644
--- a/libmultipath/checkers/emc_clariion.c
+++ b/libmultipath/checkers/emc_clariion.c
@@ -76,7 +76,7 @@ int libcheck_init (struct checker * c)
/*
* Allocate and initialize the multi-path global context.
*/
- if (c->mpcontext) {
+ if (c->mpcontext && *c->mpcontext == NULL) {
void * mpctxt = MALLOC(sizeof(int));
*c->mpcontext = mpctxt;
CLR_INACTIVE_SNAP(c);
--
1.5.4.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 08:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org