Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2983860c authored by Tom Yan's avatar Tom Yan Committed by Tejun Heo
Browse files

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: default avatarTom Yan <tom.ty89@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 5c79097a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment