git: virtio - Fix a few porting issues and bugs

Matthew Dillon dillon at
Fri May 27 17:17:08 PDT 2016

commit eb55c32fd8cfd23a65c04877c6f15ef0c3f7ed6e
Author: Matthew Dillon <dillon at>
Date:   Fri May 27 17:14:24 2016 -0700

    virtio - Fix a few porting issues and bugs
    * vtblk_maximum_segments() was really buggy.  It was
      adding the base min segments to blkcfg->seg_max,
      miscalculating values for the case where the F_SEG_MAX
      feature is not in the feature list.
      This could result in virtio imploding on a too-small
    * Fix situations where M_NOWAIT is improperly used.
    * At least use 16-byte alignment for contigmalloc()'s.

Summary of changes:
 sys/dev/virtual/virtio/block/virtio_blk.c | 27 ++++++++++++++++++++-------
 sys/dev/virtual/virtio/virtio/virtio.c    |  2 +-
 sys/dev/virtual/virtio/virtio/virtqueue.c |  8 ++++----
 3 files changed, 25 insertions(+), 12 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list