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!! |
_______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/