All of lore.kernel.org
 help / color / mirror / Atom feed
From: Serdar Dere <serdar@serdar-dere.net>
To: linux-btrfs@vger.kernel.org
Subject: How are b+-trees are useind in filesystems
Date: Sun, 06 Feb 2011 17:19:13 +0100	[thread overview]
Message-ID: <4D4ECA01.5040501@serdar-dere.net> (raw)

Hello,

I am new here and I think this is not a real btrfs question but a 
general filesystem-btree question.
I want to know how I do these following things:
- How do I translate "/home/serdar/public_html" -> btree
- how do I know how files/directories are related to each other

I did these with useing a binary tree (not balanced)
where a node owns
name (char*)
value (void*) (was a inode structure)
first_child (pointer)
siblings (pointer)

I was looking for the name seperated with "/"
siblings are in the same directory
first_child is the subdir

for the esample above.
look at root the siblings for home
take his first_child
if first_child is serdar, than take its first_child, else look for 
siblings after finding serdar, take its first_child
if first_child is public_html take this and its value, else look for 
siblings.

I can't do this with b-trees, this is why I asking
I am at this time not interested in data, where it is stored, I can take 
void* for this.

I hope I could explain my problem.
I read many papers and presentations about b-trees most of them at 
btrfs-learning
but they are only btree related how they work and why they are 
interesting for filesystems, but not how to translate the problem above.

I hope you can help me there.

Greetings Serdar

                 reply	other threads:[~2011-02-06 16:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4D4ECA01.5040501@serdar-dere.net \
    --to=serdar@serdar-dere.net \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.