aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/quota_global.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-10-17 17:55:01 -0400
committerMark Fasheh <mfasheh@suse.com>2009-01-05 11:40:31 -0500
commitd6b32bbb3eae3fb787f1c33bf9f767ca1ddeb208 (patch)
treece38de666096f571f4b1754e898729cf2d9eb435 /fs/ocfs2/quota_global.c
parent684ef278377725d505aa23259ee673dab9b11851 (diff)
ocfs2: block read meta ecc.
Add block check calls to the read_block validate functions. This is the almost all of the read-side checking of metaecc. xattr buckets are not checked yet. Writes are also unchecked, and so a read-write mount will quickly fail. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/quota_global.c')
-rw-r--r--fs/ocfs2/quota_global.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index 7dbcfd7f65e6..a0b8b14cca8f 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -16,6 +16,7 @@
16#include "ocfs2_fs.h" 16#include "ocfs2_fs.h"
17#include "ocfs2.h" 17#include "ocfs2.h"
18#include "alloc.h" 18#include "alloc.h"
19#include "blockcheck.h"
19#include "inode.h" 20#include "inode.h"
20#include "journal.h" 21#include "journal.h"
21#include "file.h" 22#include "file.h"
@@ -90,12 +91,20 @@ struct qtree_fmt_operations ocfs2_global_ops = {
90static int ocfs2_validate_quota_block(struct super_block *sb, 91static int ocfs2_validate_quota_block(struct super_block *sb,
91 struct buffer_head *bh) 92 struct buffer_head *bh)
92{ 93{
93 struct ocfs2_disk_dqtrailer *dqt = ocfs2_dq_trailer(sb, bh->b_data); 94 struct ocfs2_disk_dqtrailer *dqt =
95 ocfs2_block_dqtrailer(sb->s_blocksize, bh->b_data);
94 96
95 mlog(0, "Validating quota block %llu\n", 97 mlog(0, "Validating quota block %llu\n",
96 (unsigned long long)bh->b_blocknr); 98 (unsigned long long)bh->b_blocknr);
97 99
98 return 0; 100 BUG_ON(!buffer_uptodate(bh));
101
102 /*
103 * If the ecc fails, we return the error but otherwise
104 * leave the filesystem running. We know any error is
105 * local to this block.
106 */
107 return ocfs2_validate_meta_ecc(sb, bh->b_data, &dqt->dq_check);
99} 108}
100 109
101int ocfs2_read_quota_block(struct inode *inode, u64 v_block, 110int ocfs2_read_quota_block(struct inode *inode, u64 v_block,