linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Miao Xie <miaox@cn.fujitsu.com>,
	Chris Mason <chris.mason@oracle.com>,
	linux-btrfs@vger.kernel.org,
	Linux Kernel Development <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] btrfs: Correct printing of sector_t
Date: Wed, 01 Dec 2010 09:33:25 +0800	[thread overview]
Message-ID: <4CF5A5E5.5040404@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1011302128450.6502@ayla.of.borg>

Geert Uytterhoeven wrote:
> If CONFIG_LBDAF=3Dy, `sector_t' becomes `u64' instead of `unsigned lo=
ng':
>=20
> fs/btrfs/inode.c: In function =A1btrfs_end_dio_bio=A2:
> fs/btrfs/inode.c:5717: warning: format =A1%lu=A2 expects type =A1long=
 unsigned int=A2, but argument 4 has type =A1sector_t=A2
>=20
> Hence always cast it to `unsigned long long' for printing.
>=20
> Introduced by commit e65e1535542931e51189832264cd282e5899e4b9 ("btrfs=
: fix
> panic caused by direct IO")
>=20
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

While we are at this..

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

[PATCH] btrfs: Fix compile warning when CONFIG_MIGRATION is not set

=46ix this newly introduced warning:

fs/btrfs/disk-io.c:699: warning: 'btree_migratepage' defined but not us=
ed

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 fs/btrfs/disk-io.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 33b6d45..7648247 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -696,6 +696,7 @@ static int btree_submit_bio_hook(struct inode *inod=
e, int rw, struct bio *bio,
 				   __btree_submit_bio_done);
 }
=20
+#ifdef CONFIG_MIGRATION
 static int btree_migratepage(struct address_space *mapping,
 			struct page *newpage, struct page *page)
 {
@@ -712,12 +713,10 @@ static int btree_migratepage(struct address_space=
 *mapping,
 	if (page_has_private(page) &&
 	    !try_to_release_page(page, GFP_KERNEL))
 		return -EAGAIN;
-#ifdef CONFIG_MIGRATION
+
 	return migrate_page(mapping, newpage, page);
-#else
-	return -ENOSYS;
-#endif
 }
+#endif
=20
 static int btree_writepage(struct page *page, struct writeback_control=
 *wbc)
 {
--=20
1.6.3

      parent reply	other threads:[~2010-12-01  1:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30 20:30 [PATCH] btrfs: Correct printing of sector_t Geert Uytterhoeven
2010-11-30 20:33 ` Randy Dunlap
2010-12-01  1:33 ` Li Zefan [this message]

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=4CF5A5E5.5040404@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miaox@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).