Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/lib/libperfuse Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/93721516ce97
branches: netbsd-6
changeset: 776782:93721516ce97
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sun Nov 09 07:53:39 2014 +0000
description:
Pull up following revision(s) (requested by manu in ticket #1185):
lib/libperfuse/ops.c: revision 1.79
Avoid deadlocks on write errors
On write errors, we failed to dequeue some operations, leading to
rare but unpleasant deadlocks
diffstat:
lib/libperfuse/ops.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diffs (51 lines):
diff -r 47cea4f0bb96 -r 93721516ce97 lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c Sun Nov 09 07:50:12 2014 +0000
+++ b/lib/libperfuse/ops.c Sun Nov 09 07:53:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ops.c,v 1.50.2.16 2014/11/09 07:02:57 msaitoh Exp $ */
+/* $NetBSD: ops.c,v 1.50.2.17 2014/11/09 07:53:39 msaitoh Exp $ */
/*-
* Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -3289,6 +3289,7 @@
if (*resid != 0)
error = EFBIG;
+out:
#ifdef PERFUSE_DEBUG
if (perfuse_diagflags & PDF_RESIZE) {
if (offset > (off_t)vap->va_size)
@@ -3305,16 +3306,6 @@
if (offset > (off_t)vap->va_size)
vap->va_size = offset;
- if (inresize) {
-#ifdef PERFUSE_DEBUG
- if (!(pnd->pnd_flags & PND_INRESIZE))
- DERRX(EX_SOFTWARE, "file write grow without resize");
-#endif
- pnd->pnd_flags &= ~PND_INRESIZE;
- (void)dequeue_requests(opc, PCQ_RESIZE, DEQUEUE_ALL);
- }
-
-
/*
* Statistics
*/
@@ -3334,7 +3325,15 @@
__func__, (void*)opc, perfuse_node_path(ps, opc));
#endif
-out:
+ if (inresize) {
+#ifdef PERFUSE_DEBUG
+ if (!(pnd->pnd_flags & PND_INRESIZE))
+ DERRX(EX_SOFTWARE, "file write grow without resize");
+#endif
+ pnd->pnd_flags &= ~PND_INRESIZE;
+ (void)dequeue_requests(opc, PCQ_RESIZE, DEQUEUE_ALL);
+ }
+
/*
* VOP_PUTPAGE causes FAF write where kernel does not
* check operation result. At least warn if it failed.
Home |
Main Index |
Thread Index |
Old Index