Bug #11754
closedZoL trim port used wrong offset for sd unmap
100%
Description
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.
Related issues
Updated by Jerry Jelinek about 4 years ago
The current ZoL derived implementation of trim already accounts for the VDEV_LABEL_START_SIZE in the regions that are being trimmed.
Updated by Jerry Jelinek about 4 years 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 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit d0562c105d77a4d4da85007111e260da7ea2616f
commit d0562c105d77a4d4da85007111e260da7ea2616f Author: Jerry Jelinek <jerry.jelinek@joyent.com> Date: 2019-09-30T20:23:52.000Z 11754 ZoL trim port used wrong offset for sd unmap Reviewed by: Igor Kozhukhov <igor@dilos.org> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Kody Kantor <kody.kantor@joyent.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
Updated by Marcel Telka almost 4 years ago
- Related to Bug #12051: re-enable ZFS trim by default added
Updated by Marcel Telka almost 4 years ago
- Related to Bug #11714: temporarily disable ZFS TRIM support added