Feature #12554


want sdev plugin framework

Added by Patrick Mooney about 2 years ago. Updated about 2 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


As part of the Bardiche/vnd networking effort in SmartOS, Joyent created a generic sdev (/dev) plugin framework.
This is required for bhyve, which uses it to expose entities in /dev/vmm

This is made up of the following pieces from illumos-joyent:
- OS-2784 want sdev plugin interface
- OS-6545 need sdev_ctx_minor()
- OS-6558 sdev_create_minor_node should allow non-666
- OS-6659 sdev_plugin_register should set *errp to 0 on success
- OS-6714 sdev_plugin_register() attempts to open non-global "/dev"
- OS-6791 sdev_plugin_unregister() can deadlock
- OS-6216 VOP_ACCESS() use in sdev_readdir() leads to deadlock
- OS-2910 sdev_node_t can end up associated with wrong sdev_plugin_t

And includes the fixes (to the new sdev bits) from:
- OS-7960 need fixes for NULL as a pointer
- OS-7768 illumos-joyent needs smatch fixes

A piece outstanding which will be of interest if bhyve-branded zones are integrated:
- OS-5343 dockerinit gets stuck in zfd_ready, zfd devices not showing up after > 1 hour

And a piece which should perhaps be investigated for dataset delegation:
- OS-4191 blown assert on lx zone with delegated dataset

Actions #1

Updated by Patrick Mooney about 2 years ago

  • Description updated (diff)
Actions #2

Updated by Patrick Mooney about 2 years ago

  • Assignee set to Robert Mustacchi
Actions #3

Updated by Patrick Mooney about 2 years ago

With bhyve slated as the first consumer of the plugin interface, this wad was primarily tested for regressions (although it was built with the pending bhyve bits to ensure they were DOA). With the change applied, it was verified that resources like vnics and zvols appeared as normal & expected in /dev. This was checked in both the global zone and a sparse non-global zone. Additionally, Robert's sdev tests ( were slightly modified (removing vmadm pieces) to hammer those same components. It appeared to run without issues.

Actions #4

Updated by Dan McDonald about 2 years ago

This has also been in OmniOSce since commit f32aebb2e70d5b2c03fde9797160370857f5ff48 in illumos-omnios since February of 2018.

Actions #5

Updated by Electric Monk about 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit f8927fa6636832af96f657f29571bdbd213c6247

commit  f8927fa6636832af96f657f29571bdbd213c6247
Author: Robert Mustacchi <>
Date:   2020-05-11T18:08:25.000Z

    12554 want sdev plugin framework
    Portions contributed by: John Levon <>
    Portions contributed by: Mike Gerdts <>
    Reviewed by: Jerry Jelinek <>
    Reviewed by: Toomas Soome <>
    Approved by: Dan McDonald <>

Actions #6

Updated by Electric Monk about 2 years ago

git commit 868e1ac07011f1f9626a73a411c31ebbdd462e3d

commit  868e1ac07011f1f9626a73a411c31ebbdd462e3d
Author: Patrick Mooney <>
Date:   2020-05-12T00:45:11.000Z

    12554 want sdev plugin framework (fix header issue)
    Reviewed by: Richard Lowe <>
    Approved by: Richard Lowe <>


Also available in: Atom PDF