[Ocfs2-tools-devel] [PATCH 2/3] fsck.ocfs2: Add extent list check for discontig bg.

Tao Ma tao.ma at oracle.com
Wed Jul 21 20:57:28 PDT 2010



On 07/22/2010 11:17 AM, Joel Becker wrote:
> On Thu, Jul 22, 2010 at 10:49:37AM +0800, Tao Ma wrote:
>> On 07/22/2010 10:28 AM, Joel Becker wrote:
>>> 	Shouldn't we be checking the last block of the extent, not the
>>> first one?
>> I am just worried about the case of e_blkno = 0 while the end may be
>> valid. but you are also right, so we need to check both e_blkno and
>> the last block of the extent.
>
> 	Yeah, e_blkno must be>  SUPER_BLOCK_BLKNO.
>
>>> 		} else if ((total_clusters + rec->e_leaf_clusters)>   cpg) {
>>> 			if (total_clusters == cpg) {
>>> 				Ask to truncate l_next_free_rec at i.
>>> 			} else {
>>> 				Ask to truncate rec->e_leaf_clusters at
>>> 				cpg -. total_clusters.  Or perhaps drop
>>> 				the group if we don't think that is safe
>>> 				to do.
>> I think we should drop the group here.
>
> 	Are you thinking that if e_leaf_clusters>cpg, we know it's
> corrupted, but if it's just big enough to add up to greater than cpg, we
> have no idea what happened?
yeah, so I think in both case, we need to drop the group because:
in the 1st case, sure it is corrupted.
in the 2nd case, what if the 1st extent rec's e_leaf_clusters is 
corrupted and trigger the final number to be greater than cpg or it is 
really a rare case for us to have a corrupted extent record before the 
last one?

That makes me now think that can we really fix a e_leaf_clusters error 
based on the sum of other *looked sane* extent records?

Regards,
Tao



More information about the Ocfs2-tools-devel mailing list