Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\direct-io.c Create Date:2022-07-28 20:15:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Wait for the next BIO to complete. Remove it and return it. NULL is* returned once all BIOs have been completed. This must only be called once* all bios have been issued so that dio->refcount can only decrease. This

Proto:static struct bio *dio_await_one(struct dio *dio)

Type:struct bio

Parameter:

TypeParameterName
struct dio *dio
487  struct bio * bio = NULL
489  spin_lock_irqsave( & protects BIO fields below , flags)
497  When (direct_io_worker() and bios > 1 && singly linked via bi_private == NULL) cycle
498  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (TASK_UNINTERRUPTIBLE)
499  waiting task (NULL if none) = current process
500  spin_unlock_irqrestore( & protects BIO fields below , flags)
501  If Not (ki_flags & IOCB_HIPRI) || Not blk_poll(queue, bio_cookie, true) Then io_schedule()
505  spin_lock_irqsave( & protects BIO fields below , flags)
506  waiting task (NULL if none) = NULL
508  If singly linked via bi_private Then
509  bio = singly linked via bi_private
510  singly linked via bi_private = bi_private
512  spin_unlock_irqrestore( & protects BIO fields below , flags)
513  Return bio
Caller
NameDescribe
dio_await_completionWait on and process all in-flight BIOs