Remove b_thawed from arc_buf_hdr_t

The code involving b_thawed appears to be dead, so lets discard it.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Make dmu_sync_arg_cache

Signed-off-by: Richard Yao <ryao@gentoo.org>
Make zio_gang_node_t cache

Signed-off-by: Richard Yao <ryao@gentoo.org>
User namespace compatibility

Signed-off-by: Richard Yao <ryao@gentoo.org>
Move ARC allocations to slab caches

Signed-off-by: Richard Yao <ryao@gentoo.org>
Illumos #3603, #3604: bobj improvements

3603 panic from bpobj_enqueue_subobj()
3604 zdb should print bpobjs more verbosely
3871 GCC 4.5.3 does not like issue 3604 patch

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

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>

Note that the patch from Illumos issue 3871 is not accepted into Illumos
at the time of this writing. It is something that I wrote when porting
this. Documentation is in the Illumos issue.
Make SLAB caches for dmu_tx_* operations

Signed-off-by: Richard Yao <ryao@gentoo.org>
Make slab cache for rl_t

Signed-off-by: Richard Yao <ryao@gentoo.org>
Return correct type and offset from zfs_readdir

zfs_readdir() is used by getdents(), which provides a list of all files
in directory, their types and an offset that be used by llseek() to seek
to the next directory entry.

On Solaris, the first two directory entries "." and ".." respectively
have offsets 1 and 2 on ZFS while the other files have rather large
numbers. Currently, ZFSOnLinux is  giving "." offset 0 and all other entries
large numbers. Software such as Wine will enter an infinite loop when it
calls llseek() to seek to the next entry, which is really the same
entry. The offsets used for each directory entry are filesystem specific
on all platforms, so we can fix this by adopting the Solaris behavior.

Also, we currently report each directory entry as having type 0 (???).
This is not wrong, but we can do better. Solaris does not have this
information, but Linux and Mac OS X do. ZFS provides easy access to type
information in zfs_readdir(), so this patch provides this as well.

Closes zfsonlinux/zfs#1624

Reported-by: Andrey <andrey@kudinov.su>
Signed-off-by: Richard Yao <ryao@gentoo.org>