提交 e35b9211 编写于 作者: S Steven Whitehouse

[GFS2] Don't periodically update the jindex

We only care about the content of the jindex in two cases,
one is when we mount the fs and the other is when we need
to recover another journal. In both cases we have to update
the jindex anyway, so there is no point in updating it
periodically between times, so this removes it to simplify
gfs2_logd.
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 ec69b188
...@@ -411,7 +411,6 @@ struct gfs2_tune { ...@@ -411,7 +411,6 @@ struct gfs2_tune {
unsigned int gt_demote_secs; /* Cache retention for unheld glock */ unsigned int gt_demote_secs; /* Cache retention for unheld glock */
unsigned int gt_incore_log_blocks; unsigned int gt_incore_log_blocks;
unsigned int gt_log_flush_secs; unsigned int gt_log_flush_secs;
unsigned int gt_jindex_refresh_secs; /* Check for new journal index */
unsigned int gt_recoverd_secs; unsigned int gt_recoverd_secs;
unsigned int gt_logd_secs; unsigned int gt_logd_secs;
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "meta_io.h" #include "meta_io.h"
#include "util.h" #include "util.h"
#include "dir.h" #include "dir.h"
#include "super.h"
#define PULL 1 #define PULL 1
...@@ -874,7 +873,6 @@ void gfs2_meta_syncfs(struct gfs2_sbd *sdp) ...@@ -874,7 +873,6 @@ void gfs2_meta_syncfs(struct gfs2_sbd *sdp)
int gfs2_logd(void *data) int gfs2_logd(void *data)
{ {
struct gfs2_sbd *sdp = data; struct gfs2_sbd *sdp = data;
struct gfs2_holder ji_gh;
unsigned long t; unsigned long t;
int need_flush; int need_flush;
...@@ -893,17 +891,6 @@ int gfs2_logd(void *data) ...@@ -893,17 +891,6 @@ int gfs2_logd(void *data)
sdp->sd_log_flush_time = jiffies; sdp->sd_log_flush_time = jiffies;
} }
/* Check for latest journal index */
t = sdp->sd_jindex_refresh_time +
gfs2_tune_get(sdp, gt_jindex_refresh_secs) * HZ;
if (time_after_eq(jiffies, t)) {
if (!gfs2_jindex_hold(sdp, &ji_gh))
gfs2_glock_dq_uninit(&ji_gh);
sdp->sd_jindex_refresh_time = jiffies;
}
t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; t = gfs2_tune_get(sdp, gt_logd_secs) * HZ;
if (freezing(current)) if (freezing(current))
refrigerator(); refrigerator();
......
...@@ -54,7 +54,6 @@ void gfs2_tune_init(struct gfs2_tune *gt) ...@@ -54,7 +54,6 @@ void gfs2_tune_init(struct gfs2_tune *gt)
gt->gt_demote_secs = 300; gt->gt_demote_secs = 300;
gt->gt_incore_log_blocks = 1024; gt->gt_incore_log_blocks = 1024;
gt->gt_log_flush_secs = 60; gt->gt_log_flush_secs = 60;
gt->gt_jindex_refresh_secs = 60;
gt->gt_recoverd_secs = 60; gt->gt_recoverd_secs = 60;
gt->gt_logd_secs = 1; gt->gt_logd_secs = 1;
gt->gt_quotad_secs = 5; gt->gt_quotad_secs = 5;
......
...@@ -428,7 +428,6 @@ TUNE_ATTR_2(name, name##_store) ...@@ -428,7 +428,6 @@ TUNE_ATTR_2(name, name##_store)
TUNE_ATTR(demote_secs, 0); TUNE_ATTR(demote_secs, 0);
TUNE_ATTR(incore_log_blocks, 0); TUNE_ATTR(incore_log_blocks, 0);
TUNE_ATTR(log_flush_secs, 0); TUNE_ATTR(log_flush_secs, 0);
TUNE_ATTR(jindex_refresh_secs, 0);
TUNE_ATTR(quota_warn_period, 0); TUNE_ATTR(quota_warn_period, 0);
TUNE_ATTR(quota_quantum, 0); TUNE_ATTR(quota_quantum, 0);
TUNE_ATTR(atime_quantum, 0); TUNE_ATTR(atime_quantum, 0);
...@@ -450,7 +449,6 @@ static struct attribute *tune_attrs[] = { ...@@ -450,7 +449,6 @@ static struct attribute *tune_attrs[] = {
&tune_attr_demote_secs.attr, &tune_attr_demote_secs.attr,
&tune_attr_incore_log_blocks.attr, &tune_attr_incore_log_blocks.attr,
&tune_attr_log_flush_secs.attr, &tune_attr_log_flush_secs.attr,
&tune_attr_jindex_refresh_secs.attr,
&tune_attr_quota_warn_period.attr, &tune_attr_quota_warn_period.attr,
&tune_attr_quota_quantum.attr, &tune_attr_quota_quantum.attr,
&tune_attr_atime_quantum.attr, &tune_attr_atime_quantum.attr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册