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/c992003ea1ff
branches: netbsd-6
changeset: 776769:c992003ea1ff
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Nov 04 01:52:53 2014 +0000
description:
Pull up following revision(s) (requested by manu in ticket #1151):
lib/libperfuse/ops.c: revision 1.74
Avoid a file resize serialization deadlock when writing with
PUFFS_IO_APPEND flag. The symptom was a hang when appending to
a file with a null size.
diffstat:
lib/libperfuse/ops.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diffs (43 lines):
diff -r 7f9b59d0c2f0 -r c992003ea1ff lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c Tue Nov 04 01:50:42 2014 +0000
+++ b/lib/libperfuse/ops.c Tue Nov 04 01:52:53 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ops.c,v 1.50.2.12 2014/11/04 01:50:42 msaitoh Exp $ */
+/* $NetBSD: ops.c,v 1.50.2.13 2014/11/04 01:52:53 msaitoh Exp $ */
/*-
* Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -3188,16 +3188,6 @@
requeue_request(pu, opc, PCQ_WRITE);
pnd->pnd_flags |= PND_INWRITE;
- /*
- * Serialize size access, see comment in perfuse_node_setattr().
- */
- if ((u_quad_t)offset + *resid > vap->va_size) {
- while (pnd->pnd_flags & PND_INRESIZE)
- requeue_request(pu, opc, PCQ_RESIZE);
- pnd->pnd_flags |= PND_INRESIZE;
- inresize = 1;
- }
-
/*
* append flag: re-read the file size so that
* we get the latest value.
@@ -3209,6 +3199,16 @@
offset = vap->va_size;
}
+ /*
+ * Serialize size access, see comment in perfuse_node_setattr().
+ */
+ if ((u_quad_t)offset + *resid > vap->va_size) {
+ while (pnd->pnd_flags & PND_INRESIZE)
+ requeue_request(pu, opc, PCQ_RESIZE);
+ pnd->pnd_flags |= PND_INRESIZE;
+ inresize = 1;
+ }
+
#ifdef PERFUSE_DEBUG
if (perfuse_diagflags & PDF_RESIZE)
DPRINTF(">> %s %p %" PRIu64 "\n", __func__,
Home |
Main Index |
Thread Index |
Old Index