[Ocfs2-tools-devel] Patch for debugfs.ocfs2 icheck command

Sunil Mushran Sunil.Mushran at oracle.com
Fri Sep 22 15:47:47 PDT 2006


It will probably be quicker if you not walk the direntries. Instead do 
the following:

1. Figure out the cluster number. Scan the global bitmap if that
cluster is in use. If not, exit.

2. Check whether that block is in a known unused space. If so, exit.
If you are not clear on this, we can address this later.

3. Scan global_inode_alloc. Read each inode that is in use as per the 
bitmap.
Do not walk the inode tree. See if the block is directly referenced in 
the extent list.
If so, exit.

4. Do the same for inode_allocs for each slot. If found, exit.

5. Do the same for extent_allocs for each slot. If found, exit. (extent 
block has the inode#).

Let me know if you have any qs.
Sunil

Sunil Mushran wrote:
> 1. icheck is supposed to only return the inode# and not the pathname. So
> no need to keep track of the path or find all the paths.
>
> 2. The usage should not require the <...>. This is just a block number 
> and
> not the inode#.
>
> 3. It should first look at the global bitmap to see if the block (part of
> a cluster) is even allocated. No point scanning the volume if it is not.
>
> 4. Also should detect if the block is in a known unused space. Like the
> blocks in the first cluster of a group (other than the first block 
> itself).
> Not sure how it should identify such blocks. Mark it "used by system"
> as a placeholder.
>
> 5. It will fail if the block# is the superblock or rootdir or sysdir 
> itself.
>
> GONG Jie wrote:
>> On Thursday 21 September 2006 16:37, tao.ma wrote:
>>  
>>> 2. In function find_blkno, there seems to be a memory leak.
>>>
>>>     
>> Fix the memory leak this time.
>>
>>   
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Ocfs2-tools-devel mailing list
>> Ocfs2-tools-devel at oss.oracle.com
>> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
>>   
>
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel



More information about the Ocfs2-tools-devel mailing list