[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 02/17] Add supporting functions for metadata areas stored in format instance.

Peter Rajnoha <prajnoha redhat com> writes:

>> parameter everywhere. I know that currently we keep the PV/VG/... IDs in
>> unterminated strings, but I am quite sure this is not a good idea. I
>> wouldn't expect it to be a *lot* of work to change things to keep a NULL
>> termination in there as well. Maybe in a followup patch?
> ..thing with PV id is that we store that as a "struct id" which internally
> is an array of integeres... Hmm, so you want to put another array item with
> 0 at the end?
> BTW, we also do this "convert_to_string" in the cache code... So yes, maybe
> it would be fine to clean this up somehow...

Well, I don't see a problem with making the array ID_LEN + 1 instead of
ID_LEN and storing a 0 element at the end. It's always used as a
character array anyway, and we can save significant amount of
boilerplate by having that 0 in there.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]