blk_alloc_disk(9)
β¨ NAME β¨
blk_alloc_disk β allocate a gendisk structure. Welcome to the Kernel API Manual, bestie β this is blk_alloc_disk(9), and it's lowkey iconic. π
π SYNOPSIS π
blk_alloc_disk (lim , node_id );
πΈ ARGUMENTS πΈ
limβ the queue limits to be used for this disk. That's the vibe check for the queue, basically.node_idβ the numa node to allocate on. Gotta pick where it lives, fr fr.
π¦ DESCRIPTION π¦
Allocate and pre-initialize a gendisk structure for use with BIO based drivers. It's giving "set it up before the main character energy kicks in." β¨
Returns an ERR_PTR on error, else the allocated disk. So bestie, check for that ERR_PTR β no cap. π«Ά
π΄ CONTEXT π΄
can sleep
That's the whole context note: can sleep. Let it nap, okay? π
π₯ SEE ALSO π₯
- Kernel file
./include/linux/blkdev.h genhd capability flags(9)disk_openers(9)disk_has_partscan(9)bio_needs_zone_write_plugging(9)disk_zone_capacity(9)queue_limits_start_update(9)queue_limits_cancel_update(9)bio_end_io_acct(9)
Source/version: ./include/linux Β· Date: October 2026 Β· blk_alloc_disk(9) β mwah, that's the page, bestie. πππ¦
π¦ 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