Re: [PATCH v2 1/2] libata-scsi: improve TRIM translation

2016-07-05 Thread Tejun Heo
On Wed, Jul 06, 2016 at 03:10:51AM +0800, Tom Yan wrote: > Well it is exactly what the patch does. We no longer do the "divide it > by 8" thing each time we want to know the now defined TRIM_RANGE_NUM. > > ata_set_lba_range_entries() has only been used by > ata_scsi_write_same_xlat() > (http://lxr

Re: [PATCH v2 1/2] libata-scsi: improve TRIM translation

2016-07-05 Thread Tom Yan
Well it is exactly what the patch does. We no longer do the "divide it by 8" thing each time we want to know the now defined TRIM_RANGE_NUM. ata_set_lba_range_entries() has only been used by ata_scsi_write_same_xlat() (http://lxr.free-electrons.com/ident?i=ata_set_lba_range_entries, although the c

Re: [PATCH v2 1/2] libata-scsi: improve TRIM translation

2016-07-05 Thread Sergei Shtylyov
Hello. On 7/5/2016 9:45 AM, tom.t...@gmail.com wrote: From: Tom Yan Define TRIM_RANGE_SIZE and TRIM_RANGE_NUM so that the corresponding functions can be more generalized. Also, conform to SBC by rejecting WRITE SAME (16) commands with number of blocks that exceeds the limit that is defined in

[PATCH v2 1/2] libata-scsi: improve TRIM translation

2016-07-04 Thread tom . ty89
From: Tom Yan Define TRIM_RANGE_SIZE and TRIM_RANGE_NUM so that the corresponding functions can be more generalized. Also, conform to SBC by rejecting WRITE SAME (16) commands with number of blocks that exceeds the limit that is defined in the SATL. Signed-off-by: Tom Yan diff --git a/drivers/