函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:int freeze_super(struct super_block *sb)

返回类型:int

参数:

类型参数名称
struct super_block *sb>s_writers.frozen is protected by sb->s_umount.
1764  atomic_inc( & s_active)
1765  lock for writing
1766  如果frozen不等于SB_UNFROZEN
1767  deactivate_locked_super - drop an active reference to superblock*@s: superblock to deactivate* Drops an active reference to superblock, converting it into a temporary* one if there is no other active references left
1768  返回:负EBUSY
1771  如果非s_flags按位与SB_BORN的值则
1772  lease a write lock
1773  返回:0
1776  如果sb_rdonly(>s_writers.frozen is protected by sb->s_umount.)则
1778  frozen等于SB_FREEZE_COMPLETE
1779  lease a write lock
1780  返回:0
1783  frozen等于SB_FREEZE_WRITE
1785  lease a write lock
1786  sb_wait_write - wait until all writers to given file system finish*@sb: the super for which we wait*@level: type of writers we wait for (normal vs page fault)* This function waits until there are no writers of given type to given file* system.
1787  lock for writing
1790  frozen等于SB_FREEZE_PAGEFAULT
1791  sb_wait_write - wait until all writers to given file system finish*@sb: the super for which we wait*@level: type of writers we wait for (normal vs page fault)* This function waits until there are no writers of given type to given file* system.
1794  sync_filesystem(>s_writers.frozen is protected by sb->s_umount.)
1797  frozen等于SB_FREEZE_FS
1798  sb_wait_write - wait until all writers to given file system finish*@sb: the super for which we wait*@level: type of writers we wait for (normal vs page fault)* This function waits until there are no writers of given type to given file* system.
1800  如果freeze_fs
1801  ret等于freeze_fs(>s_writers.frozen is protected by sb->s_umount.)
1802  如果ret
1805  frozen等于SB_UNFROZEN
1807  wake_up( & wait_unfrozen)
1809  返回:ret
1816  frozen等于SB_FREEZE_COMPLETE
1817  We are going to return to userspace and forget about these locks, the* ownership goes to the caller of thaw_super() which does unlock().
1818  lease a write lock
1819  返回:0
调用者
名称描述
ioctl_fsfreeze
freeze_bdevze_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