diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2007-11-09 05:01:41 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-01-25 03:07:56 -0500 |
commit | ec69b188837a347769e187997d040e84a683b38a (patch) | |
tree | d16ebc9b83807f99a114efe3a093315f9839b81c /fs/gfs2/daemon.c | |
parent | fd041f0b4045db8646b36d393cbb274db60649f5 (diff) |
[GFS2] Move gfs2_logd into log.c
This means that we can mark gfs2_ail1_empty static and prepares
the way for further changes.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/daemon.c')
-rw-r--r-- | fs/gfs2/daemon.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c index 3731ab0771d5..e51991947d2c 100644 --- a/fs/gfs2/daemon.c +++ b/fs/gfs2/daemon.c | |||
@@ -83,56 +83,6 @@ int gfs2_recoverd(void *data) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * gfs2_logd - Update log tail as Active Items get flushed to in-place blocks | ||
87 | * @sdp: Pointer to GFS2 superblock | ||
88 | * | ||
89 | * Also, periodically check to make sure that we're using the most recent | ||
90 | * journal index. | ||
91 | */ | ||
92 | |||
93 | int gfs2_logd(void *data) | ||
94 | { | ||
95 | struct gfs2_sbd *sdp = data; | ||
96 | struct gfs2_holder ji_gh; | ||
97 | unsigned long t; | ||
98 | int need_flush; | ||
99 | |||
100 | while (!kthread_should_stop()) { | ||
101 | /* Advance the log tail */ | ||
102 | |||
103 | t = sdp->sd_log_flush_time + | ||
104 | gfs2_tune_get(sdp, gt_log_flush_secs) * HZ; | ||
105 | |||
106 | gfs2_ail1_empty(sdp, DIO_ALL); | ||
107 | gfs2_log_lock(sdp); | ||
108 | need_flush = sdp->sd_log_num_buf > gfs2_tune_get(sdp, gt_incore_log_blocks); | ||
109 | gfs2_log_unlock(sdp); | ||
110 | if (need_flush || time_after_eq(jiffies, t)) { | ||
111 | gfs2_log_flush(sdp, NULL); | ||
112 | sdp->sd_log_flush_time = jiffies; | ||
113 | } | ||
114 | |||
115 | /* Check for latest journal index */ | ||
116 | |||
117 | t = sdp->sd_jindex_refresh_time + | ||
118 | gfs2_tune_get(sdp, gt_jindex_refresh_secs) * HZ; | ||
119 | |||
120 | if (time_after_eq(jiffies, t)) { | ||
121 | if (!gfs2_jindex_hold(sdp, &ji_gh)) | ||
122 | gfs2_glock_dq_uninit(&ji_gh); | ||
123 | sdp->sd_jindex_refresh_time = jiffies; | ||
124 | } | ||
125 | |||
126 | t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; | ||
127 | if (freezing(current)) | ||
128 | refrigerator(); | ||
129 | schedule_timeout_interruptible(t); | ||
130 | } | ||
131 | |||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * gfs2_quotad - Write cached quota changes into the quota file | 86 | * gfs2_quotad - Write cached quota changes into the quota file |
137 | * @sdp: Pointer to GFS2 superblock | 87 | * @sdp: Pointer to GFS2 superblock |
138 | * | 88 | * |