函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Helper function to check the validity of zones of a zoned block device.

函数原型:static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx, void *data)

返回类型:int

参数:

类型参数名称
struct blk_zone *zone
unsigned intidx
void *data
356  args等于data
357  disk等于disk
358  q等于queue
359  capacity等于get_capacity(disk)
365  如果Zone start sector 恒等于0则
367  打印警告信息("%s: Invalid zoned device with non power of two zone size (%llu)\n", name of major driver , Zone length in number of sectors )
369  返回:负ENODEV
372  zone_sectors等于Zone length in number of sectors
373  nr_zones等于capacityZone length in number of sectors 减1右移log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (Zone length in number of sectors )位
374  否则如果Zone start sector zone_sectors小于capacity
376  打印警告信息("%s: Invalid zoned device with non constant zone size\n", name of major driver )
378  返回:负ENODEV
380  否则
382  打印警告信息("%s: Invalid zoned device with larger last zone size\n", name of major driver )
384  返回:负ENODEV
389  如果Zone start sector 不等于sector
390  打印警告信息("%s: Zone gap at sectors %llu..%llu\n", name of major driver , sector, Zone start sector )
392  返回:负ENODEV
398  如果非conv_zones_bitmap
405  退出
406  :Zone type 恒等于BLK_ZONE_TYPE_SEQWRITE_REQ
408  如果非seq_zones_wlock
411  如果非seq_zones_wlock则返回:负ENOMEM
414  退出
415  默认
416  打印警告信息("%s: Invalid zone type 0x%x at sectors %llu\n", name of major driver , (int)Zone type , Zone start sector )
418  返回:负ENODEV
421  sector加等于Zone length in number of sectors
422  返回:0