Port of ZoL Pool Allocation Classes feature
Review Request #1662 - Created April 5, 2019 and submitted
| Information | |
|---|---|
| Jerry Jelinek | |
| illumos-gate | |
| Reviewers | |
| general | |
This is a port of the ZoL Pool Allocation classes feature, along with related fixes used by the new test cases. The following ZoL commits are included:
441709695 Pool allocation classes misplacing small file blocks
00369f333 ZTS: fix "not found" errors (partial)
0c0b0ad48 Fix racy assignment of zcb.zcb_haderrors
fea33e4e5 Pass status_cbdata_t to print_status_config() and friends
a77f29f93 Change full path subcommand flag from -p to -P
d2f3e292d Add -gLp to zpool subcommands for alt vdev names
6eb6073a0 Allow add of raidz and mirror with same redundancy
6ba1ce9ee Accept raidz and mirror with similar redundancy
cc99f275a Pool allocation classesThe primary modifications needed for illumos are in the test cases 3, 4, 5 7, 8, 9 and 12 to make them work on illumos since the ZoL test code depends on other features we don't yet have in illumos.
zfs-test run, including the new and modified tests, which pass.
Ship It!
Looks good to me. Nothing jumped out at me that needs changing. Thanks for doing this.
-
So does this look for the given vdev in the 'zpool status' output and exits zero if it's found?
This looks fine to me. You might also be able to use 'zpool clear' to accomplish this:
kkantor@openindiana:~$ zpool status rpool
...
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c3t0d0 ONLINE 0 0 0kkantor@openindiana:~$ sudo zpool clear rpool c3t0d0
kkantor@openindiana:~$ sudo zpool clear rpool c4t0d0
cannot clear errors for c4t0d0: no such device in pool
kkantor@openindiana:~$ echo $?
1 -
This looks good to me.
I'm not sure what ZoL did to 'zpool' argument parsing, but we can do something similar to what their test does:
kkantor@openindiana:~$ zpool get -Ho property,value all rpool | egrep spacemap_v2 | nawk '{print $2}'
activeor even just this (not sure why ZoL doesn't do this):
kkantor@openindiana:~$ zpool get -Ho value feature@spacemap_v2 rpool
active -
Darn. It would be nice if there were an easier way to be notified of these asynchronous actions completing.
-
I see ZoL disabled the 'zfs remap' command for possible future removal. This looks good to me.
-
usr/src/uts/common/fs/zfs/metaslab.c (Diff revision 1) -
I don't really understand why using a different metaslab is necessary. Is this just because they're too 'close' to each other? Didn't the old algorithm try to prevent that?
-
usr/src/uts/common/fs/zfs/sys/metaslab.h (Diff revision 1) -
FWIW I don't think this is referenced anywhere in this change but here. I see how it made it into the diff though.
-
usr/src/uts/common/fs/zfs/vdev.c (Diff revision 1) -
Did this block change? I guess I'm just confused by the diff software here.
