vio_vdev_node(9)
π vio_vdev_node(9) β the Kernel API Manual, bestie edition π
okay so this is a page about vio_vdev_node from the Kernel API Manual, and honestly? it's small but it's mighty. let's get into it β¨
πΈ NAME πΈ
vio_vdev_node β find the VDEV node in MD. that's it. that's the whole job. iconic behavior, no notes π
β¨ SYNOPSIS β¨
u64 vio_vdev_node (struct mdesc_handle *hp , struct vio_dev *vdev );
like, look at her. one function, two args, returns a u64. she's serving minimalism and we're obsessed π«Ά
π¦ ARGUMENTS π¦
hpβ the handle to the MD. your golden ticket, your backstage pass πvdevβ pointer to the VDEV. the lil guy we're looking for π
π DESCRIPTION π
so basically, this function finds the node in the current MD that matches the vio_dev you handed it. lowkey straightforward, highkey important.
but here's the tea β β this must be done dynamically, because the node value can change if the MD gets updated. so don't you dare cache it and think you're cute, because the MD said "I'm fluctuant" and meant it π
π NOTE π
the MD must be locked, using mdesc_grab, when calling this routine
fr fr. lock it first. do not skip this step. this is not a drill, bestie. mdesc_grab before you call, every single time, no cap π
π RETURN π
returns the VDEV node in MDESC. that's the whole payoff, and it slays β¨
π SEE ALSO π
- Kernel file
./arch/sparc/kernel/vio.cβ go read the source, iykyk π
and that's the vibe check, bestie! π§ this came from ./arch/sparc/kernel and it's dated October 2026, page vio_vdev_node(9) β stay locked, stay dynamic, and slay the MD ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms