All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Huan <zhhuan@gmail.com>
To: linux-ext4@vger.kernel.org
Subject: Question on readdir implementation
Date: Tue, 15 Sep 2009 17:57:24 +0800	[thread overview]
Message-ID: <20090915095724.GA8440@zhanghuan.nrchpc.ac.cn> (raw)

Hi all,

I'm reading EXT4 codes and has some questions about readdir
implementation.

Why traverse the directory in hash order? This brings lots of code to
build and traverse a red-black tree. Why not just plainly traverse the
directory's blocks?

Since the red-black tree is built every time a NFS readdir request comes
in, in case of hash collision, the nfs client may receive duplicate dir
entries if the buffer is not large enough to return all entries with the
same hash value in once.

Thanks.

-- 
Zhang Huan

             reply	other threads:[~2009-09-15  9:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15  9:57 Zhang Huan [this message]
2009-09-15 14:41 ` Question on readdir implementation Andreas Dilger
2009-09-15 14:53 ` Theodore Tso
2009-09-15 17:56   ` Florian Weimer
2009-09-15 18:38     ` Theodore Tso
2009-09-16  5:47   ` Zhang Huan

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=20090915095724.GA8440@zhanghuan.nrchpc.ac.cn \
    --to=zhhuan@gmail.com \
    --cc=linux-ext4@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.