bdev_rw_virt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ bdev_rw_virt(9) β€” Kernel API Manual, but make it cute πŸ¦‹

okay so welcome to the bdev_rw_virt(9) page, bestie. This is the Kernel API Manual entry for synchronous read/write into kernel mappings, and we’re gonna make it make sense. No cap. ✨


✨ NAME ✨

bdev_rw_virt - synchronously read into / write from kernel mapping. That’s the name, that’s the job, that’s the vibe check. πŸ’…


🌸 SYNOPSIS 🌸

       int bdev_rw_virt (struct block_device *bdev , sector_t sector , void
       *data , size_t len , enum req_op op );

Yep, that’s the whole signature. Keep it exactly like that β€” kernel API energy does not do β€œclose enough,” fr fr. 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • bdev β€” block device to access. The block device bestie. 🫢
  • sector β€” sector to access. Yes, sector, not sector-adjacent. πŸ’€
  • data β€” data to read/write. The payload of the operation. πŸ“
  • len β€” length in byte to read/write. Keep the unit exactly as the page says. 🌸
  • op β€” operation (e.g. REQ_OP_READ/REQ_OP_WRITE). This tells it which direction the vibe is going. πŸ”₯

πŸ’… DESCRIPTION πŸ’…

Performs synchronous I/O to bdev for data/len. So it’s sync I/O, not β€œI’ll get back to you later” energy. πŸ’–

🚨 Important caveat: data must be in the kernel direct mapping and not a vmalloc address. Do not ignore this, bestie β€” this is the β€œread the instructions before you touch the kernel” part. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./block/bio.c β€” and the whole bio friend group, in the order the page lists them:


That’s the page, bestie! πŸ’– Source/version: ./block Β· Date: October 2026. Go forth and slay your synchronous I/O with the correct mapping energy. 🫢✨

πŸ“¦ where this page comes from