linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <bcopeland@gmail.com>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: readdir on hash filesystems
Date: Thu, 22 Sep 2005 14:09:10 -0400	[thread overview]
Message-ID: <b6c5339f05092211091d1f5902@mail.gmail.com> (raw)
In-Reply-To: <17201.49432.28348.486601@gargle.gargle.HOWL>

>  > have any idea which node I want along the hash chain without counting
>  > up f_pos nodes in the tree.
>
> One possible solution is to use lower 24 bits of f_pos to store an index
> within given hash chain, and next 8 bits to store index of hash chain:
>
> int hchain = file->f_pos >> 24 & 0xff;
> int hindex = file->f_pos & 0xffffff;

Good idea, this works much better.   In practice the chains are five
or six files long, so a few seeks on entry to readdir is not too bad,
considering.

Thanks,
Bob

      reply	other threads:[~2005-09-22 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-21 17:46 readdir on hash filesystems Bob Copeland
2005-09-21 20:22 ` Nikita Danilov
2005-09-22 18:09   ` Bob Copeland [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=b6c5339f05092211091d1f5902@mail.gmail.com \
    --to=bcopeland@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nikita@clusterfs.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;
as well as URLs for NNTP newsgroup(s).