Revert #3464 changes that crept into #2882 commit

Signed-off-by: Richard Yao <ryao@gentoo.org>
Illumos #3098

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

Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

Ported-by: Tim Chase <tim@chase2k.com>

Conflicts:
	lib/libzfs/libzfs_dataset.c
Illumos #3236

3236 zio nop-write

Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <chris.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>

References:
  illumos/illumos-gate@80901aea8e78a2c20751f61f01bebd1d5b5c2ba5
  https://www.illumos.org/issues/3236

Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

Conflicts:
	module/zfs/dmu.c
	module/zfs/spa_misc.c
Constify first argument of dmu_objset_find()

This enables us to avoid typecasting (char *) in other areas of the
code. In particular, the zvol code.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Import zvol_create_minors() from FreeBSD

The current zvol_create_minors() code depends on dmu_objset_find_spa(),
which is removed as of Illumos #3464. We can use FreeBSD's function as a
replacement with a few changes.

1. printf() becomes printk()

2. zvol_inhibit_dev support is checked in zvol_create_minors()

3. The helper function zvol_create_snapshots is altered to stop printing
a warning when it sees ENODEV from zvol_create_minor(). That means that
snapdev=hidden is set.

Ported-by: Richard Yao <ryao@gentoo.org>
Illumos 3464 zfs synctask code needs restructuring

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Ported-by: Richard Yao <ryao@gentoo.org>
25068 arc_evict_ghost() should not hold arcs_mtx for a long time

glibc provides sched_yield() rather than yield(). kpreempt() in
zfs_context.h was adjusted to reflect this.

Ported-by: Richard Yao <ryao@gentoo.org>
21470 dsl_dataset_t ds_dir->dd_lock is highly contended
25529 assertion failed in dsl_dataset_check_quota()

Ported-by: Richard Yao <ryao@gentoo.org>