linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mitch Harder <mitch.harder@sabayonlinux.org>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: [next-rc] Compile Error fs/btrfs/diskio.c
Date: Sat, 27 Nov 2010 16:53:23 -0600	[thread overview]
Message-ID: <AANLkTi=GVdSTacEVPRqQJu0Fktm8H4aDYfF5wuDDnrH4@mail.gmail.com> (raw)

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

             reply	other threads:[~2010-11-27 22:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-27 22:53 Mitch Harder [this message]
2010-11-29 15:41 ` [next-rc] Compile Error fs/btrfs/diskio.c Chris Mason

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='AANLkTi=GVdSTacEVPRqQJu0Fktm8H4aDYfF5wuDDnrH4@mail.gmail.com' \
    --to=mitch.harder@sabayonlinux.org \
    --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;
as well as URLs for NNTP newsgroup(s).