函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\super.c Create Date:2022-07-29 10:32:24
Last Modify:2022-05-24 06:42:17 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_tree_bdev - Get a superblock based on a single block device*@fc: The filesystem context holding the parameters*@fill_super: Helper to initialise a new superblock

函数原型:int get_tree_bdev(struct fs_context *fc, int (*fill_super)(struct super_block *, struct fs_context *))

返回类型:int

参数:

类型参数名称
struct fs_context *fc
int (*fill_super
1283  mode等于le is open for reading 按位或File is opened with O_EXCL (only set for block devices)
1284  error等于0
1286  如果非sb_flags按位与Mount read-only 的值则mode或等于le is open for writing
1289  如果非source则返回:valf - Store supplementary invalid argument error message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary error message for the process if the process has* enabled the facility and return -EINVAL.(fc, "No source specified")
1292  bdev等于blkdev_get_by_path(source, mode, fs_type)
1293  如果是错误
1294  rf - Store supplementary error message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary error message for the process if the process has* enabled the facility.(fc, "%s: Can't open blockdev", source)
1295  返回:错误
1302  mutex_lock( & Mutex for freeze )
1303  如果 The counter of freeze processes 大于0则
1304  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1305  blkdev_put(bdev, mode)
1306  warnf - Store supplementary warning message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary warning message for the process if the process has* enabled the facility.(fc, "%pg: Can't mount, blockdev is frozen", bdev)
1307  返回:负EBUSY
1310  sb_flags或等于SB_NOSEC
1311  sget_key等于bdev
1312  s等于sget_fc - Find or create a superblock*@fc: Filesystem context
1313  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1314  如果是错误
1315  blkdev_put(bdev, mode)
1316  返回:错误
1319  如果s_root
1321  如果sb_flags按位异或s_flags的值按位与Mount read-only
1324  blkdev_put(bdev, mode)
1325  返回:负EBUSY
1335  lease a write lock
1336  blkdev_put(bdev, mode)
1337  lock for writing
1338  否则
1339  s_mode等于mode
1340  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1341  sb_set_blocksize(s, block_size(bdev))
1342  error等于fill_super(s, fc)
1343  如果error
1345  返回:error
1348  s_flags或等于SB_ACTIVE
1349  bd_super等于s
1352  BUG_ON(root)
1353  root等于获得目录项引用
1354  返回:0