1 ; https://www.redhat.com/archives/linux-cachefs/2014-February/msg00001.html
2 diff -urN cachefilesd-0.10.5.org/cachefilesd.c cachefilesd-0.10.5/cachefilesd.c
3 --- cachefilesd-0.10.5.org/cachefilesd.c 2011-12-06 14:38:00.000000000 +0100
4 +++ cachefilesd-0.10.5/cachefilesd.c 2014-03-21 18:47:45.739197236 +0100
6 static int oldest_build = -1;
7 static int oldest_ready = -1;
8 static int ncullable = 0;
9 +static int cull_delayed = 0;
12 static const char *configfile = "/etc/cachefilesd.conf";
14 static void sigalrm(int sig)
20 /*****************************************************************************/
23 /* sleep without racing on reap and cull with the signal
25 - if (!scan && !reap && !cull) {
26 + if (!scan && !reap && !(cull && !cull_delayed)) {
27 if (sigprocmask(SIG_BLOCK, &sigs, &osigs) < 0)
28 oserror("Unable to block signals");
30 - if (!reap && !cull) {
31 + if (!reap && !stop && !jumpstart_scan) {
32 if (ppoll(pollfds, 1, NULL, &osigs) < 0 &&
34 oserror("Unable to suspend process");
37 if (oldest_ready >= 0)
39 - else if (oldest_build < 0)
40 + else if (oldest_build < 0 && !cull_delayed)
46 /* if nothing there, scan again in a short while */
47 if (oldest_build < 0) {
49 signal(SIGALRM, sigalrm);