---
name: "blk_queue_max_hw_sectors"
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_queue_max_hw_sectors"
---

# blk\_queue\_max\_hw\_sectors(9)

set max sectors for a request for this queue

## NAME

blk\_queue\_max\_hw\_sectors - set max sectors for a request for this queue

## SYNOPSIS

**void blk\_queue\_max\_hw\_sectors(struct request\_queue \*** *q***, unsigned int** *max\_hw\_sectors***);**

## ARGUMENTS

*q*

the request queue for the device

*max\_hw\_sectors*

max hardware sectors in the usual 512b unit

## DESCRIPTION

Enables a low level driver to set a hard upper limit, max\_hw\_sectors, on the size of requests. max\_hw\_sectors is set by the device driver based upon the capabilities of the I/O controller.

max\_dev\_sectors is a hard limit imposed by the storage device for READ/WRITE requests. It is set by the disk driver.

max\_sectors is a soft limit imposed by the block layer for filesystem type requests. This value can be overridden on a per-device basis in /sys/block/\<device\>/queue/max\_sectors\_kb. The soft limit can not exceed max\_hw\_sectors.

## COPYRIGHT
