[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 02/54] block/iscsi: dont leave allocmap in an inval
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 02/54] block/iscsi: dont leave allocmap in an invalid state on UNMAP failure |
Date: |
Tue, 6 Feb 2018 13:14:23 -0600 |
From: Peter Lieven <address@hidden>
we forgot to set the allocmap to invalid if an UNMAP call fails.
Cc: address@hidden
Signed-off-by: Peter Lieven <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit aef172ffdc2f9c41d9cc043a55f1259e7c07e587)
Signed-off-by: Michael Roth <address@hidden>
---
block/iscsi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 4683f3b244..c532ec79d1 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -2,7 +2,7 @@
* QEMU Block driver for iSCSI images
*
* Copyright (c) 2010-2011 Ronnie Sahlberg <address@hidden>
- * Copyright (c) 2012-2016 Peter Lieven <address@hidden>
+ * Copyright (c) 2012-2017 Peter Lieven <address@hidden>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
deal
@@ -1128,6 +1128,9 @@ retry:
goto retry;
}
+ iscsi_allocmap_set_invalid(iscsilun, offset >> BDRV_SECTOR_BITS,
+ bytes >> BDRV_SECTOR_BITS);
+
if (iTask.status == SCSI_STATUS_CHECK_CONDITION) {
/* the target might fail with a check condition if it
is not happy with the alignment of the UNMAP request
@@ -1140,9 +1143,6 @@ retry:
goto out_unlock;
}
- iscsi_allocmap_set_invalid(iscsilun, offset >> BDRV_SECTOR_BITS,
- bytes >> BDRV_SECTOR_BITS);
-
out_unlock:
qemu_mutex_unlock(&iscsilun->mutex);
return r;
--
2.11.0
- [Qemu-stable] [PATCH 33/54] usb-storage: Fix share-rw option parsing, (continued)
- [Qemu-stable] [PATCH 33/54] usb-storage: Fix share-rw option parsing, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 31/54] s390x/kvm: provide stfle.81, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 34/54] spapr_pci: fix MSI/MSIX selection, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 32/54] osdep: Retry SETLK upon EINTR, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 25/54] i386: Add EPYC-IBPB CPU model, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 24/54] i386: Add new -IBRS versions of Intel CPU models, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 30/54] s390x/kvm: Handle bpb feature, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 41/54] target/ppc: Clean up probing of VMX, VSX and DFP availability on KVM, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 42/54] spapr: Handle VMX/VSX presence as an spapr capability flag, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 03/54] target/sh4: fix TCG leak during gusa sequence, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 02/54] block/iscsi: dont leave allocmap in an invalid state on UNMAP failure,
Michael Roth <=
- [Qemu-stable] [PATCH 44/54] hw/ppc/spapr_caps: Rework spapr_caps to use uint8 internal representation, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 45/54] ppc: Change Power9 compat table to support at most 8 threads/core, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 43/54] spapr: Handle Decimal Floating Point (DFP) as an optional capability, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 49/54] target/ppc/kvm: Add cap_ppc_safe_[cache/bounds_check/indirect_branch], Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 47/54] target/ppc: introduce the PPC_BIT() macro, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 48/54] target/ppc/spapr_caps: Add macro to generate spapr_caps migration vmstate, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 46/54] spapr: fix device tree properties when using compatibility mode, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 04/54] qemu-options: Remove stray colons from output of --help, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 54/54] target/ppc/spapr: Add H-Call H_GET_CPU_CHARACTERISTICS, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 53/54] target/ppc/spapr_caps: Add new tristate cap safe_indirect_branch, Michael Roth, 2018/02/06