git: kernel - Fix TRIM bugs in UFS

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jan 1 17:55:43 PST 2017


commit 53005b098da18ed02da4c57627c0c2a29a957f37
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jan 1 17:52:23 2017 -0800

    kernel - Fix TRIM bugs in UFS
    
    * Fix serious bug in devfs's implementation of VOP_FREEBLKS.  devfs was
      running this operation asynchronously, but callers (aka UFS) expect it
      to run synchronously.
    
    * Fix minor bug in CAM related to TRIM failures.
    
    * Enforce block count limitations in NVMe for WRITEZ.
    
    * Mostly applicable to NVMe, which will implement FREEBLKS using the WRITEZ
      command (at least for now).  Trim is disabled on SATA SSDs by default in
      the driver.
    
      Fixes UEFI booting issues with NVMe when using a UFS /boot.  Writing or
      updating the UFS /boot mounted via NVMe resulted in a corrupt partition due
      to the asynchronous VOP_FREEBLKS that we fixed above.
    
    Reported-by: mneumann.

Summary of changes:
 sys/bus/cam/scsi/scsi_da.c    | 1 +
 sys/dev/disk/nvme/nvme_disk.c | 4 ++++
 sys/vfs/devfs/devfs_vnops.c   | 8 ++++++--
 3 files changed, 11 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/53005b098da18ed02da4c57627c0c2a29a957f37


-- 
DragonFly BSD source repository



More information about the Commits mailing list