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

Imre Vadasz ivadasz at crater.dragonflybsd.org
Mon Oct 16 15:11:36 PDT 2017


commit 4846c10471333bbb8549928a19e1928788509360
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/4846c10471333bbb8549928a19e1928788509360


-- 
DragonFly BSD source repository



More information about the Commits mailing list