Illumos #3098 zfs userspace/groupspace fail without saying why when run as non-root

ZFSOnLinux currently We do not actually need this change because we lack
delegation support and therefore only permit root commands to be run as
root, but Illumos #3464 depends on this change and it would not hurt to
have it in the code for when delegation support is implemented.

https://www.illumos.org/issues/3098

Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Ported-by: Richard Yao <ryao@gentoo.org>
Illumos #3557, #3558, #3559, #3560 import

This was a single commit in upstream Illumos:

3557 dumpvp_size is not updated correctly when a dump zvol's size is changed
3558 setting the volsize on a dump device does not return back ENOSPC
3559 setting a volsize larger than the space available sometimes succeeds
3560 dumpadm should be able to remove a dump device

Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Albert Lee <trisk@nexenta.com>

Many of the changes made in this upstream Illumos commit was not
relevant to use because ZFSOnLinux has an almost completely rewritten
zvol.c and Linux lacks dump devices.  However, a few changes do apply
and they areare relevant in that they should make future code imports
easier to do, so we import them.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Illumos #3639 zpool.cache should skip over readonly pools

Normally we don't list pools that are imported read-only in the cache
file, however you can accidentally get one into the cache file by
importing and exporting a read-write pool while a read-only pool is
imported:

$ zpool import -o readonly test1
$ zpool import test2
$ zpool export test2
$ zdb -C

This is a problem because if the machine reboots we import all pools in
the cache file as read-write.

https://www.illumos.org/issues/3639

Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Basil Crow <basil.crow@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Ported-by: Richard Yao <ryao@gentoo.org>
Illumos #3603, #3604: bobj improvements

3603 panic from bpobj_enqueue_subobj()
3604 zdb should print bpobjs more verbosely

https://www.illumos.org/issues/3603
https://www.illumos.org/issues/3604

Reviewed by: Henrik Mattson <henrik.mattson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Dan McDonald <danmcd@nexenta.com>
Ported-by: Richard Yao <ryao@gentoo.org>
Illumos #3588 provide zfs properties for logical (uncompressed) space used and referenced

https://www.illumos.org/issues/3588

Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Richard Elling <richard.elling@dey-sys.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Ported-by: Richard Yao <ryao@gentoo.org>