From: Sun YangKai <sunk67188@gmail.com>
To: Mark Harmstone <mark@harmstone.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Newbie questions about DIR_ITEM and DIR_INDEX design
Date: Thu, 21 Aug 2025 18:06:47 +0800 [thread overview]
Message-ID: <4682834.LvFx2qVVIh@saltykitkat> (raw)
In-Reply-To: <32f15414-0ed0-447d-88e0-6368f29a989a@harmstone.com>
> No worries.
>
> It looks like another factor was the fact that the original version of
> getdents() returned a 32-bit d_off on 32-bit systems - which is okay for
> a monotonic counter within a directory, but no good if you want to avoid
> the birthday paradox.
>
> So if you were designing Btrfs from scratch today, you might choose just
> to have DIR_ITEM, change its hash length to 64 bits, and disallow hash
> collisions completely.
This is exactly what I'm thinking. I came up to this because I have a quite
large dir whose size is about 66M on my machine. It works well, but with both
DIR_ITEM and DIR_INDEX, the size is doubled.
>
> Mark
Thanks,
Sun Yangkai
prev parent reply other threads:[~2025-08-21 10:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 13:59 Newbie questions about DIR_ITEM and DIR_INDEX design Sun YangKai
2025-08-20 17:06 ` Mark Harmstone
2025-08-21 8:26 ` Sun YangKai
2025-08-21 9:20 ` Mark Harmstone
2025-08-21 10:06 ` Sun YangKai [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=4682834.LvFx2qVVIh@saltykitkat \
--to=sunk67188@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mark@harmstone.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