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: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH 5/5] tests: virtio-scsi: Add test for unaligned WRITE SAME
Date: Fri, 24 Apr 2015 19:23:13 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, 04/24 13:07, Paolo Bonzini wrote:
> 
> 
> 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.

You're right!

Fam

> 
> Otherwise looks good.
> 
> Thanks for writing the tests!
> 
> Paolo
> 



reply via email to

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