[Ocfs2-devel] [PATCH 03/42] ocfs2: Add metaecc for ocfs2_refcount_block.
Tao Ma
tao.ma at oracle.com
Thu Mar 26 16:02:09 PDT 2009
Add metaecc and journal trigger for ocfs2_refcount_block.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
fs/ocfs2/journal.c | 15 +++++++++++++++
fs/ocfs2/journal.h | 3 +++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index e2c2d0a..6159cd8 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -467,6 +467,14 @@ static struct ocfs2_triggers eb_triggers = {
.ot_offset = offsetof(struct ocfs2_extent_block, h_check),
};
+static struct ocfs2_triggers rb_triggers = {
+ .ot_triggers = {
+ .t_commit = ocfs2_commit_trigger,
+ .t_abort = ocfs2_abort_trigger,
+ },
+ .ot_offset = offsetof(struct ocfs2_refcount_block, rf_check),
+};
+
static struct ocfs2_triggers gd_triggers = {
.ot_triggers = {
.t_commit = ocfs2_commit_trigger,
@@ -575,6 +583,13 @@ int ocfs2_journal_access_eb(handle_t *handle, struct ocfs2_caching_info *ci,
type);
}
+int ocfs2_journal_access_rb(handle_t *handle, struct ocfs2_caching_info *ci,
+ struct buffer_head *bh, int type)
+{
+ return __ocfs2_journal_access(handle, ci, bh, &rb_triggers,
+ type);
+}
+
int ocfs2_journal_access_gd(handle_t *handle, struct ocfs2_caching_info *ci,
struct buffer_head *bh, int type)
{
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index 3c08d69..0eef436 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -264,6 +264,9 @@ int ocfs2_journal_access_di(handle_t *handle, struct ocfs2_caching_info *ci,
/* ocfs2_extent_block */
int ocfs2_journal_access_eb(handle_t *handle, struct ocfs2_caching_info *ci,
struct buffer_head *bh, int type);
+/* ocfs2_refcount_block */
+int ocfs2_journal_access_rb(handle_t *handle, struct ocfs2_caching_info *ci,
+ struct buffer_head *bh, int type);
/* ocfs2_group_desc */
int ocfs2_journal_access_gd(handle_t *handle, struct ocfs2_caching_info *ci,
struct buffer_head *bh, int type);
--
1.6.2.rc2.16.gf474c
More information about the Ocfs2-devel
mailing list