[linux-lvm] In LVM, problem with memory allocation to a new data structure...

조완근 jowkju at postech.ac.kr
Thu Jun 22 17:31:29 UTC 2006





In my work with LVM source code, I made a new data structure "struct 
extent" in lib/metadata/metadata.h file, and then I added new member variables 
in "struct physical_volume". One of the new 
member variables is a pointer variable to an array of "struct 
extent" objects. I got the memory allocated to the pointer by using just 
malloc() function.


 


The source is compiled without any errors. But in execution, when the new 
array of "struct extent" objects is allocated, it works well. But later, when I 
access the physical volume object again, the new members have all zeros, instead 
of the values I gave before. Where have the values gone??


 


My question is


 (1) How can I add new member variables in the metadata data 
structures?


 (2) and What do I have to use for memory allocation to 
the new variables?


 


I'm very happy that there are you guys who can answer to my questions. Thank 
you!!





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20060623/15295928/attachment.htm>


More information about the linux-lvm mailing list