bio_complete_in_task(9)
β¨ NAME β¨
bio_complete_in_task β the helper that makes sure a bio gets completed in preemptible task context. This page is from the Kernel API Manual, and yes bestie, itβs bio_complete_in_task(9) π
π SYNOPSIS π
bool bio_complete_in_task (struct bio *bio );
πΈ ARGUMENTS πΈ
bioβ the bio you want to complete. Thatβs it. Thatβs the whole argument. slay.
π« DESCRIPTION π«
Okay so hereβs the vibe check: if you call this from non-task context, it offloads the bio completion to a worker thread and returns true. β¨ iconic β¨
Otherwise β the else branch β it returns false and does nothing. No cap, thatβs the whole behavior.
It uses BIO_COMPLETE_IN_TASK as a sentinel. If that sentinel is set, the bio was already deferred and we are running in the worker β so it returns false, letting the callback proceed instead of re-deferring. very mindful, very demure.
π SEE ALSO π
- Kernel file
./include/linux/bio.h bio_advance(9)struct folio_iter(9)bio_for_each_folio_all(9)bio_next_split(9)bio_in_atomic(9)bio_endio_status(9)bio_iov_bounce_nr_vecs(9)bio_add_max_vecs(9)bio_is_zone_append(9)
Signing off from the footer: source/version ./include/linux, dated October 2026, page bio_complete_in_task(9) β stay preemptible, 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