函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lk_revalidate_disk_zones - (re)allocate and initialize zone bitmaps*@disk: Target disk* Helper function for low-level device drivers to (re) allocate and initialize* a disk request queue zone bitmaps. This functions should normally be called

函数原型:int blk_revalidate_disk_zones(struct gendisk *disk)

返回类型:int

参数:

类型参数名称
struct gendisk *disk
437  q等于queue
438  struct blk_revalidate_zone_args args = {disk = disk, }
444  如果WARN_ON_ONCE(!blk_queue_is_zoned(q))则返回:负EIO
446  如果WARN_ON_ONCE(!queue_is_mq(q))则返回:负EIO
453  noio_flag等于memalloc_noio_save - Marks implicit GFP_NOIO allocation scope
454  ret等于report_zones(disk, 0, UINT_MAX, Helper function to check the validity of zones of a zoned block device., & args)
456  memalloc_noio_restore - Ends the implicit GFP_NOIO scope.*@flags: Flags to restore.* Ends the implicit GFP_NOIO scope started by memalloc_noio_save function.* Always make sure that that the given flags is the return value from the
463  blk_mq_freeze_queue(q)
464  如果ret大于等于0则
465  lk_queue_chunk_sectors - set size of the chunk for this queue*@q: the request queue for the device*@chunk_sectors: chunk sectors in the usual 512b unit* Description:* If a driver doesn't want IOs to cross a given chunk size, it can set
466  * Zoned block device information for request dispatch control. * nr_zones is the total number of zones of the device. This is always * 0 for regular block devices. conv_zones_bitmap is a bitmap of nr_zones * bits which indicates if a zone is conventional (等于nr_zones
467  swap - swap values of @a and @b*@a: first value*@b: second value(seq_zones_wlock, seq_zones_wlock)
468  swap - swap values of @a and @b*@a: first value*@b: second value(conv_zones_bitmap, conv_zones_bitmap)
469  ret等于0
470  否则
471  打印警告信息("%s: failed to revalidate zones\n", name of major driver )
472  blk_queue_free_zone_bitmaps(q)
474  blk_mq_unfreeze_queue(q)
476  释放内存
477  释放内存
478  返回:ret