Code Review for gwr-requested

Prepared by:Dan McDonald on 2019-Oct-17 20:20 -0400 EDT
Workspace:/home/danmcd/gwr/illumos-gate (at 2e15d2ad5a9a)
Compare against: /home/danmcd/gwr/illumos-gate (explicit revision fa6194c75f14)
Summary of changes: 295 lines changed: 204 ins; 10 del; 81 mod; 55943 unchg
Patch of changes: gwr-requested.patch

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/cmd/zfs/zfs_main.c

blah
XXX - fix get_all_datasets call
XXX - fix get_all_datasets call
12 lines changed: 0 ins; 2 del; 10 mod; 8112 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/lib/libdtrace/common/nfs.d

Fix NFS dtrace
2 lines changed: 0 ins; 0 del; 2 mod; 133 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs3_srv.c

Revert exi_zone to exi_zoneid, and install exi_ne backpointer
Caution with use after exi_rele()
Be far more judicious in the use of curzone-using macros.
(Merge and extra asserts by danmcd.)
curzone reality check and teardown changes to use the RIGHT zone
Try to remove assumption that zone's root vnode is marked VROOT
10 lines changed: 8 ins; 1 del; 1 mod; 4456 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs4_srv.c

Hyperaggressive asserts pt 2/N
Be far more judicious in the use of curzone-using macros.
(Merge and extra asserts by danmcd.)
dss_paths[] entries need cleanup too
Try to remove assumption that zone's root vnode is marked VROOT
34 lines changed: 20 ins; 2 del; 12 mod; 10075 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs4_srv_attr.c

Be far more judicious in the use of curzone-using macros.
(Merge and extra asserts by danmcd.)
Try to remove assumption that zone's root vnode is marked VROOT
19 lines changed: 12 ins; 0 del; 7 mod; 2855 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs4_srv_ns.c

Revert exi_zone to exi_zoneid, and install exi_ne backpointer
Caution with use after exi_rele()
Ooops exi_zoneid isn't a variable again yet
Be far more judicious in the use of curzone-using macros.
(Merge and extra asserts by danmcd.)
curzone reality check and teardown changes to use the RIGHT zone
Try to remove assumption that zone's root vnode is marked VROOT
37 lines changed: 17 ins; 1 del; 19 mod; 1255 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs4_state.c

Dan mods to NFS desgin problems re. multiple zone keys
Do rfs4_ss_fini() BEFORE rfs4_servinst_destroy_all().
Go ahead and destroy the NFSv4 database tables
21 lines changed: 10 ins; 3 del; 8 mod; 4123 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs_auth.c

Revert exi_zone to exi_zoneid, and install exi_ne backpointer
NFS Auth per-zone needs better cleanup
curzone reality check and teardown changes to use the RIGHT zone
4 lines changed: 4 ins; 0 del; 0 mod; 1596 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs_export.c

Untrip aggressive assert AND use EXI_TO_ZONEROOTVP
Revert exi_zone to exi_zoneid, and install exi_ne backpointer
Hyperaggressive asserts pt 1/N
Ooops exi_zoneid isn't a variable again yet
Be far more judicious in the use of curzone-using macros.
(Merge and extra asserts by danmcd.)
Bad assertions
nfs_export_zone_init() can't assume called in zone-context.
curzone reality check and teardown changes to use the RIGHT zone
Try to remove assumption that zone's root vnode is marked VROOT
29 lines changed: 24 ins; 1 del; 4 mod; 2963 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs_server.c

Caution with use after exi_rele()
Be far more judicious in the use of curzone-using macros.
(Merge and extra asserts by danmcd.)
4 lines changed: 4 ins; 0 del; 0 mod; 3401 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/nfs/nfs_srv.c

Revert exi_zone to exi_zoneid, and install exi_ne backpointer
Caution with use after exi_rele()
Dan mods to NFS desgin problems re. multiple zone keys
curzone reality check and teardown changes to use the RIGHT zone
Try to remove assumption that zone's root vnode is marked VROOT
7 lines changed: 5 ins; 0 del; 2 mod; 3157 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/sharefs/sharetab.c

Plug sharefs zone-shutdown leaks
22 lines changed: 22 ins; 0 del; 0 mod; 441 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/klm/nlm_impl.c

Zone ID only matches once, don't loop after a match
Two NLM fixes: use zone_kcred() and plug cl_auth leaks
23 lines changed: 16 ins; 0 del; 7 mod; 2832 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/nfs/export.h

Revert exi_zone to exi_zoneid, and install exi_ne backpointer
curzone reality check and teardown changes to use the RIGHT zone
Try to remove assumption that zone's root vnode is marked VROOT
22 lines changed: 18 ins; 0 del; 4 mod; 726 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/os/zone.c

Add VZONEROOT flag because not all zone roots have VROOT set.
25 lines changed: 22 ins; 0 del; 3 mod; 7387 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/sys/vnode.h

Add VZONEROOT flag because not all zone roots have VROOT set.
7 lines changed: 7 ins; 0 del; 0 mod; 1559 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/sys/zone.h

Be far more judicious in the use of curzone-using macros.
(Merge and extra asserts by danmcd.)
Try to remove assumption that zone's root vnode is marked VROOT
17 lines changed: 15 ins; 0 del; 2 mod; 872 unchg

This code review page was prepared using /opt/onbld/bin/webrev. Webrev is maintained by the illumos project. The latest version may be obtained here.