Project

General

Profile

Bug #11608

add DKIOC ioctl to report drive UNMAP support

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

We added SCSI UNMAP support with bug 1700, but there is currently no way for upstack code to detect if a drive supports UNMAP. Having this capability would be useful for the ZoL port of the ZFS TRIM code (bug 6363). I'm going to implement a new DKIOC ioctl which would report the SD_THIN_PROV_ENABLED status from un_thin_flags.

History

#1

Updated by Jerry Jelinek about 1 year ago

To test this, I ran a simple program which issues the ioctl and reports the results. I ran it against a regular disk (which reports no trim support) and an SSD (which reports trim support).

#2

Updated by Electric Monk about 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit efe44a0312f417787c2d6992582ad06b1b98cd8d

commit  efe44a0312f417787c2d6992582ad06b1b98cd8d
Author: Jerry Jelinek <jerry.jelinek@joyent.com>
Date:   2019-08-27T13:58:24.000Z

    11608 add DKIOC ioctl to report drive UNMAP support
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Kody Kantor <kody.kantor@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF