Function report |
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 activity | Download SCCT | Chinese |
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:
Type | Parameter | Name |
---|---|---|
struct queue_limits * | t | |
struct queue_limits * | b | |
sector_t | start |
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 |
562 | If io_min & physical_block_size - 1 Then |
569 | If io_opt & physical_block_size - 1 Then |
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) |
593 | If discard_granularity != 0 && discard_alignment != alignment Then |
595 | top = discard_granularity + discard_alignment |
596 | bottom = discard_granularity + alignment |
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) |
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 |
Name | Describe |
---|---|
blk_queue_stack_limits | inherit underlying queue limits for stacked drivers |
bdev_stack_limits | adjust queue limits for stacked drivers |
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 |