函数逻辑报告

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

函数名称:blkdev_open

函数原型:static int blkdev_open(struct inode *inode, struct file *filp)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct file *filp
1857  f_flags或等于O_LARGEFILE
1859  f_mode或等于File is capable of returning -EAGAIN if I/O will block
1861  如果f_flags按位与O_NDELAYf_mode或等于File is opened with O_NDELAY (only set for block devices)
1863  如果f_flags按位与O_EXCLf_mode或等于File is opened with O_EXCL (only set for block devices)
1865  如果f_flags按位与O_ACCMODE的值恒等于3则f_mode或等于File is opened using open(.., 3, ..) and is writeable only for ioctls(specialy hack for floppy.c)
1868  bdev等于bd_acquire(inode)
1869  如果(bdev == NULL)则返回:负ENOMEM
1872  f_mapping等于i_mapping
1873  f_wb_err等于lemap_sample_wb_err - sample the current errseq_t to test for later errors*@mapping: mapping to be sampled* Writeback errors are always reported relative to a particular sample point* in the past. This function provides those sample points.
1875  返回: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