[RFC] geom_uncompress(4) changes

Marcel Moolenaar marcel at xcllnt.net
Wed May 7 14:47:31 UTC 2014


On Apr 29, 2014, at 4:50 AM, Luiz Otavio O Souza <lists.br at gmail.com> wrote:

> Hi,
> 
> I've the attached changes to geom_uncompress(4) that modularise the
> compression support.
> 
> It can now be built with support to mkuzip(8) or mkulzma(8) (or both)
> independently.
> 
> It also make a lot easier to add the support to new compression
> methods on geom_uncompress.
> 
> Now, building a kernel with 'options GEOM_UNCOMPRESS' (kept for
> backward compatibility) adds only the support to read mkulzma images.

You're not quite backward compatible, because GEOM_UNCOMPRESS now
includes both lzma and zip.

You may want to add GEOM_UNCOMPRESS_ULZMA and document it as the
way to add support for lzma. That way you can simply "redefine"
GEOM_UNCOMPRESS as meaning any and all compression algorithms.

Thus:
-   GEOM_UNCOMPRESS gives you support for any and all.
-   GEOM_UNCOMPRESS_FOO gives you support for just FOO.

> 
> I think we could eventually retire geom_uzip(8) as they are doing
> essentially the same thing (with the same implementation and code...).
> But this lets a lot of open questions regarding backward
> compatibility.

You can even redefine GEOM_UZIP to do what GEOM_UNCOMPRESS_UZIP
does. If the code is effectively the same then compatibility is
about the options, not the actual C files underneath...

In general: good!

-- 
Marcel Moolenaar
marcel at xcllnt.net


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20140507/68040504/attachment.sig>


More information about the freebsd-geom mailing list