tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ATA TRIM?



On Fri, 9 Dec 2022, RVP wrote:

OK, so any requests >4K will have to be packaged into further range
requests [...]


This isn't right. Bytes 7 & 8 of a TRIM range request form a counter. So,
a counter of 1 = (1 x max_dsm_blocks); 2 = (2 x max_dsm_blocks) up to
0xFFFF counts. And you can have 64 range requests (contiguous or disjoint)
in a 512 byte DSM payload.

But these are the maximum possible limits; and I don't how many `counts'
would be valid in a synchronous request like yours. Start with a `count'
of 1 after you set the LBA48 flag.

-RVP



Home | Main Index | Thread Index | Old Index