[Ocfs2-tools-devel] [PATCH 2/2] defrag.ocfs2: Clear unused inode groups

Sunil Mushran sunil.mushran at oracle.com
Thu Feb 25 16:03:11 PST 2010


Tao Ma wrote:
>> Clears all inode groups which have no allocated inodes in all
>> chains of all inode allocators.
>>
>> Currently, it gets more inode groups only after a mass delete. Any
>> inode allocations after that fill atleast one inode in each inode
>> group, in a round robin fashion, starting from the inode group which
>> has the most inodes free first.
> You mean the method in kernel when we allocate inodes? Now we allocating 
> from the same inode groups of the directory. What's more, we store the 
> alloc_group in osb_inode_alloc_group to use it next time. So it 
> shouldn't be round robin anymore. Am I missing something here?

I am trying to understand the goal here. How will freeing unused
inode_alloc groups defragment the volume? Is this a step 1 in a multi
step process? If so, can you elaborate on the rest.

BTW, Wengang did document his thoughts on the subject.
http://oss.oracle.com/osswiki/OCFS2/DesignDocs/defragmentation

At that time I felt online defrag is the only solution. But my thinking
has evolved. Right now I think any defrag tool that increases freespace
space contiguousness is good. Offline and/or online.

Sunil



More information about the Ocfs2-tools-devel mailing list