zfsonlinux/zfs — pull request #2049 by behlendorf (2014-01-14 00:52:42+00:00)
Title: Add large_block feature flag (WIP)

WARNING, this is a prototype patch which is only suitable for use on
dedicated test pools. Do NOT use this patch on systems with data you
care about. Once enabled it will cause new data to be written using
large blocks which are not understood by existing ZFS implementations.

This change is suitable for benchmarking the potential performance
impact of using large blocks. The configurations of primarily
interest are raidz vdevs using a large number of devices.

TODO:

1) Feature flag & reference counting. Matt has done some work that
will allow us to quickly and easily track the number of blocks
using a given feature. This will be a handy for us to be able
to be able to deactivate the feature once activated. It would
also be desirable to allow ZFS implementations without this
feature to still import the pool read-only. All datasets where
large blocks were not enabled should still be safe to mount.

2) GRUB support. Initially it may be best to prevent allowing
increased block sizes on the boot filesystem (similar to how
we handle gzip compression). Once this functionality has been
pushed in to grub this could be relaxed. But it will take
considerable time for any upstream grub improvement to make
their way back in to the distributions.

3) For Linux these changes cannot be merged until we abandon the
zio kmem caches. They are unsuitable for making the required
maximum 8M allocations. This may have a performance impact
on FreeBSD and Illumos as well, that needs to be investigated.

4) I've made one pass evaluating everywhere SPA_MAXBLOCKSIZE/SHIFT
is used to determine if SPA_OLD_MAXBLKSIZE/SHIFT or
SPA_MAXBLOCKSIZE/SHIFT should be used. However, we'll want
additional eyes on this and more testing to make sure it's right.
In particular some MOS objects use blocksize=SPA_MAXBLOCKSIZE.
We would probably want to keep those at 128k so that we have
some hope of deactivating the feature (e.g. by destroying all
filesystems with recordsize > 128k).

5) Investigate compatibility large block in Solaris's ZFS. I
strongly suspect they implemented this is a similar way. It
may be possible to allow read-only access those pools, or
upgrade them to the new OpenZFS format.

6) Fully document the feature in zpool-features(5).

Signed-off-by: Brian Behlendorf