函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ze_bdev -- lock a filesystem and force it into a consistent state*@bdev: blockdevice to lock* If a superblock is found on this device, we take the s_umount semaphore* on it to make sure nobody unmounts until the snapshot creation is done

函数原型:struct super_block *freeze_bdev(struct block_device *bdev)

返回类型:struct super_block

参数:

类型参数名称
struct block_device *bdev
536  error等于0
538  mutex_lock( & Mutex for freeze )
539  如果 The counter of freeze processes 先自加大于1则
545  sb等于获得驱动块
546  如果sbdrop_super(sb)
548  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.
549  返回:sb
552  sb等于get_active_super - get an active reference to the superblock of a device*@bdev: device to get the superblock for* Scans the superblock list and finds the superblock of the file system* mounted on the device given. Returns the superblock with an active
553  如果非sb则转到:out
555  如果freeze_supererror等于freeze_super(sb)
557  否则error等于ze_super - lock the filesystem and force it into a consistent state*@sb: the super to lock* Syncs the super to make sure the filesystem is consistent and calls the fs's* freeze_fs. Subsequent calls to this without first thawing the fs will return* -EBUSY.
559  如果error
560  降低活跃性
561  The counter of freeze processes 自减
562  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.
563  返回:错误号
565  降低活跃性
566  out :
567  Write out and wait upon all the dirty data associated with a block* device via its mapping. Does not take the superblock lock.
568  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.
569  返回:sb