From: Chris Mason <chris.mason@fusionio.com>
To: Liu Bo <liubo2009@cn.fujitsu.com>
Cc: Zach Brown <zab@zabbo.net>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/4] Btrfs: use radix tree for checksum
Date: Fri, 6 Jul 2012 11:37:01 -0400 [thread overview]
Message-ID: <20120706153701.GP7159@shiny> (raw)
In-Reply-To: <4FD9437C.3070009@cn.fujitsu.com>
On Wed, Jun 13, 2012 at 07:50:52PM -0600, Liu Bo wrote:
> On 06/14/2012 12:07 AM, Zach Brown wrote:
>
> >
> >> int set_state_private(struct extent_io_tree *tree, u64 start, u64
> >> private)
> >> {
> > [...]
> >> + ret = radix_tree_insert(&tree->csum, (unsigned long)start,
> >> + (void *)((unsigned long)private<< 1));
> >
> > Will this fail for 64bit files on 32bit hosts?
>
>
> In theory it will fail, but crc32c return u32, so private will be originally u32,
> and it'd be ok on 32bit hosts.
The (unsigned long)start part looks wrong though. This is the byte offset
from 0, so on a 32 bit machine you won't be able to have large files.
The page cache also has this limitation, but it gains extra bits
counting page indexes instead of byte indexes.
I've made that change here and I'm benchmarking it on my big flash ;)
-chris
next prev parent reply other threads:[~2012-07-06 15:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 10:19 [PATCH 0/4 v2][RFC] apply rwlock for extent state Liu Bo
2012-06-13 10:19 ` [PATCH 1/4] Btrfs: use radix tree for checksum Liu Bo
2012-06-13 16:07 ` Zach Brown
2012-06-14 1:50 ` Liu Bo
2012-06-14 16:42 ` Zach Brown
2012-07-06 15:37 ` Chris Mason [this message]
2012-07-07 7:43 ` Liu Bo
2012-06-14 15:03 ` David Sterba
2012-06-13 10:19 ` [PATCH 2/4] Btrfs: merge adjacent states as much as possible Liu Bo
2012-06-13 10:19 ` [PATCH 3/4] Btrfs: use large extent range for read and its endio Liu Bo
2012-06-14 16:12 ` David Sterba
2012-06-15 1:50 ` Liu Bo
2012-06-13 10:19 ` [PATCH 4/4] Btrfs: apply rwlock for extent state Liu Bo
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=20120706153701.GP7159@shiny \
--to=chris.mason@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=liubo2009@cn.fujitsu.com \
--cc=zab@zabbo.net \
/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).