public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: Michael Monnerie <michael.monnerie@is.it-management.at>
Cc: xfs@oss.sgi.com
Subject: Re: XFS Filename Hash and metadump
Date: Thu, 07 Oct 2010 16:41:49 -0500	[thread overview]
Message-ID: <1286487709.2670.407.camel@doink> (raw)
In-Reply-To: <201010052328.34390@zmi.at>

On Tue, 2010-10-05 at 23:28 +0200, Michael Monnerie wrote:
> On Dienstag, 5. Oktober 2010 Alex Elder wrote:
> > PS  Two more observations:
> >     - There is really no need for the characters to be truly random.
> >       Making the generated name unique and different from the
> >       original is sufficient.  So (with the exception of the last
> >       five bytes) we can select the characters however we like.
> >       They could be a sequential series of names, for example,
> >       rather than computing a random value for each.
> 
> I was thinking the same when reading your description. Why not simply 
> "number" the file names from 1 to whatever count of files/dirs there is 
> within that dir?
> 

I'm not entirely sure how best to implement it, and I'm open to
suggestions.

As a starting point, I will make it so the random characters making
up the first part of the name are printable, and could probably restrict
it even more than that (say, using lower-case alphabetic and numeric
characters).

A scheme with incrementing file names would need to accomodate names of
arbitrary length, too, and it might be better to make the varying part
be at the front of such names.

We need to be aware that there could be duplicates (filenames hashing
to the same value), even though that's unlikely.

In any case the last four and a half bytes of the name will need to
be in the full 8-bit range to make the hash work out right.

I have a few ideas for all of the above.  They didn't get out in my
first draft of the patch series because like I said I wanted to get
early feedback rather than waiting to get other stuff implemented.

					-Alex

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2010-10-07 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 14:55 XFS Filename Hash and metadump Alex Elder
2010-10-05 21:28 ` Michael Monnerie
2010-10-07 21:41   ` Alex Elder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286487709.2670.407.camel@doink \
    --to=aelder@sgi.com \
    --cc=michael.monnerie@is.it-management.at \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox