Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:struct super_block *get_active_super(struct block_device *bdev)

Type:struct super_block

Parameter:

TypeParameterName
struct block_device *bdev
851  If Not bdev Then Return NULL
854  restart :
855  spin_lock( & sb_lock)
857  If hlist_unhashed( & s_instances) Then Continue
859  If s_bdev == bdev Then
860  If Not grab_super - acquire an active reference*@s: reference we are trying to make active* Tries to acquire an active reference. grab_super() is used when we* had just found a superblock in super_blocks or fs_type->fs_supers Then Go to restart
862  lease a write lock
863  Return sb
866  spin_unlock( & sb_lock)
867  Return NULL
Caller
NameDescribe
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