[Ocfs2-tools-devel] offline de-fragment on files

tao.ma tao.ma at oracle.com
Mon Feb 25 00:40:48 PST 2008


A few comments:
1. If you are using jbd blocks provided by ocfs2, do please make sure 
the original journal file is flushed into the disk already before you 
use it.
2. From your whole dscription, it seems that you are trying to 
reallocating clusters and copy them and you also need to handling extent 
record merging. So you may take a reference on ocfs2_insert_extent in 
libocfs2.
3. I am just wondering why you need to do all these so complicated. Why 
just copy it to another file, restore its name and delete the old one? 
It should work OK. If you are worried about the space(I see you also 
allocate some blocks before your data moving), maybe you just need to 
allocate some blocks(the same as your original design) and coping it and 
free the space in the old file, and go on. ocfs2 now supports punching 
holes(if I remember correct), so you can free clusters in any place of a 
file.

wengang wang wrote:
> design doc of offline de-fragment on files.
> 
> http://oss.oracle.com/osswiki/OCFS2/DesignDocs/defragmentationonfile
> 
> thanks,
> wengang.
> 
> 
> _______________________________________________
> 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