Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:adjust queue_limits for stacked devices

Proto:int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, sector_t start)

Type:int

Parameter:

TypeParameterName
struct queue_limits *t
struct queue_limits *b
sector_tstart
500  ret = 0
502  max_sectors = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_sectors, max_sectors)
503  max_hw_sectors = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_hw_sectors, max_hw_sectors)
504  max_dev_sectors = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_dev_sectors, max_dev_sectors)
505  max_write_same_sectors = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(max_write_same_sectors, max_write_same_sectors)
507  max_write_zeroes_sectors = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(max_write_zeroes_sectors, max_write_zeroes_sectors)
509  bounce_pfn = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(bounce_pfn, bounce_pfn)
511  seg_boundary_mask = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(seg_boundary_mask, seg_boundary_mask)
513  virt_boundary_mask = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(virt_boundary_mask, virt_boundary_mask)
516  max_segments = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_segments, max_segments)
517  max_discard_segments = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_discard_segments, max_discard_segments)
519  max_integrity_segments = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_integrity_segments, max_integrity_segments)
522  max_segment_size = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_segment_size, max_segment_size)
525  misaligned |= misaligned
527  alignment = queue_limit_alignment_offset(b, start)
532  If alignment_offset != alignment Then
534  top = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(physical_block_size, io_min) + alignment_offset
536  bottom = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(physical_block_size, io_min) + alignment
540  misaligned = 1
541  ret = -1
545  logical_block_size = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(logical_block_size, logical_block_size)
548  physical_block_size = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(physical_block_size, physical_block_size)
551  io_min = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(io_min, io_min)
552  io_opt = lcm_not_zero(io_opt, io_opt)
555  If physical_block_size & logical_block_size - 1 Then
556  physical_block_size = logical_block_size
557  misaligned = 1
558  ret = -1
562  If io_min & physical_block_size - 1 Then
563  io_min = physical_block_size
564  misaligned = 1
565  ret = -1
569  If io_opt & physical_block_size - 1 Then
570  io_opt = 0
571  misaligned = 1
572  ret = -1
575  raid_partial_stripes_expensive = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(raid_partial_stripes_expensive, raid_partial_stripes_expensive)
580  alignment_offset = lcm_not_zero(alignment_offset, alignment) % max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(physical_block_size, io_min)
584  If alignment_offset & logical_block_size - 1 Then
585  misaligned = 1
586  ret = -1
590  If discard_granularity Then
591  alignment = queue_limit_discard_alignment(b, start)
603  max_discard_sectors = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_discard_sectors, max_discard_sectors)
605  max_hw_discard_sectors = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(max_hw_discard_sectors, max_hw_discard_sectors)
607  discard_granularity = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(discard_granularity, discard_granularity)
609  discard_alignment = lcm_not_zero(discard_alignment, alignment) % discard_granularity
613  If chunk_sectors Then chunk_sectors = min_not_zero - return the minimum that is _not_ zero, unless both are zero*@x: value1*@y: value2(chunk_sectors, chunk_sectors)
617  Return ret
Caller
NameDescribe
blk_queue_stack_limitsinherit underlying queue limits for stacked drivers
bdev_stack_limitsadjust queue limits for stacked drivers