[PATCH v3, 10/16] xfsprogs: metadump: encapsulate the nametable code

Dave Chinner david at fromorbit.com
Wed Feb 23 20:00:25 CST 2011


On Fri, Feb 18, 2011 at 03:21:01PM -0600, Alex Elder wrote:
> The name table used to find duplicates in metadump.c is allocated
> dynamically, but there's no real need to do so.  Just make it a BSS
> global array and drop the initialization call.
> 
> Meanwhile, encapsulate the code that adds entries to and looks up
> entries in the table into their own functions.  Use the lookup
> function to detect a duplicate name in a case not previously
> checked.
> 
> Change the naming scheme to use "nametable" as a prefix rather than
> a suffix.
> 
> Finally, now that it's easy to do so, issue a warning if we find
> that we're falling back to not obfuscating the name, but that name
> has already been used in the current directory.  (This can happen if
> a obfuscated earlier happens to match a subsequently found "real"
> name.)
> 
> Signed-off-by: Alex Elder <aelder at sgi.com>

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




More information about the xfs mailing list