From: Harvey Harrison <harvey.harrison@gmail.com>
To: Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH-possible bugfix] xfs: ensure extents are read as be64
Date: Mon, 14 Apr 2008 20:28:51 -0700 [thread overview]
Message-ID: <1208230131.11920.59.camel@brick> (raw)
The debug code reads the extents in cpu-order rather than BE. Make the
debug code match.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
Possibly 2.6.25 material....if it actually is a bug. See elsewhere
in the same file that reads as be64. (look for ep->l0).
fs/xfs/xfs_inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index f43a6e0..eacf2ca 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -85,8 +85,8 @@ xfs_validate_extents(
for (i = 0; i < nrecs; i++) {
xfs_bmbt_rec_host_t *ep = xfs_iext_get_ext(ifp, i);
- rec.l0 = get_unaligned(&ep->l0);
- rec.l1 = get_unaligned(&ep->l1);
+ rec.l0 = be64_to_cpu(get_unaligned(&ep->l0));
+ rec.l1 = be64_to_cpu(get_unaligned(&ep->l1));
xfs_bmbt_get_all(&rec, &irec);
if (fmt == XFS_EXTFMT_NOSTATE)
ASSERT(irec.br_state == XFS_EXT_NORM);
--
1.5.5.144.g3e42
next reply other threads:[~2008-04-15 3:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 3:28 Harvey Harrison [this message]
2008-04-15 4:58 ` [PATCH-possible bugfix] xfs: ensure extents are read as be64 David Chinner
2008-04-15 5:03 ` Harvey Harrison
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=1208230131.11920.59.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@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