From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YikW7-0003if-IA for qemu-devel@nongnu.org; Thu, 16 Apr 2015 10:11:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YikVz-0006d6-Ua for qemu-devel@nongnu.org; Thu, 16 Apr 2015 10:11:43 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:45292 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YikVz-0006cD-G5 for qemu-devel@nongnu.org; Thu, 16 Apr 2015 10:11:35 -0400 From: Peter Lieven Date: Thu, 16 Apr 2015 16:08:28 +0200 Message-Id: <1429193313-4263-5-git-send-email-pl@kamp.de> In-Reply-To: <1429193313-4263-1-git-send-email-pl@kamp.de> References: <1429193313-4263-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCH for-2.4 V2 4/9] block/iscsi: store DPOFUA bit from the modesense command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Peter Lieven , ronniesahlberg@gmail.com, qemu-block@nongnu.org Signed-off-by: Peter Lieven --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 221c9fc..237faa1 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -66,6 +66,7 @@ typedef struct IscsiLun { bool write_protected; bool lbpme; bool lbprz; + bool dpofua; bool has_write_same; } IscsiLun; @@ -1258,6 +1259,7 @@ static void iscsi_modesense_sync(IscsiLun *iscsilun) struct scsi_task *task; struct scsi_mode_sense *ms = NULL; iscsilun->write_protected = false; + iscsilun->dpofua = false; task = iscsi_modesense6_sync(iscsilun->iscsi, iscsilun->lun, 1, SCSI_MODESENSE_PC_CURRENT, @@ -1279,6 +1281,7 @@ static void iscsi_modesense_sync(IscsiLun *iscsilun) goto out; } iscsilun->write_protected = ms->device_specific_parameter & 0x80; + iscsilun->dpofua = ms->device_specific_parameter & 0x10; out: if (task) { -- 1.9.1