xfs
[Top] [All Lists]

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

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH v4, 01/16] xfsprogs: metadump: some names aren't all that special
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 3 Mar 2011 16:10:23 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1298657617.1990.6984.camel@doink>
References: <201102182121.p1ILL1T8029031@xxxxxxxxxxxxxxxxxxxxxx> <20110224011837.GO3166@dastard> <1298657617.1990.6984.camel@doink>
User-agent: Mutt/1.5.20 (2009-06-14)
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@xxxxxxx>
> 
> 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@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH v4, 01/16] xfsprogs: metadump: some names aren't all that special, Dave Chinner <=