joyent/smartos-live — pull request #150 by calmh (2012-12-04 10:21:06+00:00)
Title: 'zfs list' output requires larger buffer size

When running on a system with a certain amount of snapshots, the output
of 'zfs list' as run by loadDatasetInfo() becomes larger than the
default execFile() buffer size of 200 KB. This results in the output
being cut off somewhere mid stream and data silently missing in the
result.

This sets the buffer size to 10 MB, which is just yet another magic
constant that might be "large enough" or not. Perhaps some calculation
could be made based on expected number of zones, datasets, snapshots,
line length, etc...