From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlbhW-0002i0-Vd for qemu-devel@nongnu.org; Fri, 24 Apr 2015 07:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlbhU-0001xJ-9o for qemu-devel@nongnu.org; Fri, 24 Apr 2015 07:23:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlbhU-0001x9-4l for qemu-devel@nongnu.org; Fri, 24 Apr 2015 07:23:16 -0400 Date: Fri, 24 Apr 2015 19:23:13 +0800 From: Fam Zheng Message-ID: <20150424112313.GC16050@ad.nay.redhat.com> References: <1429872804-27321-1-git-send-email-famz@redhat.com> <1429872804-27321-6-git-send-email-famz@redhat.com> <553A23FE.1020603@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <553A23FE.1020603@redhat.com> Subject: Re: [Qemu-devel] [PATCH 5/5] tests: virtio-scsi: Add test for unaligned WRITE SAME List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, afaerber@suse.de 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 >