函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\direct-io.c Create Date:2022-07-29 10:46:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static struct bio *dio_await_one(struct dio *dio)

返回类型:struct bio

参数:

类型参数名称
struct dio *dio
487  struct bio * bio = NULL
489  spin_lock_irqsave( & protects BIO fields below , flags)
497  当(direct_io_worker() and bios > 1 && singly linked via bi_private == NULL)循环
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;* (深度睡眠态)
499  waiting task (NULL if none) 等于当前进程
500  spin_unlock_irqrestore( & protects BIO fields below , flags)
501  如果非ki_flags按位与IOCB_HIPRI的值或非blk_poll(queue, bio_cookie, true)则io_schedule()
505  spin_lock_irqsave( & protects BIO fields below , flags)
506  waiting task (NULL if none) = NULL
508  如果singly linked via bi_private
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  返回:bio
调用者
名称描述
dio_await_completionWait on and process all in-flight BIOs