Skip to contentSkip to conversation

block/iscsi: always fill bs->bl.opt_transfer_length

PATCH Applied Benoît Canet 2 participants 2 messages Jan 29, 2014 – Feb 3, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Benoît Canet

author Reviewed-by Benoit Canet
#1 lore raw
Quoted 30 lines · Peter Lieven

the opt_transfer_length has nothing to do with logical block provisioning stuff so always copy it from the block limits VPD page.

---
 block/iscsi.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
block/iscsi.c +2 -3
index 38b07f8..3c0b728 100644
@@ -1331,10 +1331,9 @@ static int iscsi_refresh_limits(BlockDriverState *bs)
         }
         bs->bl.write_zeroes_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran,
                                                         iscsilun);
-
-        bs->bl.opt_transfer_length = sector_lun2qemu(iscsilun->bl.opt_xfer_len,
-                                                     iscsilun);
     }
+    bs->bl.opt_transfer_length = sector_lun2qemu(iscsilun->bl.opt_xfer_len,
+                                                 iscsilun);
     return 0;
 }
 
Signature · 1 line
1.7.9.5
Applied
#2 lore raw

Am 29.01.2014 um 16:36 hat Benoît Canet geschrieben:

Quoted 28 lines · Peter Lieven
Quoted 27 lines

the opt_transfer_length has nothing to do with logical block provisioning stuff so always copy it from the block limits VPD page.

---
 block/iscsi.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
block/iscsi.c +2 -3
index 38b07f8..3c0b728 100644
@@ -1331,10 +1331,9 @@ static int iscsi_refresh_limits(BlockDriverState *bs)
         }
         bs->bl.write_zeroes_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran,
                                                         iscsilun);
-
-        bs->bl.opt_transfer_length = sector_lun2qemu(iscsilun->bl.opt_xfer_len,
-                                                     iscsilun);
     }
+    bs->bl.opt_transfer_length = sector_lun2qemu(iscsilun->bl.opt_xfer_len,
+                                                 iscsilun);
     return 0;
 }
 
Quoted 4 lines
Quoted 3 lines
Signature · 1 line
1.7.9.5

Thanks, applied to the block branch.

Kevin