git: DragonFly_RELEASE_5_0 virtio_blk - Fix capacity calculation, when host sets large disk block size.

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Oct 16 15:20:48 PDT 2017


commit 3fc681622f18067747208d82052b8f6ef1ebca8a
Author: Imre Vadász <imre at vdsz.com>
Date:   Tue Oct 17 00:00:32 2017 +0200

    virtio_blk - Fix capacity calculation, when host sets large disk block size.
    
    * The disk capacity in the virtio configuration space is always specified
      in 512 byte sectors, so info.d_media_blksize should be 512.
    
    * Also check for VIRTIO_BLK_F_GEOMETRY feature before reading the disk
      geometry from configuration space.
    
    * Add some device_printf calls to report the disk size and (if available)
      geometry during bootup.

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

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3fc681622f18067747208d82052b8f6ef1ebca8a


-- 
DragonFly BSD source repository


More information about the Commits mailing list