[Ocfs2-tools-devel] [PATCH 1/4] Ocfs2-tools: Classify duplicate prompt codes in fsck.ocfs2.
tristan.ye
tristan.ye at oracle.com
Thu Jul 2 18:30:21 PDT 2009
On Thu, 2009-07-02 at 14:05 -0700, Joel Becker wrote:
> [Sorry it took me so long to review these]
>
> On Fri, Jun 26, 2009 at 10:49:19AM +0800, Tristan Ye wrote:
> > fsck.ocfs2 is supposed to only use each prompt code once. However,
> > about four of the codes are used in multiple places. We therefore
> > should make distinct codes for each case.
> >
> > Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> > ---
> > fsck.ocfs2/fsck.ocfs2.checks.8.in | 68 ++++++++++++++++++++++++++++++++++--
> > fsck.ocfs2/journal.c | 6 ++--
> > fsck.ocfs2/pass1.c | 8 ++--
> > fsck.ocfs2/xattr.c | 7 ++--
> > 4 files changed, 75 insertions(+), 14 deletions(-)
> >
> > diff --git a/fsck.ocfs2/fsck.ocfs2.checks.8.in b/fsck.ocfs2/fsck.ocfs2.checks.8.in
> > index b780561..2b8627f 100644
> > --- a/fsck.ocfs2/fsck.ocfs2.checks.8.in
> > +++ b/fsck.ocfs2/fsck.ocfs2.checks.8.in
> > @@ -473,6 +473,24 @@ Answering yes to this question updates the inode's i_size to match the amount
> > of data referenced by the extent lists. It is vitally important that i_size
> > matches the extent lists and so answering yes is strongly encouraged.
> >
> > +.SS "INODE_SPARSE_SIZE"
> > +Certain inodes record the size of the data they reference in an i_size field.
> > +This can be the number of bytes in a file, directory, or symlink target
> > +which are stored in data mapped by extents of clusters. This error occurs
> > +when the extent lists are walked and the amount of data found does not match
> > +what is stored in i_size.
>
> Add "A sparse inode was found that had data allocated past its
> i_size."
>
> > +Answering yes to this question updates the inode's i_size to match the amount
> > +of data referenced by the extent lists. It is vitally important that i_size
> > +matches the extent lists and so answering yes is strongly encouraged.
>
> "Answering yes to this question will update the inode's i_size
> to cover all of its allocated storage. It is vitally ..."
>
> > +.SS "INODE_INLINE_SIZE"
> > +Inlined inodes store the max inline data size in i_size, this error occurs
> > +when the file size of an inlined inode exceeds the max inline data size.
>
> "Inodes can only fit a certain amount of inline data. This inode has
> its data inline but claims an i_size larger than will actually fit."
>
> > +Answering yes to this question updates the inode's i_size to max inline data
> > +size.
>
> ... "updates the inode's i_size to the maximum available inline space."
>
>
> > +
> > .SS "INODE_CLUSTERS"
> > Inodes contain a record of how many clusters are allocated to them. An inode
> > was found whose recorded number of clusters doesn't match the number of blocks
> > @@ -481,6 +499,20 @@ that were found associated with the inode.
> > Answering yes resets the inode's number of clusters to reflect the number
> > of blocks that were associated with the file.
> >
> > +.SS "INODE_SPARSE_CLUSTERS"
> > +Inodes contain a record of how many clusters are allocated to them. An inode
> > +was found whose recorded number of clusters doesn't match the number of blocks
> > +that were found associated with the inode.
>
> "A sparse inode was found"
>
> > +Answering yes resets the inode's number of clusters to reflect the number
> > +of blocks that were associated with the file.
> > +
> > +.SS "INODE_INLINE_CLUSTERS"
> > +Inlined inode should not have allocated clusters. An inode who has inline data
> > +flag set was found with clusters allocated.
> > +
> > +Answering yes resets the inode's number of clusters to zero.
> > +
> > .SS "LALLOC_REPAIR"
> > An active local allocator did not accurately reflect the set of clusters that
> > are free and in use in its region.
> > @@ -710,10 +742,28 @@ Answering yes creates the orphan directory in the system directory.
> >
> > .SS "JOURNAL_FILE_INVALID"
> > OCFS2 uses JDB for journalling and some journal files exist in the
> > -system directory. Fsck has found some journal file is whether empty or has
> > -bad journal superblock and would like to fix it for future use.
> > +system directory. Fsck has found some journal files are invalid.
>
> "... journal files that are invalid."
>
> > +Answering yes to regenerate the journal file.
>
> "Answering yes to this question will regenerate the invalid
> journal files."
>
> > +.SS "JOURNAL_UNKNOWN_FEATURE"
> > +Fsck has found some journal files have unknown features, however, other
> > +journals have only known features, so this is likely a corruption.
> > +If you think your filesystem may be newer than this version of fsck.ocfs2,
> > +say N here and grab the latest version of fsck.ocfs2.
>
> "... some journal files with unknown features. Other journals
> on the filesystem have only known features, so this is likely a
> corruption. If you ..."
>
> > +Answering yes resets the journal features to math other journals.
>
> "match other journals"
>
> > +.SS "JOURNAL_MISS_FEATURE"
>
> JOURNAL_MISSING_FEATURE
>
> > +Fsck has found some journal files are missing features that are set on
> > +other journal files.
>
> "Some journal files have features that are not set on all
> journal files. All journals on a filesystem should have the same set of
> features."
>
> > -Answering yes reformats the journal file in the system directory.
> > +Answering yes sets these missing features.
>
> "Answering yes will set all journals to the union of set
> features."
>
> > +.SS "JOURNAL_TOO_SMALL"
> > +Fsck has found some journal files are too small.
> > +
> > +Answering yes extends these journals.
> >
> > .SS "RECOVER_CLUSTER_INFO"
> > The currently active cluster stack is different than the one the filesystem
> > @@ -752,12 +802,22 @@ does not match the number of entries found by fsck.
> >
> > Answering yes will change this to the correct count.
> >
> > -.SS "XATTR_OFFSET_INVALID"
> > +.SS "XATTR_ENTRY_INVALID"
> > +Extended attribute entry refers to a used area.
>
> "An extended attribute entry points to already used space."
>
> > +Answering yes will remove this entry.
> > +
> > +.SS "XATTR_NAME_OFFSET_INVALID"
> > The name_offset field of an extended attribute entry is not correct.
> > Without a correct name_offset field, the entry cannot be used.
> >
> > Answering yes will remove this entry.
> >
> > +.SS "XATTR_VALUE_INVALID"
> > +Extended attribute entry's value/name pair refers to a used area.
>
> "The value region of an extended attribute points to already
> used space."
>
> > +Answering yes will remove this entry.
> > +
> > .SS "XATTR_LOCATION_INVALID"
> > The xe_local field and xe_value_size field of an extended attribute
> > entry does not match. So the entry cannot be used.
>
Your description seems more clear and descriptive, sorry for my poor
understanding:-(.
I'll change it accordingly.
Tristan.
>
> The code changes look fine.
>
> Joel
>
More information about the Ocfs2-tools-devel
mailing list