Project

General

Profile

Feature #12554

want sdev plugin framework

Added by Patrick Mooney 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
bhyve
Gerrit CR:

Description

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

#1

Updated by Patrick Mooney 9 months ago

  • Description updated (diff)
#2

Updated by Patrick Mooney 9 months ago

  • Assignee set to Robert Mustacchi
#3

Updated by Patrick Mooney 9 months 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 (https://github.com/joyent/sdev-tests/) were slightly modified (removing vmadm pieces) to hammer those same components. It appeared to run without issues.

#4

Updated by Dan McDonald 9 months ago

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

#5

Updated by Electric Monk 9 months ago

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

git commit f8927fa6636832af96f657f29571bdbd213c6247

commit  f8927fa6636832af96f657f29571bdbd213c6247
Author: Robert Mustacchi <rm@joyent.com>
Date:   2020-05-11T18:08:25.000Z

    12554 want sdev plugin framework
    Portions contributed by: John Levon <john.levon@joyent.com>
    Portions contributed by: Mike Gerdts <mike.gerdts@joyent.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

#6

Updated by Electric Monk 9 months ago

git commit 868e1ac07011f1f9626a73a411c31ebbdd462e3d

commit  868e1ac07011f1f9626a73a411c31ebbdd462e3d
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-05-12T00:45:11.000Z

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

Also available in: Atom PDF