aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-01-22 16:09:33 +0000
committerDavid Howells <dhowells@redhat.com>2016-01-25 14:43:24 +0000
commitba065ecf7704681dd47083f67b0eaef7eced3cf9 (patch)
treeff656224ca2e455c845580c19de4a6bf0244ea43
parent45d408653eea065d01bb0fdcfd02988315a5d312 (diff)
downloadcachefilesd-ba065ecf7704681dd47083f67b0eaef7eced3cf9.tar.gz
Permit culling to be disabled on the command line
Permit culling to be disabled on the command line by passing a -N flag. Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--README6
-rw-r--r--cachefilesd.85
-rw-r--r--cachefilesd.c7
3 files changed, 15 insertions, 3 deletions
diff --git a/README b/README
index 638ad4d..8446a3b 100644
--- a/README
+++ b/README
@@ -130,7 +130,7 @@ cache binds to fscache and the cache becomes live.
The daemon is run as follows:
- /sbin/cachefilesd [-d]* [-s] [-n] [-f <configfile>]
+ /sbin/cachefilesd [-d]* [-s] [-n] [-N] [-f <configfile>]
The flags are:
@@ -147,6 +147,10 @@ The flags are:
Don't daemonise and go into background.
+ (*) -N
+
+ Disable culling and scanning to fill the cull table.
+
(*) -f <configfile>
Use an alternative configuration file rather than the default one.
diff --git a/cachefilesd.8 b/cachefilesd.8
index e9ad3f2..3db9f9d 100644
--- a/cachefilesd.8
+++ b/cachefilesd.8
@@ -11,7 +11,7 @@
.SH NAME
cachefilesd \- CacheFiles userspace management daemon
.SH SYNOPSIS
-.B "cachefilesd [-d]* [-s] [-n] [-f <configfile>]"
+.B "cachefilesd [-d]* [-s] [-n] [-N] [-f <configfile>]"
.SH DESCRIPTION
The \fBcachefilesd\fP daemon manages the cache data store that is used by
network filesystems such a AFS and NFS to cache data locally on disk.
@@ -30,6 +30,9 @@ Don't use syslog.
.B -n
Don't daemonise.
.TP
+.B -N
+Disable culling and scanning to fill the cull table.
+.TP
.BI "-p <pidfile>"
Use an alternate PID file to /var/run/cachefilesd.pid.
.TP
diff --git a/cachefilesd.c b/cachefilesd.c
index 7212285..7d86821 100644
--- a/cachefilesd.c
+++ b/cachefilesd.c
@@ -289,7 +289,7 @@ int main(int argc, char *argv[])
version();
/* parse the arguments */
- while (opt = getopt(argc, argv, "dsnf:p:v"),
+ while (opt = getopt(argc, argv, "dsnNf:p:v"),
opt != EOF
) {
switch (opt) {
@@ -308,6 +308,11 @@ int main(int argc, char *argv[])
nodaemon = true;
break;
+ case 'N':
+ /* disable culling */
+ nocull = true;
+ break;
+
case 'f':
/* use a specific config file */
configfile = optarg;