[Ocfs2-tools-devel] [PATCH 08/11] fsck.ocfs2 now know inline data.
Tao Ma
tao.ma at oracle.com
Fri Jul 25 02:08:12 PDT 2008
Joel Becker wrote:
> On Wed, Jul 23, 2008 at 06:52:27AM +0800, Tao Ma wrote:
>> + if (di->i_dyn_features & OCFS2_INLINE_DATA_FL) {
>> + expected = ocfs2_max_inline_data(fs->fs_blocksize);
>> +
>> + /* i_size is checked for symlinks elsewhere */
>> + if (di->i_size > expected &&
>> + prompt(ost, PY, PR_INODE_SIZE, "Inode %"PRIu64
>> + " has a size of %"PRIu64" which exceeds the max "
>> + " inline data size %"PRIu64". "
>> + "Correct the file size?",
>> + (uint64_t)di->i_blkno, (uint64_t)di->i_size,
>> + expected)) {
>> + di->i_size = expected;
>> + o2fsck_write_inode(ost, blkno, di);
>> + }
>> +
>> + if (di->i_clusters > 0 &&
>> + prompt(ost, PY, PR_INODE_CLUSTERS,
>> + "Inode %"PRIu64" has %"PRIu32" clusters but it has "
>> + "inline data flag set. "
>> + "Correct the number of clusters?",
>> + (uint64_t)di->i_blkno, di->i_clusters)) {
>> + di->i_clusters = 0;
>> + o2fsck_write_inode(ost, blkno, di);
>> + }
>
> This looks like Mark, you, and I discussed, but there's one
> other problem - you aren't checking for FEATURE_INCOMPAT_INLINE_DATA.
> So, when you first look at the inode, you should check the feature. If
> the feature isn't set but i_dyn_flags has INLINE_DATA_FL, you should ask
> about clearing it.
> By doing this up front, you can let all your other checks just
> check i_dyn_flags; you won't have to check s_feature_incompat
> everywhere.
yes, you are right. I will modify it.
One more thing, I forget to add the check of id_count you have mentioned
before, will add it also.Thanks.
Regards,
Tao
More information about the Ocfs2-tools-devel
mailing list