]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ocfs2: Use metadata-specific ocfs2_journal_access_*() functions.
authorJoel Becker <joel.becker@oracle.com>
Sat, 18 Oct 2008 02:25:01 +0000 (19:25 -0700)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:40:32 +0000 (08:40 -0800)
commit13723d00e374c2a6d6ccb5af6de965e89c3e1b01
tree70dcd8f3d188bf2f62e4bf4b44a0662d8cd527ca
parentffdd7a54631f07918b75e324d86713a08c11ec06
ocfs2: Use metadata-specific ocfs2_journal_access_*() functions.

The per-metadata-type ocfs2_journal_access_*() functions hook up jbd2
commit triggers and allow us to compute metadata ecc right before the
buffers are written out.  This commit provides ecc for inodes, extent
blocks, group descriptors, and quota blocks.  It is not safe to use
extened attributes and metaecc at the same time yet.

The ocfs2_extent_tree and ocfs2_path abstractions in alloc.c both hide
the type of block at their root.  Before, it didn't matter, but now the
root block must use the appropriate ocfs2_journal_access_*() function.
To keep this abstract, the structures now have a pointer to the matching
journal_access function and a wrapper call to call it.

A few places use naked ocfs2_write_block() calls instead of adding the
blocks to the journal.  We make sure to calculate their checksum and ecc
before the write.

Since we pass around the journal_access functions.  Let's typedef them
in ocfs2.h.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 files changed:
fs/ocfs2/alloc.c
fs/ocfs2/alloc.h
fs/ocfs2/aops.c
fs/ocfs2/dir.c
fs/ocfs2/file.c
fs/ocfs2/inode.c
fs/ocfs2/journal.c
fs/ocfs2/journal.h
fs/ocfs2/localalloc.c
fs/ocfs2/namei.c
fs/ocfs2/ocfs2.h
fs/ocfs2/quota_global.c
fs/ocfs2/quota_local.c
fs/ocfs2/resize.c
fs/ocfs2/suballoc.c