]> rtime.felk.cvut.cz Git - linux-imx.git/commit
xfs: add CRC checking to dir2 free blocks
authorDave Chinner <dchinner@redhat.com>
Wed, 3 Apr 2013 05:11:21 +0000 (16:11 +1100)
committerBen Myers <bpm@sgi.com>
Sat, 27 Apr 2013 16:58:16 +0000 (11:58 -0500)
commitcbc8adf89724b961c08b823d8bfb6dadbfa8733d
tree31a43d0f0445c69b446f3091ab9666d5934c115d
parentf5f3d9b0161633e8943520e83df634ad540b3b7f
xfs: add CRC checking to dir2 free blocks

This addition follows the same pattern as the dir2 block CRCs, but
with a few differences. The main difference is that the free block
header is different between the v2 and v3 formats, so an "in-core"
free block header has been added and _todisk/_from_disk functions
used to abstract the differences in structure format from the code.
This is similar to the on-disk superblock versus the in-core
superblock setup. The in-core strucutre is populated when the buffer
is read from disk, all the in memory checks and modifications are
done on the in-core version of the structure which is written back
to the buffer before the buffer is logged.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_dir2_format.h
fs/xfs/xfs_dir2_leaf.c
fs/xfs/xfs_dir2_node.c