Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static int bd_prepare_to_claim(struct block_device *bdev, struct block_device *whole, void *holder)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
struct block_device *whole
void *holder
1076  retry :
1078  If Not 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: Then Return -EBUSY
1082  If bd_claiming Then
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  spin_unlock( & pseudo-fs)
1088  schedule()
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  spin_lock( & pseudo-fs)
1091  Go to retry
1095  Return 0
Caller
NameDescribe
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