函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\genhd.c Create Date:2022-07-27 18:53:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:del_gendisk

函数原型:void del_gendisk(struct gendisk *disk)

返回类型:void

参数:

类型参数名称
struct gendisk *disk
778  blk_integrity_del(disk)
779  disk_del_events(disk)
785  lock for writing
787  disk_part_iter_init - initialize partition iterator*@piter: iterator to initialize*@disk: disk to iterate over*@flags: DISK_PITER_* flags* Initialize @piter so that it iterates over partitions of @disk.* CONTEXT:* Don't care.
789 part等于disk_part_iter_next - proceed iterator to the next partition and return it*@piter: iterator of interest* Proceed @piter to the next partition and return it.* CONTEXT:* Don't care.循环
790  invalidate_partition(disk, partno)
791  bdev_unhash_inode(part_devt(part))
792  Must be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.
794  disk_part_iter_exit - finish up partition iteration*@piter: iter of interest* Called when iteration is over. Cleans up @piter.* CONTEXT:* Don't care.
796  invalidate_partition(disk, 0)
797  bdev_unhash_inode(disk_devt(disk))
798  set_capacity(disk, 0)
799  flags与等于GENHD_FL_UP的反
800  lease a write lock
802  如果非flags按位与GENHD_FL_HIDDEN的值则sysfs_remove_link( & kobj, "bdi")
804  如果queue
809  如果非flags按位与GENHD_FL_HIDDEN的值则bdi_unregister(backing_dev_info)
811  lk_unregister_queue - counterpart of blk_register_queue()*@disk: Disk of which the request queue should be unregistered from sysfs.* Note: the caller is responsible for guaranteeing that this function is called* after blk_register_queue() has finished.
812  否则
813  WARN_ON(1)
816  如果非flags按位与GENHD_FL_HIDDEN的值则blk_unregister_region(disk_devt(disk), maximum number of minors, =1 for * disks that can't be partitioned. )
824  We invalidate devt by assigning NULL pointer for devt in idr.
826  递减引用计数对象
827  递减引用计数对象
829  part_stat_set_all( & part0, 0)
830  stamp等于0
831  如果非sysfs_deprecatedsysfs_remove_link(block_depr, dev_name(disk_to_dev(disk)))
833  pm_runtime_set_memalloc_noio(disk_to_dev(disk), false)
834  device_del(disk_to_dev(disk))