blob: c6c27a79b0f5da02fb4ed18375d3ce7d2002730e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
From: Nico Golde <nion@debian.org>
Bug: http://bugs.debian.org/623140
Description: remove excessive sync calls causing lots of disk activity and replace by fsync on closing the file.
Index: tcpxtract-1.0.1/extract.c
===================================================================
--- tcpxtract-1.0.1.orig/extract.c 2011-04-19 16:07:25.000000000 +0200
+++ tcpxtract-1.0.1/extract.c 2011-04-19 16:10:21.000000000 +0200
@@ -163,7 +163,6 @@
error("Quiting.");
}
elist->nwritten += nbytes;
- sync();
}
/* remove all finished extracts from the list */
@@ -182,6 +181,8 @@
eptr->next->prev = eptr->prev;
if (*elist == eptr)
*elist = eptr->next;
+
+ fsync(eptr->fd);
close(eptr->fd);
free(eptr);
}
|