Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\super.c Create Date:2022-07-28 20:02:31
Last Modify:2022-05-24 06:42:17 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:int freeze_super(struct super_block *sb)

Type:int

Parameter:

TypeParameterName
struct super_block *sb>s_writers.frozen is protected by sb->s_umount.
1764  atomic_inc( & s_active)
1765  lock for writing
1766  If frozen != SB_UNFROZEN Then
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  Return -EBUSY
1771  If Not (s_flags & SB_BORN) Then
1772  lease a write lock
1773  Return 0
1776  If sb_rdonly(>s_writers.frozen is protected by sb->s_umount.) Then
1778  frozen = SB_FREEZE_COMPLETE
1779  lease a write lock
1780  Return 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  If freeze_fs Then
1801  ret = freeze_fs(>s_writers.frozen is protected by sb->s_umount.)
1802  If ret Then
1805  frozen = SB_UNFROZEN
1807  wake_up( & wait_unfrozen)
1809  Return 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  Return 0
Caller
NameDescribe
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