Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:int blk_revalidate_disk_zones(struct gendisk *disk)

Type:int

Parameter:

TypeParameterName
struct gendisk *disk
437  q = queue
438  struct blk_revalidate_zone_args args = {disk = disk, }
444  If WARN_ON_ONCE(!blk_queue_is_zoned(q)) Then Return -EIO
446  If WARN_ON_ONCE(!queue_is_mq(q)) Then Return -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  If ret >= 0 Then
465  set size of the chunk for this queue
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  Else
471  pr_warn("%s: failed to revalidate zones\n", name of major driver )
472  blk_queue_free_zone_bitmaps(q)
474  blk_mq_unfreeze_queue(q)
476  kfree(seq_zones_wlock)
477  kfree(conv_zones_bitmap)
478  Return ret