Re: [PATCH v4 2/2] libata-scsi: avoid repeated calculation of number of TRIM ranges

2016-07-06 Thread Tom Yan
I decided not to define a macro (e.g. ATA_MAX_TRIM_RSIZE) for all the 0x / 65535 in the various functions in libata-scsi.c / ata.h. Let me know if you think I should. On 7 July 2016 at 00:55, wrote: > From: Tom Yan > > Currently libata statically allows only 1-block (512-byte) payload > for

[PATCH v4 2/2] libata-scsi: avoid repeated calculation of number of TRIM ranges

2016-07-06 Thread tom . ty89
From: Tom Yan Currently libata statically allows only 1-block (512-byte) payload for each TRIM command. Each payload can carry 64 TRIM ranges since each range requires 8 bytes. It is silly to keep doing the calculation (512 / 8) in different places. Hence, define the new ATA_MAX_TRIM_RNUM for th