HomeFreeBSD

xen/blkfront: use the correct type for disk sectors

Description

xen/blkfront: use the correct type for disk sectors

The correct type to use to represent disk sectors is blkif_sector_t
(which is an uint64_t underneath). This avoid truncation of the disk
size calculation when resizing on i386, as otherwise the calculation
of d_mediasize in xbd_connect is truncated to the size of unsigned
long, which is 32bits on i386.

Note this issue didn't affect amd64, because the size of unsigned long
is 64bits there.

Sponsored by: Citrix Systems R&D
MFC after: 1 week

Details

Provenance
roygerAuthored on
Parents
rS361578: xenpv: do not use low 1MB for Xen mappings on i386
Branches
Unknown
Tags
Unknown