virtual scsi device with 4k sectors

I just tested my xen drivers with an underlying device with 4kb sectors, and it isn’t working. I could just fake 512 byte sectors to Windows but it would be better if Windows knew the underlying data format.

I’m returning 4K sector size in the MODE_PARAMETER_BLOCK and MODE_SENSE (MODE_PAGE_FORMAT_DEVICE) emulated scsi requests, but obviously that isn’t enough for Windows. How does windows request the sector size from a scsi device?

Another point is that I just took a lvm (think VHD) volume from media with an underlying data format with a 512 byte sectors and dumped it onto an lvm with a 4K sector… is Windows going to cope with that?

James

What flavor of Windows guest you’ve been testing?

>

What flavor of Windows guest you’ve been testing?

Windows 2008 R2. It turns out I jumped the gun on this one though. My drivers appear fine except for an assert that made an incorrect assumption. Xen appears to have a bug where it does a bounds check on the sector in an io request but checks the 512 byte offset so any access beyond 1/8th of the disk fails.

The main problem is that the virtual bios bootstrap code assumes a 512 byte sector so all bets are off.

James