Function report |
Source Code:block\blk-zoned.c |
Create Date:2022-07-28 18:06:16 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Helper function to check the validity of zones of a zoned block device.
Proto:static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx, void *data)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct blk_zone * | zone | |
unsigned int | idx | |
void * | data |
359 | capacity = get_capacity(disk) |
365 | If Zone start sector == 0 Then |
367 | pr_warn("%s: Invalid zoned device with non power of two zone size (%llu)\n", name of major driver , Zone length in number of sectors ) |
369 | Return -ENODEV |
374 | Else if Zone start sector + zone_sectors < capacity Then |
375 | If Zone length in number of sectors != zone_sectors Then |
376 | pr_warn("%s: Invalid zoned device with non constant zone size\n", name of major driver ) |
378 | Return -ENODEV |
380 | Else |
381 | If Zone length in number of sectors > zone_sectors Then |
382 | pr_warn("%s: Invalid zoned device with larger last zone size\n", name of major driver ) |
384 | Return -ENODEV |
389 | If Zone start sector != sector Then |
390 | pr_warn("%s: Zone gap at sectors %llu..%llu\n", name of major driver , sector, Zone start sector ) |
392 | Return -ENODEV |
397 | Case Zone type == BLK_ZONE_TYPE_CONVENTIONAL |
406 | Case Zone type == BLK_ZONE_TYPE_SEQWRITE_REQ |
407 | Case Zone type == BLK_ZONE_TYPE_SEQWRITE_PREF |
415 | Default |
416 | pr_warn("%s: Invalid zone type 0x%x at sectors %llu\n", name of major driver , (int)Zone type , Zone start sector ) |
418 | Return -ENODEV |
422 | Return 0 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |