git: virtio_blk - Clean up detach code, to work better for multiqueue.

Imre Vadasz ivadasz at crater.dragonflybsd.org
Thu Dec 18 11:18:38 PST 2025


commit 0ee8636c9a690d18f75b84d274d22325123480c9
Author: Imre Vadász <imre at vdsz.com>
Date:   Fri Dec 12 20:49:14 2025 +0100

    virtio_blk - Clean up detach code, to work better for multiqueue.
    
    * Specifically this uses the fact that vtblk_flags is only ever modified in
      vtblk_attach(), vtblk_detach(), vtblk_suspend(), and vtblk_resume(). So
      we don't need to worry about taking all the serializers when setting the
      DETACH flag.
    
    * Additionally the virtqueue_disable_intr() call from vtblk_stop() was
      completely superfluous, since the virtio_teardown_intr() call earlier
      already guarantees that none of the virtqueue interrupt handlers can be
      active anymore.

Summary of changes:
 sys/dev/virtual/virtio/block/virtio_blk.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0ee8636c9a690d18f75b84d274d22325123480c9


-- 
DragonFly BSD source repository


More information about the Commits mailing list