[patch] geom_vinum platform fixes
lulf at stud.ntnu.no
Sun Mar 16 09:06:06 UTC 2008
On tor, mar 13, 2008 at 12:22:57pm -0600, Rick C. Petty wrote:
> On Thu, Mar 13, 2008 at 03:35:51PM +0100, lulf at stud.ntnu.no wrote:
> That being said and since there have been no objections to my suggestions
> (and Ulf agrees with my changes), is a committer willing to review my
> patch? le@ ? Mr. Lehey?
I've reviewed the patch and done some modifications to it. I'll need some
testing first though (I don't have a testbed right now since I'm travelling).
Here are some notes:
- Removed GV_VERSION. It is not used anywhere.
- Avoid moving header includes around.
- Declare functions static when used inside one file.
- Style fixes.
- In gv_legacy_header_type, you can't be guaranteed that the hdr fields is
not always null (although I agree in practise its highly unlikely), but
it's hard to check this any other way, so I think it's alright :)
- Use macro values instead of hard-coded values when testing legacy type.
- Pass data variable as argument rather than returning a header.
- Avoid memory allocation where possible.
All this have been "fixed" in the new patch. Please test if it still works
as specified. In addition, I noticed a memory leak in gvinum when rediscovering
a drive too, but I'll commit this separately, and the fix is included in this
patch for testing. It should work, but I've not tested it yet, but I might be
able to during the day.
The revised patch can be found here:
Please let me know how it fares, and thanks for your help btw :)
More information about the freebsd-geom