From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 4/4] xfs: fix sparse reported log CRC endian issue
Date: Wed, 28 Nov 2012 13:01:03 +1100 [thread overview]
Message-ID: <1354068063-1692-5-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1354068063-1692-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Not a bug as such, just warning noise from the xlog_cksum()
returning a __be32 type when it shoul dbe returning a __le32 type.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/xfs_log.c | 2 +-
fs/xfs/xfs_log_priv.h | 2 +-
fs/xfs/xfs_log_recover.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index c49e2c1..46bd9d5 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1538,7 +1538,7 @@ xlog_pack_data(
* This is a little more complicated than it should be because the various
* headers and the actual data are non-contiguous.
*/
-__be32
+__le32
xlog_cksum(
struct xlog *log,
struct xlog_rec_header *rhead,
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index dc3498b..16d8d12 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -555,7 +555,7 @@ extern int
xlog_recover_finish(
struct xlog *log);
-extern __be32 xlog_cksum(struct xlog *log, struct xlog_rec_header *rhead,
+extern __le32 xlog_cksum(struct xlog *log, struct xlog_rec_header *rhead,
char *dp, int size);
extern kmem_zone_t *xfs_log_ticket_zone;
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 9c3651c..96fcbb8 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3233,15 +3233,15 @@ xlog_unpack_data_crc(
xfs_caddr_t dp,
struct xlog *log)
{
- __be32 crc;
+ __le32 crc;
crc = xlog_cksum(log, rhead, dp, be32_to_cpu(rhead->h_len));
if (crc != rhead->h_crc) {
if (rhead->h_crc || xfs_sb_version_hascrc(&log->l_mp->m_sb)) {
xfs_alert(log->l_mp,
"log record CRC mismatch: found 0x%x, expected 0x%x.\n",
- be32_to_cpu(rhead->h_crc),
- be32_to_cpu(crc));
+ le32_to_cpu(rhead->h_crc),
+ le32_to_cpu(crc));
xfs_hex_dump(dp, 32);
}
--
1.7.10
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-11-28 1:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 2:00 [PATCH 0/4] xfs: patch queue for 3.8 Dave Chinner
2012-11-28 2:01 ` [PATCH 1/4] xfs: fix direct IO nested transaction deadlock Dave Chinner
2012-11-28 13:27 ` Christoph Hellwig
2012-11-28 2:01 ` [PATCH 2/4] xfs: byte range granularity for XFS_IOC_ZERO_RANGE Dave Chinner
2012-11-28 13:33 ` Christoph Hellwig
2012-11-29 0:06 ` Christoph Hellwig
2012-11-29 1:54 ` Dave Chinner
2012-11-29 4:18 ` Dave Chinner
2012-11-29 4:26 ` [PATCH 2/4 V2] " Dave Chinner
2012-11-29 18:19 ` Andrew Dahl
2012-11-30 16:07 ` Christoph Hellwig
2012-11-28 2:01 ` [PATCH 3/4] xfs: fix stray dquot unlock when reclaiming dquots Dave Chinner
2012-11-28 13:28 ` Christoph Hellwig
2012-11-28 2:01 ` Dave Chinner [this message]
2012-11-28 13:30 ` [PATCH 4/4] xfs: fix sparse reported log CRC endian issue Christoph Hellwig
2012-11-28 21:31 ` Dave Chinner
2012-11-29 20:32 ` Ben Myers
2012-11-30 16:03 ` Christoph Hellwig
2012-11-30 16:04 ` Ben Myers
2012-12-03 18:18 ` Ben Myers
2012-11-29 22:29 ` Mark Tinguely
2012-11-29 21:22 ` [PATCH 0/4] xfs: patch queue for 3.8 Ben Myers
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=1354068063-1692-5-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.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