Re: [Qemu-devel] [PATCH 4/4] scsi-disk: fix the block descriptor returned by the MODE SENSE command

2010-08-27 Thread Bernhard Kohl
Am 16.08.2010 19:34, schrieb ext Kevin Wolf: The patch itself looks okay. However, it made me wonder what this line wants to tell us: if ((~dbd) nb_sectors) { Is it just me or doesn't this make any sense at all? dbd is a single bit, 0x8 if set or 0x0 otherwise. nb_sectors is the number

Re: [Qemu-devel] [PATCH 4/4] scsi-disk: fix the block descriptor returned by the MODE SENSE command

2010-08-16 Thread Kevin Wolf
Am 02.08.2010 17:31, schrieb Bernhard Kohl: The block descriptor contains the number of blocks, not the highest LBA. Real hard disks return 0 if the number of blocks exceed the maximum 0xFF. SCSI-Spec: http://ldkelley.com/SCSI2/SCSI2/SCSI2-08.html#8.3.3 The number of blocks field

[Qemu-devel] [PATCH 4/4] scsi-disk: fix the block descriptor returned by the MODE SENSE command

2010-08-02 Thread Bernhard Kohl
The block descriptor contains the number of blocks, not the highest LBA. Real hard disks return 0 if the number of blocks exceed the maximum 0xFF. SCSI-Spec: http://ldkelley.com/SCSI2/SCSI2/SCSI2-08.html#8.3.3 The number of blocks field specifies the number of logical blocks on the medium to