__submit_metadata_vio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ __submit_metadata_vio β€” NAME

okay so bestie, this is a page from the Kernel API Manual (manual section 9, the kernel API one, iykyk) and it's all about __submit_metadata_vio β€” which literally just submits I/O for a metadata vio. that's it, that's the whole name ✨


🌸 SYNOPSIS

void __submit_metadata_vio (struct vio *vio , physical_block_number_t
physical , bio_end_io_t callback , vdo_action_fn error_handler ,
blk_opf_t operation , char *data , int size );

like. seven whole arguments. she's high maintenance but she's worth it πŸ’…


πŸŽ€ ARGUMENTS

  • vio β€” the vio you're issuing I/O for. the main character of this whole operation, no cap.
  • physical β€” the physical block number you wanna read or write. it's a physical_block_number_t, so, y'know, a block number πŸ¦‹
  • callback β€” the bio endio function, aka the thing that gets called after the I/O completes. she's the follow-up text after a good hangout 🫢
  • error_handler β€” the handler for submission errors or I/O errors. and guess what? it may be NULL. so it's optional, iconic, lowkey chill about it.
  • operation β€” the type of I/O to perform. blk_opf_t type. that's the vibe check for what we're even doing here.
  • data β€” the buffer to read or write. may be NULL πŸ’€ yes bestie, it can be null, it's fine, we're fine.
  • size β€” the I/O amount in bytes. just a plain int, keeping it simple 🌈

✨ DESCRIPTION ✨

so here's the tea: the vio gets enqueued on a vdo bio queue so that bio submission β€” which may block 😭 β€” does not block other vdo threads. like, she goes to the queue, she waits her turn, everybody else keeps it moving. productive queen behavior πŸ‘‘

now the important caveat, don't scroll past this:

That the error handler will run on the correct thread is only true so long as the thread calling this function, and the thread set in the endio callback are the same, as well as the fact that no error can occur on the bio queue. Currently this is true for all callers, but additional care will be needed if this ever changes.

so like. the "runs on the right thread" guarantee is conditional, bestie. it holds if (a) the calling thread and the endio-callback thread are the same, and (b) no error can happen on the bio queue. currently true for all callers, but if that ever changes, somebody's gonna need to do additional care. not me. not today. πŸ™ˆ


πŸ¦‹ SEE ALSO

go check out the kernel file ./drivers/md/dm-vdo/io-submitter.c and honestly the whole friend group:


πŸŽ€ and that's the page!! this little love letter lives in ./drivers/md/dm-vdo and it's dated October 2026 β€” so like, future-dated, mysterious, main character energy fr fr. go submit some metadata, bestie, you've got this πŸ’–βœ¨

πŸ“¦ where this page comes from