On 08/25/10 10:05 AM, Matt Keenan wrote:
Dave,
Thanks for the review.
On 08/24/10 04:34 PM, Dave Miner wrote:
On 08/23/10 07:26 AM, Matt Keenan wrote:
Thanks Jan for the review, I've updated the webrev to contain your
recommendations. All of which I agree with :-)
New webrev available at :
http://cr.opensolaris.org/~mattman/bug-14004/
td_mg.c, 358-384: I realize that the algorithm you're using here of
count, realloc, then walk & copy is the same as used for several other
object types here, but it's really not a great design. It would be
great if we would fix it at least for this case, but would you at
least file a bug against libtd to have the design reconsidered so that
the discovery calls return a count to start with, rather than callers
having to re-count the number of objects returned?
The algorithm of count/realloc/walk & copy that you mention, have you a
suggestion on what this could be re-designed to ?
td_discover returns the count already via setting int pointer paramater
number_found. So the caller does not have to re-count the number of
objects found. The return value for the function itself is an error
code. or TD_E_SUCCESS for successfull discovery. Unless I'm missing
something I don't think a bug is required.
Sorry, I wasn't quite clear with the comment, I think. My opinion is
that td_discover itself shouldn't have to count the objects returned by
its subsidiaries, such as (in your case) ddm_get_zpools(), which should
already know that number, or be able to easily supply it as part of the
work it's doing. Similar comment applies for disks, partitions and
slices in my quick examination.
Dave
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss