函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_add_partitions

函数原型:int blk_add_partitions(struct gendisk *disk, struct block_device *bdev)

返回类型:int

参数:

类型参数名称
struct gendisk *disk
struct block_device *bdev
538  ret等于负EAGAIN
540  如果非disk_part_scan_enabled(disk)则返回:0
543  state等于check_partition(disk, bdev)
544  如果非state则返回:0
546  如果是错误
551  如果错误恒等于负ENOSPC
554  如果disk_unlock_native_capacity(disk)则返回:负EAGAIN
557  返回:负EIO
563  如果zoned恒等于Host-managed zoned block device
564  打印警告信息("%s: ignoring partition table on host managed zoned block device\n", name of major driver )
566  ret等于0
567  转到:out_free_state
575  如果access_beyond_eod
576  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
579  如果disk_unlock_native_capacity(disk)则转到:out_free_state
584  通过发送一个uevent通知用户空间
590 p小于limit循环如果size
592  highest等于p
593  disk_expand_part_tbl - expand disk->part_tbl*@disk: disk to expand part_tbl for*@partno: expand such that this partno can fit in* Expand disk->part_tbl such that @partno can fit in. disk->part_tbl
595 p小于limit循环如果非blk_add_partition(disk, bdev, state, p)则
597  转到:out_free_state
599  ret等于0
600  out_free_state :
601  free_partitions(state)
602  返回:ret