diff options
author | Bob Peterson <rpeterso@redhat.com> | 2017-12-18 21:48:29 +0300 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2017-12-22 16:51:29 +0300 |
commit | 588bff95c94efc05f9e1a0b19015c9408ed7c0ef (patch) | |
tree | 2c85e871e881f39874265f91653328694c1e2d35 /fs/gfs2/log.h | |
parent | 850d2d915fa69011bef9bd668499cce889fdd8b3 (diff) | |
download | linux-588bff95c94efc05f9e1a0b19015c9408ed7c0ef.tar.xz |
GFS2: Reduce code redundancy writing log headers
Before this patch, there was a lot of code redundancy between functions
log_write_header (which uses bio) and clean_journal (which uses
buffer_head). This patch reduces the redundancy to simplify the code
and make log header writing more consistent. We want more consistency
and reduced redundancy because we plan to add a bunch of new fields
to improve performance (by eliminating the local statfs and quota files)
improve metadata integrity (by adding new crcs and such) and for better
debugging (by adding new fields to track when and where metadata was
pushed through the journals.) We don't want to duplicate setting these
new fields, nor allow for human error in the process.
This reduction in code redundancy is accomplished by introducing a new
helper function, gfs2_write_log_header which uses bio rather than bh.
That simplifies recovery function clean_journal() to use the new helper
function and iomap rather than redundancy and block_map (and eventually
we can maybe remove block_map). It also reduces our dependency on
buffer_heads.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/log.h')
-rw-r--r-- | fs/gfs2/log.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 9499a6049212..619de9a1ff4f 100644 --- a/fs/gfs2/log.h +++ b/fs/gfs2/log.h @@ -71,6 +71,8 @@ enum gfs2_flush_type { SHUTDOWN_FLUSH, FREEZE_FLUSH }; +extern void gfs2_write_log_header(struct gfs2_sbd *sdp, u64 seq, u32 tail, + u32 flags, int op_flags); extern void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, enum gfs2_flush_type type); extern void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans); |