Please consider exporting create_new_partition() so that partman-zfs (and maybe
others) can use it. Currently it has to copy the entire function, see:
http://anonscm.debian.org/gitweb/?p=d-i/partman-zfs.git;a=commitdiff;h=b50a75d0fc9a6ac039df997364f69e5100e56802#patch2
Two things would be needed:
- Fix the parameter passing problem, and allow override of default_fs.
- Move this function to a separate file, which can be sourced without
collateral effects.
Attached patch takes care of the first one.