Skip to contentSkip to conversation

iscsi: ignore flushes on scsi-generic devices

PATCH In review Paolo Bonzini 2 participants 2 messages Apr 2, 2014 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iscsi: ignore flushes on scsi-generic devices

Non-block SCSI devices do not support flushing, but we may still send them requests via bdrv_flush_all. Just ignore them.

---
 block/iscsi.c | 4 ++++
 1 file changed, 4 insertions(+)
block/iscsi.c +4 -0
index 0d15b4d..00316af 100644
@@ -417,6 +417,10 @@ static int coroutine_fn iscsi_co_flush(BlockDriverState *bs)
     IscsiLun *iscsilun = bs->opaque;
     struct IscsiTask iTask;
 
+    if (bs->sg) {
+        return 0;
+    }
+
     iscsi_co_init_iscsitask(iscsilun, &iTask);
 
 retry:
Signature · 1 line
1.9.0
Reviewed-by on v1 1/1
#1 lore raw

Am 02.04.2014 15:05, schrieb Paolo Bonzini:

Quoted 13 lines

Non-block SCSI devices do not support flushing, but we may still send them requests via bdrv_flush_all. Just ignore them.

---
 block/iscsi.c | 4 ++++
 1 file changed, 4 insertions(+)
block/iscsi.c +0 -0
index 0d15b4d..00316af 100644

block/iscsi.c static int coroutine_fn iscsi_co_flush(BlockDriverState *bs) · line 426

Quoted 10 lines
block/iscsi.c +4 -0
@@ -417,6 +417,10 @@ static int coroutine_fn iscsi_co_flush(BlockDriverState *bs)
     IscsiLun *iscsilun = bs->opaque;
     struct IscsiTask iTask;
 
+    if (bs->sg) {
+        return 0;
+    }
+
     iscsi_co_init_iscsitask(iscsilun, &iTask);
 
 retry: