aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/daemon.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-11-17 14:25:37 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2009-01-05 07:39:05 +0000
commit37b2c8377c98acb60cf4d0126e385ef2153bded9 (patch)
tree9db50dbebc75a5e0dfde927b52dd05470cf66132 /fs/gfs2/daemon.c
parentfa75cedc3da5923b8ea3877be9d5bc09b02e3860 (diff)
downloadlinux-37b2c8377c98acb60cf4d0126e385ef2153bded9.tar.gz
GFS2: Clean up & move gfs2_quotad
This patch is a clean up of gfs2_quotad prior to giving it an extra job to do in addition to the current portfolio of updating the quota and statfs information from time to time. As a result it has been moved into quota.c allowing one of the functions it calls to be made static. Also the clean up allows the two existing functions to have separate timeouts and also to coexist with its future role of dealing with the "truncate in progress" inode flag. The (pointless) setting of gfs2_quotad_secs is removed since we arrange to only wake up quotad when one of the two timers expires. In addition the struct gfs2_quota_data is moved into a slab cache, mainly for easier debugging. It should also be possible to use a shrinker in the future, rather than the current scheme of scanning the quota data entries from time to time. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
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 e51991947d2cd..5668aa77b95af 100644
--- a/fs/gfs2/daemon.c
+++ b/fs/gfs2/daemon.c
@@ -23,7 +23,6 @@
#include "daemon.h"
#include "glock.h"
#include "log.h"
-#include "quota.h"
#include "recovery.h"
#include "super.h"
#include "util.h"
@@ -82,55 +81,3 @@ int gfs2_recoverd(void *data)
return 0;
}
-/**
- * gfs2_quotad - Write cached quota changes into the quota file
- * @sdp: Pointer to GFS2 superblock
- *
- */
-
-int gfs2_quotad(void *data)
-{
- struct gfs2_sbd *sdp = data;
- unsigned long t;
- int error;
-
- while (!kthread_should_stop()) {
- /* Update the master statfs file */
-
- t = sdp->sd_statfs_sync_time +
- gfs2_tune_get(sdp, gt_statfs_quantum) * HZ;
-
- if (time_after_eq(jiffies, t)) {
- error = gfs2_statfs_sync(sdp);
- if (error &&
- error != -EROFS &&
- !test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
- fs_err(sdp, "quotad: (1) error=%d\n", error);
- sdp->sd_statfs_sync_time = jiffies;
- }
-
- /* Update quota file */
-
- t = sdp->sd_quota_sync_time +
- gfs2_tune_get(sdp, gt_quota_quantum) * HZ;
-
- if (time_after_eq(jiffies, t)) {
- error = gfs2_quota_sync(sdp);
- if (error &&
- error != -EROFS &&
- !test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
- fs_err(sdp, "quotad: (2) error=%d\n", error);
- sdp->sd_quota_sync_time = jiffies;
- }
-
- gfs2_quota_scan(sdp);
-
- t = gfs2_tune_get(sdp, gt_quotad_secs) * HZ;
- if (freezing(current))
- refrigerator();
- schedule_timeout_interruptible(t);
- }
-
- return 0;
-}
-