aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_priv.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-28 13:01:03 +1100
committerBen Myers <bpm@sgi.com>2012-12-03 12:10:59 -0600
commitf9668a09e32ac6d2aa22f44cc310e430a8f4a40f (patch)
treefa17dca528099f33b92b8a8d5018e59628e9bc90 /fs/xfs/xfs_log_priv.h
parentxfs: fix stray dquot unlock when reclaiming dquots (diff)
downloadlinux-dev-f9668a09e32ac6d2aa22f44cc310e430a8f4a40f.tar.xz
linux-dev-f9668a09e32ac6d2aa22f44cc310e430a8f4a40f.zip
xfs: fix sparse reported log CRC endian issue
Not a bug as such, just warning noise from the xlog_cksum() returning a __be32 type when it should be returning a __le32 type. On Wed, Nov 28, 2012 at 08:30:59AM -0500, Christoph Hellwig wrote: > But why are we storing the crc field little endian while all other on > disk formats are big endian? (And yes I realize it might as well have > been me who did that back in the idea, but I still have no idea why) Because the CRC always returns the calcuation LE format, even on BE systems. So rather than always having to byte swap it everywhere and have all the force casts and anootations for sparse, it seems simpler to just make it a __le32 everywhere.... Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Ben Myers <bpm@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r--fs/xfs/xfs_log_priv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index dc3498bf17c2..16d8d12ea3b4 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;