---
name: "ata_format_dsm_trim_descr"
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/ata_format_dsm_trim_descr"
---

# ata\_format\_dsm\_trim\_descr(9)

SATL Write Same to DSM Trim

## NAME

ata\_format\_dsm\_trim\_descr - SATL Write Same to DSM Trim

## SYNOPSIS

**size\_t ata\_format\_dsm\_trim\_descr(struct scsi\_cmnd \*** *cmd***, u32** *trmax***, u64** *sector***, u32** *count***);**

## ARGUMENTS

*cmd*

SCSI command being translated

*trmax*

Maximum number of entries that will fit in sector\_size bytes.

*sector*

Starting sector

*count*

Total Range of request in logical sectors

## DESCRIPTION

Rewrite the WRITE SAME descriptor to be a DSM TRIM little-endian formatted descriptor.

Upto 64 entries of the format: 63:48 Range Length 47:0 LBA

Range Length of 0 is ignored. LBA's should be sorted order and not overlap.

## NOTE

this is the same format as ADD LBA(S) TO NV CACHE PINNED SET

## RETURN

Number of bytes copied into sglist.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
