From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyKu1-000637-PN for qemu-devel@nongnu.org; Mon, 16 Nov 2015 09:37:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyKtx-0003eh-Lh for qemu-devel@nongnu.org; Mon, 16 Nov 2015 09:37:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:58460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyKtx-0003eW-G3 for qemu-devel@nongnu.org; Mon, 16 Nov 2015 09:37:01 -0500 From: Hannes Reinecke Date: Mon, 16 Nov 2015 15:36:55 +0100 Message-Id: <1447684618-17794-1-git-send-email-hare@suse.de> Subject: [Qemu-devel] [PATCH 0/3] SCSI ALUA support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Johannes Thumshirn , qemu-devel@nongnu.org, Alexander Graf , Hannes Reinecke Hi all, here's a patchset to implement ALUA support for SCSI disks. With it we can easily simulate a multipath setup: -drive ,if=none,id=disk1 \ -device scsi-disk,wwn=,port_group=1,port_index=1,alua_state=0 -drive ,if=none,id=disk2 \ -device scsi-disk,wwn=,port_group=2,port_index=1,alua_state=2 What's a bit annoying is that one has to reference the underlying block device _twice_, which means one has to stick with the 'raw' format as anything more elaborate will cause data corruption on the guest if both paths are active. Also the 'wwn' property is _actually_ a property of the underlying block device, not the scsi disk. This patchset implements 'implicit' ALUA mode only for the moment; full explicit ALUA support involves quite a bit of logic in the qemu backend. As usual, comments and reviews are welcome. Hannes Reinecke (3): scsi-disk: Add 'port_group' property scsi-disk: Add 'alua_state' property scsi-disk: Implement 'REPORT TARGET PORT GROUPS' hw/scsi/scsi-bus.c | 15 ++++ hw/scsi/scsi-disk.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++ include/block/scsi.h | 13 +++ include/hw/scsi/scsi.h | 6 ++ 4 files changed, 274 insertions(+) -- 1.8.4.5