diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-09-20 07:45:22 -0600 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-09-20 10:03:12 -0600 |
commit | fb05b94a37411cdc9e6c5cc10b833e410fbf7b79 (patch) | |
tree | ca6a9c67761f12398eea98d88744732432f079d3 | |
parent | 5a382e8f92046a6ae65b810db1194fd91b59edc2 (diff) | |
download | illumos-joyent-fb05b94a37411cdc9e6c5cc10b833e410fbf7b79.tar.gz |
11714 temporarily disable ZFS TRIM support
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Kody Kantor <kody.kantor@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_disk.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_disk.c b/usr/src/uts/common/fs/zfs/vdev_disk.c index a27ff08c03..b4fa9e9e17 100644 --- a/usr/src/uts/common/fs/zfs/vdev_disk.c +++ b/usr/src/uts/common/fs/zfs/vdev_disk.c @@ -39,6 +39,11 @@ #include <sys/fm/fs/zfs.h> /* + * Tunable to enable TRIM, which is temporarily disabled by default. + */ +uint_t zfs_no_trim = 1; + +/* * Tunable parameter for debugging or performance analysis. Setting this * will cause pool corruption on power loss if a volatile out-of-order * write cache is enabled. @@ -707,6 +712,9 @@ skip_open: vd->vdev_has_trim = B_FALSE; } + if (zfs_no_trim == 1) + vd->vdev_has_trim = B_FALSE; + /* Currently only supported for ZoL. */ vd->vdev_has_securetrim = B_FALSE; @@ -936,7 +944,7 @@ vdev_disk_io_start(zio_t *zio) return; case ZIO_TYPE_TRIM: - if (!vd->vdev_has_trim) { + if (zfs_no_trim == 1 || !vd->vdev_has_trim) { zio->io_error = SET_ERROR(ENOTSUP); zio_execute(zio); return; |