---
name: "blk_stack_limits"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/blk_stack_limits"
---

# blk\_stack\_limits(9)

adjust queue\_limits for stacked devices

## NAME

blk\_stack\_limits - adjust queue\_limits for stacked devices

## SYNOPSIS

**int blk\_stack\_limits(struct queue\_limits \*** *t***, struct queue\_limits \*** *b***, sector\_t** *start***);**

## ARGUMENTS

*t*

the stacking driver limits (top device)

*b*

the underlying queue limits (bottom, component device)

*start*

first data sector within component device

## DESCRIPTION

This function is used by stacking drivers like MD and DM to ensure that all component devices have compatible block sizes and alignments. The stacking driver must provide a queue\_limits struct (top) and then iteratively call the stacking function for all component (bottom) devices. The stacking function will attempt to combine the values and ensure proper alignment.

Returns 0 if the top and bottom queue\_limits are compatible. The top device's block sizes and alignment offsets may be adjusted to ensure alignment with the bottom device. If no compatible sizes and alignments exist, -1 is returned and the resulting top queue\_limits will have the misaligned flag set to indicate that the alignment\_offset is undefined.

## COPYRIGHT
