Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\block_dev.c Create Date:2022-07-28 20:14:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

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

Type:struct super_block

Parameter:

TypeParameterName
struct block_device *bdev
536  error = 0
538  mutex_lock( & Mutex for freeze )
539  If ++ The counter of freeze processes > 1 Then
545  sb = get the superblock of a device
546  If sb Then drop_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  Return 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  If Not sb Then Go to out
555  If freeze_super Then error = freeze_super(sb)
557  Else 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  If error Then
560  deactivate_super - drop an active reference to superblock*@s: superblock to deactivate* Variant of deactivate_locked_super(), except that superblock is *not** locked by caller. If we are going to drop the final active reference,
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  Return ERR_PTR(error)
565  deactivate_super - drop an active reference to superblock*@s: superblock to deactivate* Variant of deactivate_locked_super(), except that superblock is *not** locked by caller. If we are going to drop the final active reference,
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  Return sb