qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/5] tests: virtio-scsi: Add test for unaligned


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 5/5] tests: virtio-scsi: Add test for unaligned WRITE SAME
Date: Fri, 24 Apr 2015 13:07:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 24/04/2015 12:53, Fam Zheng wrote:
> +    const uint8_t write_same_cdb[] = { 0x41, 0x00, 0x00, 0x00,
> +                                       0x00, 0x01, 0x02 };

The array size should be CDB_SIZE and there's 3 missing bytes in the
10-byte WRITE SAME CDB.

byte 0: WRITE SAME opcode
byte 1: all zeros, ok
byte 2...5: LBA = 1, ok
byte 6: GROUP NUMBER = 2?

Did you mean 0x00, 0x00, 0x02, 0x00?

It probably works because scsi-disk ignores bytes 6 and 9, and bytes 7-8
are some nonzero value from the stack, but it would break when changing
the array size to CDB_SIZE.

Otherwise looks good.

Thanks for writing the tests!

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]