* [next-rc] Compile Error fs/btrfs/diskio.c
@ 2010-11-27 22:53 Mitch Harder
2010-11-29 15:41 ` Chris Mason
0 siblings, 1 reply; 2+ messages in thread
From: Mitch Harder @ 2010-11-27 22:53 UTC (permalink / raw)
To: linux-btrfs
I've been getting a compile error when building the 'next-rc' branch
of btrfs-unstable.
CC fs/btrfs/disk-io.o
fs/btrfs/disk-io.c: In function =91btree_migratepage=92:
fs/btrfs/disk-io.c:716: error: called object =910u=92 is not a function
make[2]: *** [fs/btrfs/disk-io.o] Error 1
make[1]: *** [fs/btrfs] Error 2
make: *** [fs] Error 2
Line 716 of fs/btrfs/disk-io.c is:
return migrate_page(mapping, newpage, page);
This is related to the "Btrfs: add migrate page for metadata inode"
patch (the first patch in the set of patches added to the next-rc
branch).
When I configure my kernel with CONFIG_MEMORY_HOTPLUG=3Dn, this
automatically unconfigures CONFIG_MIGRATION.
In include/linux/migrate.h, when CONFIG_MIGRATION is not set,
migrate_page is defined as NULL:
/* Possible settings for the migrate_page() method in address_operation=
s */
#define migrate_page NULL
So in this case, migrate_page is defined as NULL instead of as a
function (hence, the "called object is not a function" error).
I've confirmed that setting CONFIG_MEMORY_HOTPLUG=3Dy and
CONFIG_MIGRATION=3Dy is a workaround to clear the error.
As a possible fix, I've wrapped a "#ifdef CONFIG_MIGRATION" statement
around part of the patch, and it seems to be working OK for me. Let
me know if you want this patch submitted as a git patch, although it
might make more sense to fix the original patch since it's still early
in 'next-rc' review period.
$ diff -Nau fs/btrfs/disk-io.c /usr/src/linux/fs/btrfs/disk-io.c
--- fs/btrfs/disk-io.c 2010-11-27 15:59:22.896666675 -0600
+++ /usr/src/linux/fs/btrfs/disk-io.c 2010-11-27 16:08:15.643333349 -06=
00
@@ -696,6 +696,7 @@
__btree_submit_bio_done);
}
+#ifdef CONFIG_MIGRATION
static int btree_migratepage(struct address_space *mapping,
struct page *newpage, struct page *page)
{
@@ -715,6 +716,9 @@
return migrate_page(mapping, newpage, page);
}
+#else
+#define btree_migratepage NULL
+#endif
static int btree_writepage(struct page *page, struct writeback_control=
*wbc)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [next-rc] Compile Error fs/btrfs/diskio.c
2010-11-27 22:53 [next-rc] Compile Error fs/btrfs/diskio.c Mitch Harder
@ 2010-11-29 15:41 ` Chris Mason
0 siblings, 0 replies; 2+ messages in thread
From: Chris Mason @ 2010-11-29 15:41 UTC (permalink / raw)
To: Mitch Harder; +Cc: linux-btrfs
Excerpts from Mitch Harder's message of 2010-11-27 17:53:23 -0500:
> I've been getting a compile error when building the 'next-rc' branch
> of btrfs-unstable.
>=20
> CC fs/btrfs/disk-io.o
> fs/btrfs/disk-io.c: In function =E2=80=98btree_migratepage=E2=80=99:
> fs/btrfs/disk-io.c:716: error: called object =E2=80=980u=E2=80=99 is =
not a function
> make[2]: *** [fs/btrfs/disk-io.o] Error 1
> make[1]: *** [fs/btrfs] Error 2
> make: *** [fs] Error 2
>=20
> Line 716 of fs/btrfs/disk-io.c is:
>=20
> return migrate_page(mapping, newpage, page);
>=20
> This is related to the "Btrfs: add migrate page for metadata inode"
> patch (the first patch in the set of patches added to the next-rc
> branch).
I've pushed out a similar fix in the next-rc branch and the master
branch. Waiting on korg mirrors to update before I send the pull
request.
Thanks!
-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-29 15:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-27 22:53 [next-rc] Compile Error fs/btrfs/diskio.c Mitch Harder
2010-11-29 15:41 ` Chris Mason
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).