From: Pavel Machek <pavel@ucw.cz>
To: jaegeuk@kernel.org, yuchao0@huawei.com,
linux-f2fs-devel@lists.sourceforge.net,
kernel list <linux-kernel@vger.kernel.org>,
sfr@canb.auug.org.au, david@ixit.cz
Subject: Re: f2fs compile problem in next-20191220 on x86-32
Date: Wed, 25 Dec 2019 14:04:56 +0100 [thread overview]
Message-ID: <20191225130456.GA18929@duo.ucw.cz> (raw)
In-Reply-To: <20191222154917.GA22964@amd>
[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]
On Sun 2019-12-22 16:49:17, Pavel Machek wrote:
> Hi!
>
> I'm getting this:
>
> LD .tmp_vmlinux1
> ld: fs/f2fs/file.o: in function `f2fs_truncate_blocks':
> file.c:(.text+0x2968): undefined reference to `__udivdi3'
> make: *** [Makefile:1079: vmlinux] Error 1
>
> when attempting to compile kernel for x86-32.
David bisected it:
https://bugzilla.kernel.org/show_bug.cgi?id=205967
And the bug is actually easy to see:
+int f2fs_truncate_blocks(struct inode *inode, u64 from, bool lock)
+{
+ u64 free_from = from;
+
+ /*
+ * for compressed file, only support cluster size
+ * aligned truncation.
+ */
+ if (f2fs_compressed_file(inode)) {
+ size_t cluster_size = PAGE_SIZE <<
+ F2FS_I(inode)->i_log_cluster_size;
+
+ free_from = roundup(from, cluster_size);
#define roundup(x, y) ( \
{ \
typeof(y) __y = y; \
(((x) + (__y - 1)) / __y) * __y; \
} \
div64 is needed instead of div in the roundup macro. Or actually... It
is quite stupid to use roundup like this on value that is power of
two, right?
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2019-12-25 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 15:49 f2fs compile problem in next-20191220 on x86-32 Pavel Machek
2019-12-25 13:04 ` Pavel Machek [this message]
2019-12-26 1:32 ` Chao Yu
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=20191225130456.GA18929@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=david@ixit.cz \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=yuchao0@huawei.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