[RFC, RFT] LDM support (aka Windows Dynamic Volumes)
ivoras at freebsd.org
Mon Mar 12 13:10:36 UTC 2012
On 11/03/2012 10:35, Andrey V. Elsukov wrote:
> Hi, All
> i wrote GEOM_PART_LDM class. It provides basic support of Logical Disk Manager
> partitioning scheme . Since LDM metadata is not documented i used several
> articles found in the web and linux implementation as reference .
Seems ok, but there are a lot of "magic numbers" sprinkled around, which
could possibly be better expressed as named constants / macros. E.g. in
ldm_privhdr_parse(), ldm_tochdr_check(), as the array size in line 434,
in the switch block in lines 635, etc. I don't think it's a big problem,
You could use SLIST_FOREACH_SAFE in ldm_vmdb_free(), but that's also not
You have a lot of deeply nested loops in ldm_vmdb_parse() and others,
which may be "flattened" by removing the inner loops into separate
functions (so you don't run into the 80 column limit so often), but
again, not a problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120312/d1dc6837/signature.pgp
More information about the freebsd-current