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 26
|
Description: remove excessive sync calls causing lots of disk activity and
replace by fsync on closing the file.
Bug: http://bugs.debian.org/623140
Author: Nico Golde <nion@debian.org>
Last-Update: 2011-04-19
Index: tcpxtract-1.0.1/extract.c
===================================================================
--- tcpxtract-1.0.1.orig/extract.c
+++ tcpxtract-1.0.1/extract.c
@@ -163,7 +163,6 @@ static void extract_segment(extract_list
error("Quiting.");
}
elist->nwritten += nbytes;
- sync();
}
/* remove all finished extracts from the list */
@@ -182,6 +181,8 @@ static void sweep_extract_list(extract_l
eptr->next->prev = eptr->prev;
if (*elist == eptr)
*elist = eptr->next;
+
+ fsync(eptr->fd);
close(eptr->fd);
free(eptr);
}
|