nvme_disk: Use the correct length value in the total-trimmed calculation.

We want to return the total trimmed size in bytes, not blocks.
Fixes incorrect trim size reporting under NVMe devices.
This commit is contained in:
Augustin Cavalier 2023-02-15 15:30:24 -05:00
parent 1831c1c60d
commit 1572bf59b7

View File

@ -923,7 +923,7 @@ nvme_disk_trim(nvme_disk_driver_info* info, fs_trim_data* trimData)
dsmRanges[i].length = length / info->block_size;
dsmRanges[i].starting_lba = offset / info->block_size;
trimmingSize += dsmRanges[i].length;
trimmingSize += length;
}
status_t status = EINPROGRESS;