Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\partition-generic.c Create Date:2022-07-28 17:21:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_add_partition

Proto:static bool blk_add_partition(struct gendisk *disk, struct block_device *bdev, struct parsed_partitions *state, int p)

Type:bool

Parameter:

TypeParameterName
struct gendisk *disk
struct block_device *bdev
struct parsed_partitions *state
intp
488  size = size
489  from = from
492  If Not size Then Return true
495  If from >= get_capacity(disk) Then
496  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
499  If disk_unlock_native_capacity(disk) Then Return false
501  Return true
504  If from + size > get_capacity(disk) Then
505  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
509  If disk_unlock_native_capacity(disk) Then Return false
517  size = get_capacity(disk) - from
520  part = Must be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.
522  If IS_ERR(part) && PTR_ERR(part) != -ENXIO Then
523  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
525  Return true
532  Return true
Caller
NameDescribe
blk_add_partitions