[Ocfs2-tools-devel] a patch for fswreck of ocfs2-tools

Sunil Mushran Sunil.Mushran at oracle.com
Tue Aug 29 17:43:47 PDT 2006


Joel you want to look at the flag: OCFS2_FLAG_NOT_REUSE_EXTENT_REC

I don't have a problem with it, but I want others to also review it.

Other than that the patch looks good.

tao.ma wrote:
> Hi all,
>    There is a tool named fswreck in ocfs2-tools. It is designed to 
> corrupt the disk and verify fsck.ocfs2's function. This patch is the 
> first part of fswreck I modify for creating error of EB_BLKNO, EB_GEN, 
> EB_GEN_FIX, EXTENT_EB_INVALID,EXTENT_LIST_DEPTH, EXTENT_LIST_COUNT, 
> EXTENT_LIST_FREE, EXTENT_BLKNO_UNALIGNED, EXTENT_CLUSTERS_OVERRUN, 
> EXTENT_BLKNO_RANGE.
> Because there are too many error types(more than 70) that fsck.ocfs2 
> want to correct, so I divide them to different groups and corrupt them 
> group by group(For group information, please refer to fsck_type.h I add).
> the usage of this program is fswreck -c num devicename. Since there 
> are already 12 types of corrupt before my work, my group corruption 
> starts from 13.
>
> This patch corrupt the following groups:
> 13 - extent block error: EB_BLKNO, EB_GEN, EB_GEN_FIX, EXTENT_EB_INVALID
> 14 - extent list error: EXTENT_LIST_DEPTH, EXTENT_LIST_COUNT, 
> EXTENT_LIST_FREE
> 15 - extent record error: EXTENT_BLKNO_UNALIGNED, 
> EXTENT_CLUSTERS_OVERRUN, EXTENT_BLKNO_RANGE
>
> So if you input "fswreck -c 13 /dev/sdb1", it will corrput /dev/sdb1 
> and make errors of EB_BLKNO, EB_GEN, EB_GEN_FIX, EXTENT_EB_INVALID. 
> For 14 and 15, they are similiar. Please note that /dev/sdb1 must be 
> formatted as ocfs2 before we run the tool.
>
> I also add a flag in ocfs2_filesys for the convenience of creating a 
> file with extent blocks. With this flag, we can easily make a file use 
> extent block and this file will not take much disk space. And since 
> now this flag is only set by my fswreck, I think this will not affect 
> other lib functions.
>
> This patch is a bit longer, so please be patient to review it. :)
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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