Project

General

Profile

Bug #11754

ZoL trim port used wrong offset for sd unmap

Added by Jerry Jelinek about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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

Related to illumos gate - Bug #12051: re-enable ZFS trim by defaultClosed

Actions
Related to illumos gate - Bug #11714: temporarily disable ZFS TRIM supportClosed

Actions

History

#1

Updated by Jerry Jelinek about 1 year ago

The current ZoL derived implementation of trim already accounts for the VDEV_LABEL_START_SIZE in the regions that are being trimmed.

#2

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.

#3

Updated by Electric Monk about 1 year 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>

#4

Updated by Marcel Telka 8 months ago

  • Related to Bug #12051: re-enable ZFS trim by default added
#5

Updated by Marcel Telka 8 months ago

  • Related to Bug #11714: temporarily disable ZFS TRIM support added

Also available in: Atom PDF