From befa0be7b3b0baafb84ee440f3f28de9616984b6 Mon Sep 17 00:00:00 2001 From: Joel Becker Date: Thu, 11 Dec 2008 15:04:14 -0800 Subject: [PATCH] --- yaml --- r: 125891 b: refs/heads/master c: d030cc978e9e636dc39ce9a9e8282d48698a3b30 h: refs/heads/master i: 125889: aadeaf14de3cde3d02470ee179da0444f04e38fc 125887: 1afc1f642c67db2a0f71f82b3e90f23a8d6f4741 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/super.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1801080fa242..70cec1cdd07b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c175a518b4a1d514483abf61813ce5d855917164 +refs/heads/master: d030cc978e9e636dc39ce9a9e8282d48698a3b30 diff --git a/trunk/fs/ocfs2/super.c b/trunk/fs/ocfs2/super.c index 2eb657c3e7a8..43ed11345b59 100644 --- a/trunk/fs/ocfs2/super.c +++ b/trunk/fs/ocfs2/super.c @@ -52,6 +52,7 @@ #include "ocfs1_fs_compat.h" #include "alloc.h" +#include "blockcheck.h" #include "dlmglue.h" #include "export.h" #include "extent_map.h" @@ -1989,6 +1990,15 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di, if (memcmp(di->i_signature, OCFS2_SUPER_BLOCK_SIGNATURE, strlen(OCFS2_SUPER_BLOCK_SIGNATURE)) == 0) { + /* We have to do a raw check of the feature here */ + if (le32_to_cpu(di->id2.i_super.s_feature_incompat) & + OCFS2_FEATURE_INCOMPAT_META_ECC) { + status = ocfs2_block_check_validate(bh->b_data, + bh->b_size, + &di->i_check); + if (status) + goto out; + } status = -EINVAL; if ((1 << le32_to_cpu(di->id2.i_super.s_blocksize_bits)) != blksz) { mlog(ML_ERROR, "found superblock with incorrect block " @@ -2030,6 +2040,7 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di, } } +out: mlog_exit(status); return status; }