ZoL trim port used wrong offset for sd unmap
When I ported the ZFS trim code from ZoL, I followed the old style from the original Nexenta trim work to hook in to the sd driver's unmap trim API. It wasn't obvious from the test runs, but that usage was incorrect for the way that the ZoL trim implementation works. This leads to zpool corruption after a trim.
Updated by Jerry Jelinek about 1 year ago
To test this, I ran the zfs-tests with a fixed version of the tests which I already integrated last week. I also did a bunch of manual trim testing on a zpool on an SSD, followed by scrubs, reboots, repeated trim/scrub, etc. I was able to easily reproduce the corrupted zpool on this config without this fix and had no problems with the fix.
I'm still leaving trim disabled by default for now, since we don't have an UNMAP blacklist in the sd driver and we have done only limited testing on a variety of different manufacturers SSDs. Once we have a wider variety of SSD testing, I'll circle back to re-enable trim by default.
Updated by Electric Monk about 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit d0562c105d77a4d4da85007111e260da7ea2616f Author: Jerry Jelinek <firstname.lastname@example.org> Date: 2019-09-30T20:23:52.000Z 11754 ZoL trim port used wrong offset for sd unmap Reviewed by: Igor Kozhukhov <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Kody Kantor <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>