[PATCH v4, 01/16] xfsprogs: metadump: some names aren't all that special

Dave Chinner david at fromorbit.com
Wed Mar 2 23:10:23 CST 2011


On Fri, Feb 25, 2011 at 12:13:37PM -0600, Alex Elder wrote:
> Move the check for short names out of is_special_dirent() and into
> generate_obfuscated_name().  That way the check is more directly
> associated with the algorithm that requires it.
> 
> Similarly, move the check for inode == 0, since that case has to do
> with storing extended attributes (not files) in the name table.
> 
> As a result, is_special_dirent() is really only focused on whether a
> given file is in the lost+found directory.  Rename the function to
> reflect its more specific purpose.
> 
> Signed-off-by: Alex Elder <aelder at sgi.com>
> 
> Updates (v3):
> - The previous version did not properly skip the "lost+found"
>   directory itself; this one does.
> - Created a new definition representing the name of the orphanage
>   directory.  Encapsulate recognizing that directory into a new
>   macro, is_lost_found().
> - Removed casts that eliminate a compile warning in calls to
>   libxfs_da_hashname(); will do them separately later if needed.
> Updates (v4):
> - Renamed is_lost_found() to be is_orphanage_dir(), and turned
>   it into an inline static function.
> - Added parentheses around targets of the sizeof operation.
> - Added a small bit of clarifying commentary in spots where
>   it was suggested.

Reviewed-by: Dave Chinner <dchinner at redhat.com>

-- 
Dave Chinner
david at fromorbit.com




More information about the xfs mailing list