From: Jens Axboe <jens.axboe@oracle.com>
To: Yien Zheng <esprout@gmail.com>
Cc: linux-btrfs@vger.kernel.org, Josef Bacik <jbacik@redhat.com>
Subject: Re: [PATCH] Btrfs: take block group fragmentation into account for allocation
Date: Sun, 8 Mar 2009 17:37:07 +0100 [thread overview]
Message-ID: <20090308163707.GC11787@kernel.dk> (raw)
In-Reply-To: <2c259a8f0903080742l6e2f6233g709b036281bf962c@mail.gmail.com>
On Sun, Mar 08 2009, Yien Zheng wrote:
> I tried applying this patch, but the fragmentation_percent function is
> giving me:
>
> WARNING: "__udivdi3"
> [/home/partition6/yien/git/linux-git/fs/btrfs/btrfs.ko] undefined!
>
> when I compile, and the module fails to load, even though the build
> completes. I've traced it to the calculation of max_fragments:
>
> max_fragments = (block_group->key.offset -
> btrfs_block_group_used(&block_group->item)) /
> block_group->fragment_size;
>
> It seems that accessing block_group in here is causing a reference to
> __udivdi3 somehow. Any idea what's going on here?
You can't to 64-bit divides on 32-bit archs. Make that
max_fragments = block_group->key.offset - btrfs_block_group_used(&block_group->item);
do_div(max_fragments, block_group->fragment_size);
and it should work.
--
Jens Axboe
next prev parent reply other threads:[~2009-03-08 16:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 14:42 [PATCH] Btrfs: take block group fragmentation into account for allocation Yien Zheng
2009-03-08 16:37 ` Jens Axboe [this message]
2009-03-09 2:03 ` Yien Zheng
2009-03-09 13:56 ` Simon Holm Thøgersen
2009-03-09 15:21 ` Oliver Mattos
2009-03-09 15:24 ` Josef Bacik
2009-03-09 17:29 ` jim owens
-- strict thread matches above, loose matches on Subject: below --
2009-03-06 19:30 Josef Bacik
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=20090308163707.GC11787@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=esprout@gmail.com \
--cc=jbacik@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox