DF-5554 / run.log
DF5554: cam_calc_geometry truncation harness (production DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026
root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC
)
DF5554[sane-8TB-disk]
DF5554[sane-8TB-disk] in : vol=15628000000 bs=512 ext=1
DF5554[sane-8TB-disk] ker: H=255 S=63 C=972798 status=0x01
DF5554[sane-8TB-disk] tru: H=255 S=63 C=972798 (true size_mb=7630859)
DF5554[sane-8TB-disk] ok (matches 64-bit math)
DF5554[2^43 sectors (4PiB@512B): size_mb wraps to 0]
DF5554[2^43 sectors (4PiB@512B): size_mb wraps to 0] in : vol=8796093022208 bs=512 ext=1
DF5554[2^43 sectors (4PiB@512B): size_mb wraps to 0] ker: H=64 S=32 C=0 status=0x01
DF5554[2^43 sectors (4PiB@512B): size_mb wraps to 0] tru: H=255 S=63 C=547531467 (true size_mb=4294967296)
DF5554[2^43 sectors (4PiB@512B): size_mb wraps to 0] <<< MISMATCH: u64->u32 truncation in cam_calc_geometry (cam.c:389/cam.c:398)
DF5554[2^32*16065: cylinders wraps exactly to 0]
DF5554[2^32*16065: cylinders wraps exactly to 0] in : vol=68998649610240 bs=512 ext=1
DF5554[2^32*16065: cylinders wraps exactly to 0] ker: H=255 S=63 C=0 status=0x01
DF5554[2^32*16065: cylinders wraps exactly to 0] tru: H=255 S=63 C=4294967296 (true size_mb=33690746880)
DF5554[2^32*16065: cylinders wraps exactly to 0] <<< MISMATCH: u64->u32 truncation in cam_calc_geometry (cam.c:389/cam.c:398)
DF5554[2^32*16065+16064: cylinders wraps to 0]
DF5554[2^32*16065+16064: cylinders wraps to 0] in : vol=68998649626304 bs=512 ext=1
DF5554[2^32*16065+16064: cylinders wraps to 0] ker: H=255 S=63 C=0 status=0x01
DF5554[2^32*16065+16064: cylinders wraps to 0] tru: H=255 S=63 C=4294967296 (true size_mb=33690746887)
DF5554[2^32*16065+16064: cylinders wraps to 0] <<< MISMATCH: u64->u32 truncation in cam_calc_geometry (cam.c:389/cam.c:398)
DF5554[max-u64 (crafted READ CAPACITY(16))]
DF5554[max-u64 (crafted READ CAPACITY(16))] in : vol=18446744073709551615 bs=512 ext=1
DF5554[max-u64 (crafted READ CAPACITY(16))] ker: H=255 S=63 C=1500097198 status=0x01
DF5554[max-u64 (crafted READ CAPACITY(16))] tru: H=255 S=63 C=1148256711715502 (true size_mb=9007199254740991)
DF5554[max-u64 (crafted READ CAPACITY(16))] <<< MISMATCH: u64->u32 truncation in cam_calc_geometry (cam.c:389/cam.c:398)
DF5554[zero-volume]
DF5554[zero-volume] in : vol=0 bs=512 ext=1
DF5554[zero-volume] ker: H=64 S=32 C=0 status=0x01
DF5554[zero-volume] tru: H=64 S=32 C=0 (true size_mb=0)
DF5554[zero-volume] ok (matches 64-bit math)
DF5554[block_size=0 (div-guard check)]
DF5554[block_size=0 (div-guard check)] in : vol=1000000 bs=0 ext=1
DF5554[block_size=0 (div-guard check)] ker: H=0 S=0 C=0 status=0x04
DF5554[block_size=0 (div-guard check)] tru: H=64 S=32 C=488 (true size_mb=0)
DF5554[block_size=0 (div-guard check)] rejected by guard (status != CMP)
DF5554: done
--- live CAM context on the same guest (stock boot, before harness):
CAM: finished configuring all busses
cd0 at ata1 bus 0 target 0 lun 0
cd0: <QEMU QEMU DVD-ROM 2.5+> Removable CD-ROM SCSI-0 device
vtblk0: 30720MB (62914560 512 byte sectors: 16H 63S/T 16383C)
(atapi-cam, the transport serving cd0 above, handles XPT_CALC_GEOMETRY
via the same cam_calc_geometry() -- sys/dev/disk/nata/atapi-cam.c:470)