From: David Sterba <dsterba@suse.cz>
To: Filipe David Borba Manana <fdmanana@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] Btrfs: improve inode hash function/inode lookup
Date: Fri, 11 Oct 2013 13:42:29 +0200 [thread overview]
Message-ID: <20131011114229.GE5787@twin.jikos.cz> (raw)
In-Reply-To: <1381094553-2190-1-git-send-email-fdmanana@gmail.com>
On Sun, Oct 06, 2013 at 10:22:33PM +0100, Filipe David Borba Manana wrote:
> 2) On 32 bits machines. Th VFS hash values are unsigned longs, which
> are 32 bits wide on 32 bits machines, and the inode (objectid)
> numbers are 64 bits unsigned integers. We simply cast the inode
> numbers to hash values, which means that for all inodes with the
> same 32 bits lower half, the same hash bucket is used for all of
> them. For example, all inodes with a number (objectid) between
> 0x0000_0000_ffff_ffff and 0xffff_ffff_ffff_ffff will end up in
> the same hash table bucket.
Well, inode number that does not fit into 32 bits on a 32 bit machine
causes other problems. And subvolume ids that do not fit into 32 bits
cannot be stored in radix tree.
It would be safer to refuse creating/accessing inode/subvolume with
nubmer that does not fit into 32bits.
david
next prev parent reply other threads:[~2013-10-11 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-06 20:53 [PATCH] Btrfs: improve inode hash function/inode lookup Filipe David Borba Manana
2013-10-06 21:22 ` [PATCH v2] " Filipe David Borba Manana
2013-10-11 11:42 ` David Sterba [this message]
2013-10-11 17:20 ` Filipe David Manana
2013-10-21 23:21 ` David Sterba
2013-10-21 23:27 ` Filipe David Manana
2013-10-22 17:04 ` David Sterba
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=20131011114229.GE5787@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=fdmanana@gmail.com \
--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.