[Ocfs2-tools-devel] [PATCH 2/3] Ocfs2-tools: Implement new prompt codes of sparse file for fswreck.
Tao Ma
tao.ma at oracle.com
Wed Jul 1 01:03:58 PDT 2009
Tao Ma wrote:
> Hi tristan,
>
>> + if ((type == INODE_SPARSE_SIZE) || (type == INODE_SPARSE_CLUSTERS)) {
>> +
>> + sb_blk = (char *)fs->fs_super;
>> + sb_di = (struct ocfs2_dinode *)sb_blk;
>> + if (!(sb_di->id2.i_super.s_feature_incompat &
>> + OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC)) {
>> +
>> + sb_di->id2.i_super.s_feature_incompat |= OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC;
>> + ret = ocfs2_write_inode(fs, OCFS2_SUPER_BLOCK_BLKNO,
>> + sb_blk);
>> + if (ret)
>> + FSWRK_COM_FATAL(progname, ret);
>> + }
>> + }
> Here you change the feature bit in the super block. But this will affect
> our fswreck codes which run the test with the same volume, right? I am
> not sure whether it is OK for other codes.
>
> And you also need to handle endian problem here.
Oh, I just found thar ocfs2_write_inode handle even the ocfs2_super's
endian exchange. So this isn't a problem any more. Sorry for that.
Regards,
Tao
More information about the Ocfs2-tools-devel
mailing list