From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlbSZ-0004ND-RO for qemu-devel@nongnu.org; Fri, 24 Apr 2015 07:07:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlbSW-0005AV-Hm for qemu-devel@nongnu.org; Fri, 24 Apr 2015 07:07:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlbSW-0005AJ-AT for qemu-devel@nongnu.org; Fri, 24 Apr 2015 07:07:48 -0400 Message-ID: <553A23FE.1020603@redhat.com> Date: Fri, 24 Apr 2015 13:07:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1429872804-27321-1-git-send-email-famz@redhat.com> <1429872804-27321-6-git-send-email-famz@redhat.com> In-Reply-To: <1429872804-27321-6-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Fam Zheng , qemu-devel@nongnu.org Cc: kwolf@redhat.com, afaerber@suse.de, stefanha@redhat.com 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