RE: Ataraid-list Digest, Vol 44, Issue 11

"Fang, Ying" <[email protected]>
Newsgroups gmane.linux.ataraid
Message-ID <39B20DF628532344BC7A2692CB6AEE0701E6CD88@orsmsx420.amr.corp.intel.com>
>
>Let's avoid the superfluous allocation and take Ians patch.
>
>Thanks,
>Heinz
>
Heinz,

Removing unnecessary memory allocating and copying is a good idea. I'm
glad that the -r -E issue is solved.

I have used the same memory allocation policy in the current
implementation and would like to hear your opinions.

The extra memory allocation is used to simplify memory relocation in
metadata creation (you'll see the code soon) and reduce the chance to
make error because of the properties of ISW metadata. The ISW metadata
has variable length and its on-disk location is that the first sector at
the back of the other sectors in sequence. Also the size of volume data
(without the header) is smaller than one sector so with an extra sector,
the memory adjustment occurs only after a volume is created. 

Thanks,
Ying
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.