函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lkdev_get_by_path - open a block device by name*@path: path to the block device to open*@mode: FMODE_* mask*@holder: exclusive holder identifier* Open the blockdevice described by the device file at @path. @mode* and @holder are identical to blkdev_get().

函数原型:struct block_device *blkdev_get_by_path(const char *path, fmode_t mode, void *holder)

返回类型:struct block_device

参数:

类型参数名称
const char *path
fmode_tmode
void *holder
1791  bdev等于lookup_bdev - lookup a struct block_device by name*@pathname: special file representing the block device* Get a reference to the blockdevice at @pathname in the current* namespace if possible and return it. Return ERR_PTR(error)* otherwise.
1792  如果是错误则返回:bdev
1795  err等于lkdev_get - open a block device*@bdev: block_device to open*@mode: FMODE_* mask*@holder: exclusive holder identifier* Open @bdev with @mode. If @mode includes %FMODE_EXCL, @bdev is* open with exclusive access. Specifying %FMODE_EXCL with %NULL
1796  如果err则返回:错误号
1799  如果mode按位与le is open for writing bdev_read_only(bdev)则
1800  blkdev_put(bdev, mode)
1801  返回:错误号
1804  返回:bdev
调用者
名称描述
mount_bdev