linux-IllusionX/fs/ocfs2
Joel Becker b657c95c11 ocfs2: Wrap inode block reads in a dedicated function.
The ocfs2 code currently reads inodes off disk with a simple
ocfs2_read_block() call.  Each place that does this has a different set
of sanity checks it performs.  Some check only the signature.  A couple
validate the block number (the block read vs di->i_blkno).  A couple
others check for VALID_FL.  Only one place validates i_fs_generation.  A
couple check nothing.  Even when an error is found, they don't all do
the same thing.

We wrap inode reading into ocfs2_read_inode_block().  This will validate
all the above fields, going readonly if they are invalid (they never
should be).  ocfs2_read_inode_block_full() is provided for the places
that want to pass read_block flags.  Every caller is passing a struct
inode with a valid ip_blkno, so we don't need a separate blkno argument
either.

We will remove the validation checks from the rest of the code in a
later commit, as they are no longer necessary.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2009-01-05 08:36:52 -08:00
..
cluster
dlm
acl.c ocfs2: add ocfs2_init_acl in mknod 2009-01-05 08:34:20 -08:00
acl.h ocfs2: add ocfs2_init_acl in mknod 2009-01-05 08:34:20 -08:00
alloc.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
alloc.h ocfs2: turn __ocfs2_remove_inode_range() into ocfs2_remove_btree_range() 2009-01-05 08:34:19 -08:00
aops.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
aops.h
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
dir.h
dlmglue.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
dlmglue.h
export.c
export.h
extent_map.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
extent_map.h
file.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
file.h
heartbeat.c
heartbeat.h
inode.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
inode.h ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
ioctl.c
ioctl.h
journal.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
journal.h
localalloc.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
localalloc.h
locks.c
locks.h
Makefile ocfs2: add POSIX ACL API 2009-01-05 08:34:20 -08:00
mmap.c
mmap.h
namei.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: add POSIX ACL API 2009-01-05 08:34:20 -08:00
ocfs2_fs.h
ocfs2_jbd_compat.h
ocfs2_lockid.h
ocfs2_lockingver.h
resize.c
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c
stackglue.h
suballoc.c
suballoc.h
super.c ocfs2: add mount option and Kconfig option for acl 2009-01-05 08:36:52 -08:00
super.h
symlink.c ocfs2: Wrap inode block reads in a dedicated function. 2009-01-05 08:36:52 -08:00
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
ver.c
ver.h
xattr.c ocfs2: add ocfs2_init_acl in mknod 2009-01-05 08:34:20 -08:00
xattr.h ocfs2: add ocfs2_init_acl in mknod 2009-01-05 08:34:20 -08:00