summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/sync-interval.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libdiskfs/sync-interval.c b/libdiskfs/sync-interval.c
index 0c51a27b..c86eba6a 100644
--- a/libdiskfs/sync-interval.c
+++ b/libdiskfs/sync-interval.c
@@ -26,6 +26,9 @@
#include "priv.h"
+/* A user-readable variable reflecting the last set sync interval. */
+int diskfs_sync_interval = 0;
+
/* The thread that's doing the syncing. */
static cthread_t periodic_sync_thread;
@@ -33,9 +36,7 @@ static cthread_t periodic_sync_thread;
an RPC. We can use ports_inhibit_port_rpcs on this port to guarantee
that the periodic_sync_thread is quiescent. */
static struct port_info *pi;
-
-
static void periodic_sync ();
/* Establish a thread to sync the filesystem every INTERVAL seconds, or
@@ -69,6 +70,9 @@ diskfs_set_sync_interval (int interval)
err = EIEIO;
}
+ if (!err)
+ diskfs_sync_interval = interval;
+
ports_resume_port_rpcs (pi);
return err;