diff options
author | Peter Lieven <pl@kamp.de> | 2015-04-16 16:08:28 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-04-28 15:36:10 +0200 |
commit | 752ce45150d3d70aabc4eb46a7a9cdfd8b4640fd (patch) | |
tree | a022ffd86b43e7c2fc3b20662c1f1ea650468e2b /block/iscsi.c | |
parent | 7191f2080c70228c6483b6604cc1c18943d8d766 (diff) |
block/iscsi: store DPOFUA bit from the modesense command
Signed-off-by: Peter Lieven <pl@kamp.de>
Message-id: 1429193313-4263-5-git-send-email-pl@kamp.de
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r-- | block/iscsi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index 221c9fc4ef..237faa1f05 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) { |