Skip to contentSkip to conversation

ZFS Feature flags and LZ4 compression support

PATCH In review Massimo Maggi 3 participants 4 messages Feb 4, 2013 – Apr 10, 2013

lore
Share & tools
lore
#0 lore raw

cover ZFS Feature flags and LZ4 compression support

Dear Sirs,
Recently ZFSOnLinux project merged feature flags support, which is already included in IllumOS and FreeBSD.
This means that the on-disk format is slightly changed, and Grub2 is not able to mount upgraded pools anymore.
Delphix developers have patched Grub1 in IllumOS when merging the first feature flags support, and I've ported their work to Grub2. Those patches were already merged in Gentoo:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-boot/grub/ChangeLog?view=markup
and have already resolved an issue for an user who has accidentally upgraded his pool:
https://github.com/zfsonlinux/zfs/issues/1257
If you want to see exactly which changes I've done to the original zfs_lz4.c file, you can see them on
https://github.com/maxximino/grub2/commits/lz4_hist . In the following patches I've squashed all of the LZ4 related commits in one, to not make an unbuildable commit.
Sorry for the GIT-esque style of sending patches, if you need them formatted in another way, or to fix something, just ask me. Thanks for your attention,
Massimo Maggi

Massimo Maggi (5):
Fix reporting of RAIDZ vdevs in zfsinfo Accept pool version 5000 for feature flags Refactoring of function nvlist_find_value Check for feature flags needed to read from the pool. LZ4 compression in ZFS

 Makefile.util.def           |   1 +
 grub-core/Makefile.core.def |   1 +
 grub-core/fs/zfs/zfs.c      | 351
+++++++++++++++++++++++++++++++++-----------
 grub-core/fs/zfs/zfs_lz4.c  | 321 ++++++++++++++++++++++++++++++++++++++++
 grub-core/fs/zfs/zfsinfo.c  |  20 ++-
 include/grub/zfs/dmu.h      |  46 +++++-
 include/grub/zfs/zfs.h      |  10 +-
 include/grub/zfs/zio.h      |   1 +
 po/POTFILES.in              |   1 +
 9 files changed, 660 insertions(+), 92 deletions(-)
 create mode 100644 grub-core/fs/zfs/zfs_lz4.c
Signature · 1 line
1.8.1.1
#1 lore raw
Quoted 6 lines · Massimo Maggi

Massimo Maggi (5):
Fix reporting of RAIDZ vdevs in zfsinfo Accept pool version 5000 for feature flags Refactoring of function nvlist_find_value Check for feature flags needed to read from the pool. LZ4 compression in ZFS

Dear Sirs,
I'm writing here to ask public clarifications from the licensing point of view about the code that I've ported from Grub1 in IllumOS to Grub2. The original code is contained in those two commits:
https://hg.openindiana.org/upstream/illumos/illumos-gate/rev/2889e2596bd6 [Patch 2/5; 3/5; 4/5]
https://github.com/illumos/illumos-gate/commit/a6f561b4aee75d0d028e7b36b151c8ed8a86bc76
[Patch 5/5].
Respectively authored by Christopher Siden and Sašo Kiselkov.
The code in the patch 1/5 "Fix reporting of RAIDZ vdevs in zfsinfo" is originally written by me.
I've used only code under the path " usr/src/grub/grub-0.97/". Those files include the license header "This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version." or include the BSD 2-clause license (usr/src/grub/grub-0.97/stage2/zfs_lz4.c).
This fact made me assume that there are no licensing problems, however to ease the merging procedure, a public statement (on the grub-devel mailing list, as requested from the mantainer) from the original authors of the code about the legality of this porting would be greatly appreciated. Regards,
Massimo Maggi

#2 lore raw
Quoted 5 lines · Massimo Maggi

This fact made me assume that there are no licensing problems, however to ease the merging procedure, a public statement (on the grub-devel mailing list, as requested from the mantainer) from the original authors of the code about the legality of this porting would be greatly appreciated. Regards,

Specifically my main concern is that CDDL code might have been copied when creating those files.

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 5 lines · Massimo Maggi

This fact made me assume that there are no licensing problems, however to ease the merging procedure, a public statement (on the grub-devel mailing list, as requested from the mantainer) from the original authors of the code about the legality of this porting would be greatly appreciated. Regards,

Specifically my main concern is that CDDL code might have been copied when creating those files.

Hi Vladimir,

I'm the one who integrated LZ4 support into Illumos. The bits of glue code that I wrote to get LZ4 integrated are GPL'd in GRUB and CDDL'd in the Illumos kernel - I'm the original author, so I can release the code under any number of licenses I choose to.

As to the LZ4 decompressor, that is 2-clause BSD (aka FreeBSD) written by Yann Collet: http://fastcompression.blogspot.com/
The FreeBSD license is compatible with both GPL and CDDL, so there is no licensing issue there either:
https://www.gnu.org/licenses/license-list.html#FreeBSD

Cheers,
- --
Saso
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlFlY7gACgkQle4gLqwmJMfSMQCffWPtzXYRf1aXlpWyV4pPy+Vz yYIAoJg3Luc+rP65s7ohg3rXOhIqGtUl
=2J04
-----END PGP SIGNATURE-----