xfs
[Top] [All Lists]

[REVIEW] Refactor xfs_repair's process_dinode_int

To: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>
Subject: [REVIEW] Refactor xfs_repair's process_dinode_int
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Thu, 15 Nov 2007 17:40:41 +1100
Organization: SGI
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Opera Mail/9.24 (Win32)
Implementing casefold-table checking in xfs_repair, I have to
touch process_dinode_int. It's a horrendous function. The attached
patch hopefully makes it much clearer what it does and removes a
lot of duplicate code when bad inodes are found. There are some
obscure bug fixes too (eg. two places where the inode's di_mode is
updated, but not marked dirty - libxfs would have tossed it).

The refactoring involved removing unused variables, working out
what various variables actually did and use them appropriately
and break blocks of functionality into separate functions.

Barry.

Attachment: dinode.patch
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>