[PATCH 2/4] Add lvseg 'get' functions.

Petr Rockai <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected].>
Zdenek Kabelac <[email protected]> writes:
> I really think this API is wrong somewhere - there is way too many duplication
> - this isn't going to be very efficient....
> I do like the beauty of const strings....

I disagree. Having a consistent API is currently more important than
efficiency. We don't have any profile data, etc. So what you are asking
for is premature optimisation, IMO. We can ditch the duplication later
as needed. (Hopefully, we will be able to somewhat improve the general
memory allocation patterns used by LVM, independent of this. Presumably,
having better definitions of lifetimes of different things on a lower
layer would also make it feasible to rely on that lifetime in the
API. For now, I think it is a sound approach to just duplicate
everything to be on the safe side. Rule of thumb: get a working version
first, write tests, then worry about performance.)

Yours,
   Petr.
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.