Lines Matching refs:t
514 int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, in blk_stack_limits() argument
519 t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors); in blk_stack_limits()
520 t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors); in blk_stack_limits()
521 t->max_dev_sectors = min_not_zero(t->max_dev_sectors, b->max_dev_sectors); in blk_stack_limits()
522 t->max_write_same_sectors = min(t->max_write_same_sectors, in blk_stack_limits()
524 t->max_write_zeroes_sectors = min(t->max_write_zeroes_sectors, in blk_stack_limits()
526 t->max_zone_append_sectors = min(t->max_zone_append_sectors, in blk_stack_limits()
528 t->bounce = max(t->bounce, b->bounce); in blk_stack_limits()
530 t->seg_boundary_mask = min_not_zero(t->seg_boundary_mask, in blk_stack_limits()
532 t->virt_boundary_mask = min_not_zero(t->virt_boundary_mask, in blk_stack_limits()
535 t->max_segments = min_not_zero(t->max_segments, b->max_segments); in blk_stack_limits()
536 t->max_discard_segments = min_not_zero(t->max_discard_segments, in blk_stack_limits()
538 t->max_integrity_segments = min_not_zero(t->max_integrity_segments, in blk_stack_limits()
541 t->max_segment_size = min_not_zero(t->max_segment_size, in blk_stack_limits()
544 t->misaligned |= b->misaligned; in blk_stack_limits()
551 if (t->alignment_offset != alignment) { in blk_stack_limits()
553 top = max(t->physical_block_size, t->io_min) in blk_stack_limits()
554 + t->alignment_offset; in blk_stack_limits()
559 t->misaligned = 1; in blk_stack_limits()
564 t->logical_block_size = max(t->logical_block_size, in blk_stack_limits()
567 t->physical_block_size = max(t->physical_block_size, in blk_stack_limits()
570 t->io_min = max(t->io_min, b->io_min); in blk_stack_limits()
571 t->io_opt = lcm_not_zero(t->io_opt, b->io_opt); in blk_stack_limits()
575 t->chunk_sectors = gcd(t->chunk_sectors, b->chunk_sectors); in blk_stack_limits()
578 if (t->physical_block_size & (t->logical_block_size - 1)) { in blk_stack_limits()
579 t->physical_block_size = t->logical_block_size; in blk_stack_limits()
580 t->misaligned = 1; in blk_stack_limits()
585 if (t->io_min & (t->physical_block_size - 1)) { in blk_stack_limits()
586 t->io_min = t->physical_block_size; in blk_stack_limits()
587 t->misaligned = 1; in blk_stack_limits()
592 if (t->io_opt & (t->physical_block_size - 1)) { in blk_stack_limits()
593 t->io_opt = 0; in blk_stack_limits()
594 t->misaligned = 1; in blk_stack_limits()
599 if ((t->chunk_sectors << 9) & (t->physical_block_size - 1)) { in blk_stack_limits()
600 t->chunk_sectors = 0; in blk_stack_limits()
601 t->misaligned = 1; in blk_stack_limits()
605 t->raid_partial_stripes_expensive = in blk_stack_limits()
606 max(t->raid_partial_stripes_expensive, in blk_stack_limits()
610 t->alignment_offset = lcm_not_zero(t->alignment_offset, alignment) in blk_stack_limits()
611 % max(t->physical_block_size, t->io_min); in blk_stack_limits()
614 if (t->alignment_offset & (t->logical_block_size - 1)) { in blk_stack_limits()
615 t->misaligned = 1; in blk_stack_limits()
619 t->max_sectors = blk_round_down_sectors(t->max_sectors, t->logical_block_size); in blk_stack_limits()
620 t->max_hw_sectors = blk_round_down_sectors(t->max_hw_sectors, t->logical_block_size); in blk_stack_limits()
621 t->max_dev_sectors = blk_round_down_sectors(t->max_dev_sectors, t->logical_block_size); in blk_stack_limits()
627 if (t->discard_granularity != 0 && in blk_stack_limits()
628 t->discard_alignment != alignment) { in blk_stack_limits()
629 top = t->discard_granularity + t->discard_alignment; in blk_stack_limits()
634 t->discard_misaligned = 1; in blk_stack_limits()
637 t->max_discard_sectors = min_not_zero(t->max_discard_sectors, in blk_stack_limits()
639 t->max_hw_discard_sectors = min_not_zero(t->max_hw_discard_sectors, in blk_stack_limits()
641 t->discard_granularity = max(t->discard_granularity, in blk_stack_limits()
643 t->discard_alignment = lcm_not_zero(t->discard_alignment, alignment) % in blk_stack_limits()
644 t->discard_granularity; in blk_stack_limits()
647 t->zone_write_granularity = max(t->zone_write_granularity, in blk_stack_limits()
649 t->zoned = max(t->zoned, b->zoned); in blk_stack_limits()
667 struct request_queue *t = disk->queue; in disk_stack_limits() local
669 if (blk_stack_limits(&t->limits, &bdev_get_queue(bdev)->limits, in disk_stack_limits()