---
name: "ata_scsi_set_capacity"
section: "9"
platform: "linux"
package: "linux-manual-2.6.32"
version: "2.6.32-48squeeze6"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/ata_scsi_set_capacity"
---

# ata\_scsi\_set\_capacity(9)

adjust device capacity

## NAME

ata\_scsi\_set\_capacity - adjust device capacity

## SYNOPSIS

**sector\_t ata\_scsi\_set\_capacity(struct scsi\_device \*** *sdev***, sector\_t** *new\_capacity***);**

## ARGUMENTS

*sdev*

SCSI device to adjust device capacity for

*new\_capacity*

new target capacity

## DESCRIPTION

This function is called if a partition on *sdev* extends beyond the end of the device. It requests EH to unlock HPA and returns the possibly adjusted capacity.

## LOCKING

Defined by the SCSI layer. Might sleep.

## RETURNS

New capacity if adjusted successfully. 0 if device is not found.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
