[PATCH v4, 09/16] xfsprogs: metadump: don't loop on too many dups
Dave Chinner
david at fromorbit.com
Wed Mar 2 23:07:31 CST 2011
On Fri, Feb 25, 2011 at 12:13:44PM -0600, Alex Elder wrote:
> Don't just loop indefinitely when an obfuscated name comes up as a
> duplicate. Count the number of times we've found a duplicate and if
> if it gets excessive despite choosing names at random, just give up
> and use the original name without obfuscation.
>
> Technically, a typical 5-character name has 255 other names that can
> have the same hash value. But the algorithm doesn't hit all
> possible names (far from it) so duplicates are still possible.
>
> Signed-off-by: Alex Elder <aelder at sgi.com>
> Reviewed-by: Dave Chinner <dchinner at redhat.com>
>
> Updates (v4):
> - Rearranged things a bit so that if too many duplicates are
> encountered, a warning gets emitted.
>
> Dave already signed off on it but the update was different enough I
> thought I should post it once more.
Reviewed-by: Dave Chinner <dchinner at redhat.com>
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list