函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:d_prepare_to_claim - prepare to claim a block device*@bdev: block device of interest*@whole: the whole device containing @bdev, may equal @bdev*@holder: holder trying to claim @bdev* Prepare to claim @bdev

函数原型:static int bd_prepare_to_claim(struct block_device *bdev, struct block_device *whole, void *holder)

返回类型:int

参数:

类型参数名称
struct block_device *bdev
struct block_device *whole
void *holder
1076  retry :
1078  如果非d_may_claim - test whether a block device can be claimed*@bdev: block device of interest*@whole: whole block device containing @bdev, may equal @bdev*@holder: holder trying to claim @bdev* Test whether @bdev can be claimed by @holder.* CONTEXT:则返回:负EBUSY
1082  如果bd_claiming
1083  wq等于bit_waitqueue( & bd_claiming, 0)
1084  DEFINE_WAIT(wait)
1086  Note: we use "set_current_state()" _after_ the wait-queue add,* because we need a memory barrier there on SMP, so that any* wake-function that tests for the wait-queue being active* will be guaranteed to see waitqueue addition _or_ subsequent
1087  自旋锁解锁
1088  进程调度
1089  sh_wait - clean up after waiting in a queue*@wq_head: waitqueue waited on*@wq_entry: wait descriptor* Sets current thread back to running state and removes* the wait descriptor from the given waitqueue if still* queued.
1090  加自旋锁
1091  转到:retry
1095  返回:0
调用者
名称描述
bd_start_claimingd_start_claiming - start claiming a block device*@bdev: block device of interest*@holder: holder trying to claim @bdev*@bdev is about to be opened exclusively