[Ocfs2-tools-devel] Re: [Ocfs2-devel] [patch 1/1] offline de-fragmentation tool

tao.ma tao.ma at oracle.com
Wed Feb 13 22:12:38 PST 2008



wengang wang wrote:
> 
> 
> tao.ma wrote:
>>
>>
>> wengang wang wrote:
>>> added/revised some lines.
>>> and what's important, I don't know how to write ordering -- make use 
>>> of jbd?
>> No, you just need to be very careful of your writing order so that any 
>> corruption after any operation will be either harmless or can be 
>> recovered by fsck.ocfs2. So this may means that you need to revise 
>> fsck.ocfs2 also to fix the corruption your tool do to the volume.
>> Good luck and enjoy it. ;)
> while, for example, power down when committing a group to disk, and the 
> bitmap was written to disk partially.
> for fsck.ocfs2, how to determine whether the bitmap is good?
Do you mean you change the group's bitmap and want to commit?
A group descriptor including its bitmap is contained in a block, not a 
cluster. so it is the block driver that guarantee this block is written 
as a whole not us.

If you mean change the group descriptor and chain information of the 
inode, then you can do like this:
1. update the inode. so if panic after this, fsck will recover the inode 
according to the group descriptor.
2. update the group descriptor.



More information about the Ocfs2-tools-devel mailing list