From owner-freebsd-current@FreeBSD.ORG Mon Mar 12 13:10:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20E5E1065670 for ; Mon, 12 Mar 2012 13:10:36 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id CD9118FC0C for ; Mon, 12 Mar 2012 13:10:28 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S7512-0006dH-SU for freebsd-current@freebsd.org; Mon, 12 Mar 2012 14:10:20 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Mar 2012 14:10:20 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Mar 2012 14:10:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Mon, 12 Mar 2012 14:10:11 +0100 Lines: 48 Message-ID: References: <4F5C71DC.3010203@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCDED24CD2FABCE5D1C07C5DF" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0) Gecko/20120213 Thunderbird/10.0 In-Reply-To: <4F5C71DC.3010203@yandex.ru> X-Enigmail-Version: 1.3.5 Cc: freebsd-geom@freebsd.org Subject: Re: [RFC, RFT] LDM support (aka Windows Dynamic Volumes) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 13:10:36 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCDED24CD2FABCE5D1C07C5DF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/03/2012 10:35, Andrey V. Elsukov wrote: > Hi, All >=20 > i wrote GEOM_PART_LDM class. It provides basic support of Logical Disk = Manager > partitioning scheme [1]. Since LDM metadata is not documented i used se= veral > articles found in the web and linux implementation as reference [2]. 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, though. You could use SLIST_FOREACH_SAFE in ldm_vmdb_free(), but that's also not a problem. 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. Looks ok. --------------enigCDED24CD2FABCE5D1C07C5DF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9d9bMACgkQldnAQVacBcjJqwCfU+OnCw9xR5mmvUehDA8fg7pR MRcAoLa587XhZ4GMboBrwiFVjCpct9qT =TnkD -----END PGP SIGNATURE----- --------------enigCDED24CD2FABCE5D1C07C5DF--