commit | 2983860c766870b701c4a34f435c1e18db086244 | [log] [tgz] |
---|---|---|
author | Tom Yan <tom.ty89@gmail.com> | Wed Jul 13 04:31:23 2016 +0800 |
committer | Tejun Heo <tj@kernel.org> | Tue Jul 12 16:37:17 2016 -0400 |
tree | c9c084dc70f54fd860baead437e37f3e1ae9844b | |
parent | 5c79097a28c2525740dd9e4470676ec9d25bee45 [diff] |
libata-scsi: avoid repeated calculation of number of TRIM ranges 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 the result. Signed-off-by: Tom Yan <tom.ty89@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>