zfsonlinux/zfs — pull request #1775 by ryao (2013-10-09 04:51:31+00:00)
Title: Newer Illumos code

This depends on zfsonlinux/spl#300. It supersedes zfsonlinux/zfs#1696 and zfsonlinux/zfs#1760.

It includes some fixes that I wrote when porting the changes. I split them out and placed them before the Illumos commits to make backporting them easier. This is not quite ready to merge yet, but it is ready for comments.

I ran `git log usr/src/uts/common/fs/zfs` and reviewed all commits made since the start of 2012 to obtain a list of commits that we were missing. The following commits have been omitted for any of the following reasons:

* They add new feature flags and I would rather not include them in this pull request.
* They don't make sense on Linux.
* They require additional improvements to the Illumos code before they can be merged (e.g. nop write)
* They have already been fixed in ZFSOnLinux (e.g. LZ4 stack overflow, txg commit callbacks don't work)

```
commit 0713e232b7712cd27d99e1e935ebb8d5de61c57d
Author: George Wilson
Date: Tue Oct 1 13:25:53 2013 -0800

4101 metaslab_debug should allow for fine-grained control
4102 space_maps should store more information about themselves
4103 space map object blocksize should be increased
4104 ::spa_space no longer works
4105 removing a mirrored log device results in a leaked object
4106 asynchronously load metaslab
Reviewed by: Matthew Ahrens
Reviewed by: Adam Leventhal
Reviewed by: Sebastien Roy
Approved by: Garrett D'Amore

commit cf746768a898264fa491791a8252865e5338dc67
Author: Bryan Cantrill
Date: Sat Aug 3 16:27:57 2013 -0700

1974 pages_pp_maximum/lotsfree discrepancy leads to mlock() failure
Reviewed by: Keith Wesolowski
Reviewed by: Brendan Gregg
Approved by: Garrett D'Amore

commit 810e43b2eb0e320833671a403fdda51917e8b036
Author: Bill Pijewski
Date: Thu Aug 22 19:03:54 2013 +0000

2932 support crash dumps to raidz, etc. pools
Reviewed by: Jerry Jelinek
Reviewed by: Matthew Ahrens
Approved by: Dan McDonald

commit 18e649782fcf9da52d755b2074b4b9382426c818
Author: Marcel Telka
Date: Tue Aug 13 07:32:14 2013 +0200

4039 zfs_rename()/zfs_link() needs stronger test for XDEV
Reviewed by: Gordon Ross
Reviewed by: Kevin Crowe
Reviewed by: Saso Kiselkov
Reviewed by: Matthew Ahrens
Approved by: Dan McDonald

commit a5b577712a34346841d970e0827b4920ace408af
Author: Dan McDonald
Date: Wed Jul 10 10:58:11 2013 -0400

348 ZFS should handle DKIOCGMEDIAINFOEXT failure
Reviewed by: Garrett D'Amore
Reviewed by: George Wilson
Approved by: Garrett D'Amore

commit 91948b51b8e978ddc88a36b2bc3ae83c20cdc9aa
Author: Keith M Wesolowski
Date: Sat Jul 27 10:50:07 2013 -0700

3875 panic in zfs_root() after failed rollback
Reviewed by: Jerry Jelinek
Reviewed by: Matthew Ahrens
Approved by: Gordon Ross

commit 3cb69f734bc60bbb4d56a28c83706db862bec082
Author: Will Andrews
Date: Tue Jun 11 09:13:55 2013 -0800

3749 zfs event processing should work on R/O root filesystems
Reviewed by: Matthew Ahrens
Reviewed by: Eric Schrock
Approved by: Christopher Siden

commit b3d9f2e26021d3f55a281af30720589d303b9806
Author: Will Andrews
Date: Tue Jun 11 09:13:51 2013 -0800

3747 txg commit callbacks don't work
Reviewed by: Matthew Ahrens
Reviewed by: Eric Schrock
Approved by: Christopher Siden

commit d8fa96c3021236b21f47b84036cbe4f5d4854a06
Author: Sa?o Kiselkov
Date: Wed Apr 24 08:45:43 2013 -0800

3705 stack overflow due to zfs lz4 compression
Reviewed by: Matthew Ahrens
Approved by: Christopher Siden

commit d5ee8a1311accef11ec2057f70da38d1dd687088
Author: Matthew Ahrens
Date: Sun Apr 7 18:40:39 2013 -0800

3654 zdb should print number of ganged blocks
3655 ::rrwlock and ::refcount print errors on non-debug kernels
3656 remove unused function zap_cursor_move_to_key()
3657 mdb_ctf_vread() should allow conversion of pointer to uintptr_t
Reviewed by: George Wilson
Reviewed by: Christopher Siden
Reviewed by: Dan McDonald
Approved by: Garrett D'Amore

commit c61ea5668634a215fd1c9000beb7f6d2853b3468
Author: George Wilson
Date: Wed Feb 20 22:50:16 2013 -0800

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
Reviewed by: Matthew Ahrens
Reviewed by: Christopher Siden
Approved by: Albert Lee

commit 80901aea8e78a2c20751f61f01bebd1d5b5c2ba5
Author: George Wilson
Date: Tue Nov 13 14:55:48 2012 -0800

3236 zio nop-write
Reviewed by: Matt Ahrens
Reviewed by: Adam Leventhal
Reviewed by: Christopher Siden
Approved by: Garrett D'Amore

commit cd1c8b85eb30b568e9816221430c479ace7a559d
Author: Matthew Ahrens
Date: Thu Aug 30 05:13:49 2012 -0700

3112 ztest does not honor ZFS_DEBUG
3113 ztest should use watchpoints to protect frozen arc bufs
3114 some leaked nvlists in zfsdev_ioctl
3115 poll(2) returns prematurely in presence of spurious wakeups
Reviewed by: Adam Leventhal
Reviewed by: Matt Amdur
Reviewed by: George Wilson
Reviewed by: Christopher Siden
Approved by: Eric Schrock

commit b420f3adeb349714478d1a7813d2c0e069d41555
Author: Richard Lowe
Date: Wed Aug 1 16:40:39 2012 -0400

backout 3006: causes 3046 (panics after mounting root)

commit 94dd93aee32d1616436eb51fb7b58094b9a8d3e8
Author: George Wilson
Date: Sun May 6 18:49:02 2012 -0700

1618 zfs causing system to hang in vmem_xalloc()
Reviewed by: Eric Schrock
Reviewed by: Adam Leventhal
Reviewed by: Matt Ahrens
Reviewed by: Richard Elling
Reviewed by: Garrett D'Amore
Reviewed by: Steve Gonczi
Approved by: Gordon Ross

commit c08b16378bf1d808956fc23b8c8ac30f3172a034
Author: Josef 'Jeff' Sipek
Date: Sat Feb 18 18:33:56 2012 -0500

2130 zvol DKIOCFREE uses nested DMU transactions
Reviewed by: Matthew Ahrens
Reviewed by: Dan McDonald
Reviewed by: Garrett D'Amore
Reviewed by: Richard Elling
Reviewed by: George Wilson
Approved by: Richard Lowe

commit 654b400c387942fc00d4f6869539adbd7b25fbce
Author: Joshua M. Clulow
Date: Sat Feb 4 16:38:08 2012 +1100

763 FMD msg URLs should refer to something visible
Reviewed by: Richard Lowe
Reviewed by: Yuri Pankov
Reviewed by: Garrett D'Amore
Approved by: Richard Lowe
```