alblue/mac-zfs — pull request #2 by BjoKaSH (2012-08-05 19:32:41+00:00)
Title: First try to implement ashift property.

Hello Alex,

As pushed forward by Daniel on the mailing list, implements "zpool create -o ashift=xxx ...". I have tested it on Snow Leopard (using my makefile-build system) and it seems to work.

This commit should work as "fast-forward" on your master.

-- Björn

This commit tries to implement the ashift pool property as used
in ZFSonLinux and the ZEVO beta releases. It is based on the
ZFSonLinux implementation, and follows this comment:
https://github.com/zfsonlinux/zfs/pull/195#issuecomment-1029278
and the resulting final patch for ZFSonLinux found here:
https://github.com/zfsonlinux/zfs/commit/df30f56639f96175ba71d83b4456ccf410c46542
The original inventors are
- Darik Horn
- Richard Laager
- Christian Kohlschütter

Due to the large distance between macZFS and ZFSonLinux
(pool version 8 vs. 28) it was necessary to redo and adapt their
approach instead of just copying the changes.

Note that this solution is technical not fully correct:
(a) it introduces a pool property that should not exist in pool
version 8
(b) it introduces a new property type, PROP_ONTIME that should not
exist in pool version 8
(c) the ashift value is really a property of individual top-level
vdevs, and not a pool-wide value. A pool can (and should under
certain conditions) have top-level vdevs of different block size.

However, using a pool-wide property is what other implementations do,
so we do the same for the sake of compatibility.