GFS2: eliminate log elements and simplify

This patch eliminates the gfs2_log_element data structure and
rolls its two components into the gfs2_bufdata. This makes the code
easier to understand and makes it easier to migrate to a rbtree
to keep the list sorted.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Bob Peterson
2012-05-01 12:00:34 -04:00
committed by Steven Whitehouse
parent 1c47f09592
commit c0752aa7e4
7 changed files with 48 additions and 55 deletions

View File

@@ -46,17 +46,17 @@ static inline unsigned int databuf_limit(struct gfs2_sbd *sdp)
return limit;
}
static inline void lops_init_le(struct gfs2_log_element *le,
static inline void lops_init_le(struct gfs2_bufdata *bd,
const struct gfs2_log_operations *lops)
{
INIT_LIST_HEAD(&le->le_list);
le->le_ops = lops;
INIT_LIST_HEAD(&bd->bd_list);
bd->bd_ops = lops;
}
static inline void lops_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
static inline void lops_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
{
if (le->le_ops->lo_add)
le->le_ops->lo_add(sdp, le);
if (bd->bd_ops->lo_add)
bd->bd_ops->lo_add(sdp, bd);
}
static inline void lops_before_commit(struct gfs2_sbd *sdp)