git: Make sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().

Imre Vadasz ivadasz at crater.dragonflybsd.org
Sun Jul 30 11:59:53 PDT 2017


commit c022ffc9484ecf07d8d7c4fb918d84a6154367be
Author: Imre Vadász <imre at vdsz.com>
Date:   Sun Jul 30 16:08:58 2017 +0200

    Make sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().
    
    This meant, that the DEVICE_SHUTDOWN() callback of scsi drivers was running
    before the final SYNCHRONIZE_CACHE scsi command was sent by cam(4). For
    most drivers this was still fine, since usually the DEVICE_SHUTDOWN()
    callback - if it's even implemented - only flushes the command queue.
    
    This change avoids freezing at the end of shutdown which was known to
    happen with the twa(4), and virtio_scsi(4) drivers.
    
    The SHUTDOWN_PRI_SECOND priority is selected, because it's so far unused,
    and inbetween existing handlers in the shutdown_post_sync phase, that are
    at SHUTDOWN_PRI_FIRST and at SHUTDOWN_PRI_DEFAULT.
    
    Tested-by: swildner (on twa(4)), ivadasz (on virtio_scsi(4))

Summary of changes:
 sys/bus/cam/scsi/scsi_da.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c022ffc9484ecf07d8d7c4fb918d84a6154367be


-- 
DragonFly BSD source repository



More information about the Commits mailing list