aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/daemon.c')
-rw-r--r--fs/gfs2/daemon.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c
index e51991947d2c..5668aa77b95a 100644
--- a/fs/gfs2/daemon.c
+++ b/fs/gfs2/daemon.c
@@ -23,7 +23,6 @@
23#include "daemon.h" 23#include "daemon.h"
24#include "glock.h" 24#include "glock.h"
25#include "log.h" 25#include "log.h"
26#include "quota.h"
27#include "recovery.h" 26#include "recovery.h"
28#include "super.h" 27#include "super.h"
29#include "util.h" 28#include "util.h"
@@ -82,55 +81,3 @@ int gfs2_recoverd(void *data)
82 return 0; 81 return 0;
83} 82}
84 83
85/**
86 * gfs2_quotad - Write cached quota changes into the quota file
87 * @sdp: Pointer to GFS2 superblock
88 *
89 */
90
91int gfs2_quotad(void *data)
92{
93 struct gfs2_sbd *sdp = data;
94 unsigned long t;
95 int error;
96
97 while (!kthread_should_stop()) {
98 /* Update the master statfs file */
99
100 t = sdp->sd_statfs_sync_time +
101 gfs2_tune_get(sdp, gt_statfs_quantum) * HZ;
102
103 if (time_after_eq(jiffies, t)) {
104 error = gfs2_statfs_sync(sdp);
105 if (error &&
106 error != -EROFS &&
107 !test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
108 fs_err(sdp, "quotad: (1) error=%d\n", error);
109 sdp->sd_statfs_sync_time = jiffies;
110 }
111
112 /* Update quota file */
113
114 t = sdp->sd_quota_sync_time +
115 gfs2_tune_get(sdp, gt_quota_quantum) * HZ;
116
117 if (time_after_eq(jiffies, t)) {
118 error = gfs2_quota_sync(sdp);
119 if (error &&
120 error != -EROFS &&
121 !test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
122 fs_err(sdp, "quotad: (2) error=%d\n", error);
123 sdp->sd_quota_sync_time = jiffies;
124 }
125
126 gfs2_quota_scan(sdp);
127
128 t = gfs2_tune_get(sdp, gt_quotad_secs) * HZ;
129 if (freezing(current))
130 refrigerator();
131 schedule_timeout_interruptible(t);
132 }
133
134 return 0;
135}
136