aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2018-01-16 18:01:33 -0500
committerBob Peterson <rpeterso@redhat.com>2018-01-23 09:38:53 -0500
commitc1696fb85d33194cf65c7ebfc82a75696299c3a3 (patch)
treee6c2faba8786f73db8270822c4fb263cad57b207 /fs/gfs2/glops.c
parent0ff5916ad4eb857e03e7586665d1c022ef3277f6 (diff)
GFS2: Introduce new gfs2_log_header_v2
This patch adds a new structure called gfs2_log_header_v2 which is used to store expanded fields into previously unused areas of the log headers (i.e., this change is backwards compatible). Some of these are used for debug purposes so we can backtrack when problems occur. Others are reserved for future expansion. This patch is based on a prototype from Steve Whitehouse. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index cdd1c5f06f45..2daab13a9e0b 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -107,7 +107,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
107 __gfs2_ail_flush(gl, 0, tr.tr_revokes); 107 __gfs2_ail_flush(gl, 0, tr.tr_revokes);
108 108
109 gfs2_trans_end(sdp); 109 gfs2_trans_end(sdp);
110 gfs2_log_flush(sdp, NULL, NORMAL_FLUSH); 110 gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_NORMAL);
111} 111}
112 112
113void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync) 113void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
@@ -128,7 +128,7 @@ void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
128 return; 128 return;
129 __gfs2_ail_flush(gl, fsync, max_revokes); 129 __gfs2_ail_flush(gl, fsync, max_revokes);
130 gfs2_trans_end(sdp); 130 gfs2_trans_end(sdp);
131 gfs2_log_flush(sdp, NULL, NORMAL_FLUSH); 131 gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_NORMAL);
132} 132}
133 133
134/** 134/**
@@ -157,7 +157,7 @@ static void rgrp_go_sync(struct gfs2_glock *gl)
157 return; 157 return;
158 GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE); 158 GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE);
159 159
160 gfs2_log_flush(sdp, gl, NORMAL_FLUSH); 160 gfs2_log_flush(sdp, gl, GFS2_LOG_HEAD_FLUSH_NORMAL);
161 filemap_fdatawrite_range(mapping, gl->gl_vm.start, gl->gl_vm.end); 161 filemap_fdatawrite_range(mapping, gl->gl_vm.start, gl->gl_vm.end);
162 error = filemap_fdatawait_range(mapping, gl->gl_vm.start, gl->gl_vm.end); 162 error = filemap_fdatawait_range(mapping, gl->gl_vm.start, gl->gl_vm.end);
163 mapping_set_error(mapping, error); 163 mapping_set_error(mapping, error);
@@ -252,7 +252,7 @@ static void inode_go_sync(struct gfs2_glock *gl)
252 252
253 GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE); 253 GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE);
254 254
255 gfs2_log_flush(gl->gl_name.ln_sbd, gl, NORMAL_FLUSH); 255 gfs2_log_flush(gl->gl_name.ln_sbd, gl, GFS2_LOG_HEAD_FLUSH_NORMAL);
256 filemap_fdatawrite(metamapping); 256 filemap_fdatawrite(metamapping);
257 if (isreg) { 257 if (isreg) {
258 struct address_space *mapping = ip->i_inode.i_mapping; 258 struct address_space *mapping = ip->i_inode.i_mapping;
@@ -303,7 +303,8 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
303 } 303 }
304 304
305 if (ip == GFS2_I(gl->gl_name.ln_sbd->sd_rindex)) { 305 if (ip == GFS2_I(gl->gl_name.ln_sbd->sd_rindex)) {
306 gfs2_log_flush(gl->gl_name.ln_sbd, NULL, NORMAL_FLUSH); 306 gfs2_log_flush(gl->gl_name.ln_sbd, NULL,
307 GFS2_LOG_HEAD_FLUSH_NORMAL);
307 gl->gl_name.ln_sbd->sd_rindex_uptodate = 0; 308 gl->gl_name.ln_sbd->sd_rindex_uptodate = 0;
308 } 309 }
309 if (ip && S_ISREG(ip->i_inode.i_mode)) 310 if (ip && S_ISREG(ip->i_inode.i_mode))
@@ -495,7 +496,7 @@ static void freeze_go_sync(struct gfs2_glock *gl)
495 gfs2_assert_withdraw(sdp, 0); 496 gfs2_assert_withdraw(sdp, 0);
496 } 497 }
497 queue_work(gfs2_freeze_wq, &sdp->sd_freeze_work); 498 queue_work(gfs2_freeze_wq, &sdp->sd_freeze_work);
498 gfs2_log_flush(sdp, NULL, FREEZE_FLUSH); 499 gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_FREEZE);
499 } 500 }
500} 501}
501 502