[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 32/54] osdep: Retry SETLK upon EINTR
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 32/54] osdep: Retry SETLK upon EINTR |
Date: |
Tue, 6 Feb 2018 13:14:53 -0600 |
From: Fam Zheng <address@hidden>
We could hit lock failure if there is a signal that makes fcntl return
-1 and errno set to EINTR. In this case we should retry.
Cc: address@hidden
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
(cherry picked from commit f86428a1f4f91a460ed585682af70d3e8c31dc06)
Signed-off-by: Michael Roth <address@hidden>
---
util/osdep.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/osdep.c b/util/osdep.c
index 1231f9f876..a73de0e1ba 100644
--- a/util/osdep.c
+++ b/util/osdep.c
@@ -244,7 +244,9 @@ static int qemu_lock_fcntl(int fd, int64_t start, int64_t
len, int fl_type)
.l_type = fl_type,
};
qemu_probe_lock_ops();
- ret = fcntl(fd, fcntl_op_setlk, &fl);
+ do {
+ ret = fcntl(fd, fcntl_op_setlk, &fl);
+ } while (ret == -1 && errno == EINTR);
return ret == -1 ? -errno : 0;
}
--
2.11.0
- [Qemu-devel] [PATCH 31/54] s390x/kvm: provide stfle.81, (continued)
- [Qemu-devel] [PATCH 31/54] s390x/kvm: provide stfle.81, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 40/54] spapr: Validate capabilities on migration, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 43/54] spapr: Handle Decimal Floating Point (DFP) as an optional capability, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 37/54] spapr: Add pseries-2.12 machine type, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 02/54] block/iscsi: dont leave allocmap in an invalid state on UNMAP failure, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 34/54] spapr_pci: fix MSI/MSIX selection, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 41/54] target/ppc: Clean up probing of VMX, VSX and DFP availability on KVM, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 42/54] spapr: Handle VMX/VSX presence as an spapr capability flag, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 45/54] ppc: Change Power9 compat table to support at most 8 threads/core, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 36/54] spapr: don't initialize PATB entry if max-cpu-compat < power9, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 32/54] osdep: Retry SETLK upon EINTR,
Michael Roth <=
- [Qemu-devel] [PATCH 47/54] target/ppc: introduce the PPC_BIT() macro, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 03/54] target/sh4: fix TCG leak during gusa sequence, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 50/54] target/ppc/spapr_caps: Add support for tristate spapr_capabilities, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 54/54] target/ppc/spapr: Add H-Call H_GET_CPU_CHARACTERISTICS, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 51/54] target/ppc/spapr_caps: Add new tristate cap safe_cache, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 52/54] target/ppc/spapr_caps: Add new tristate cap safe_bounds_check, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 07/54] block: Make bdrv_drain_invoke() recursive, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 39/54] spapr: Treat Hardware Transactional Memory (HTM) as an optional capability, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 44/54] hw/ppc/spapr_caps: Rework spapr_caps to use uint8 internal representation, Michael Roth, 2018/02/06
- [Qemu-devel] [PATCH 46/54] spapr: fix device tree properties when using compatibility mode, Michael Roth, 2018/02/06