aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-09-27 20:56:51 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 20:56:51 -0400
commite21010053a0f11122db728f82ae115f2808752d6 (patch)
treed0e5a4dd4ff950a708287ad13c75b11be8c73ad2
parented9d88f7b7e6feba457b87ff30249e6c1e139005 (diff)
[XFS] endianess annotation for xfs_agfl_t. Trivial, xfs_agfl_t is always
used for ondisk values. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26553a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
-rw-r--r--fs/xfs/xfs_ag.h2
-rw-r--r--fs/xfs/xfs_alloc.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h
index dc2361dd740a..9ece7f87ec5b 100644
--- a/fs/xfs/xfs_ag.h
+++ b/fs/xfs/xfs_ag.h
@@ -150,7 +150,7 @@ typedef struct xfs_agi {
150#define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)XFS_BUF_PTR(bp)) 150#define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)XFS_BUF_PTR(bp))
151 151
152typedef struct xfs_agfl { 152typedef struct xfs_agfl {
153 xfs_agblock_t agfl_bno[1]; /* actually XFS_AGFL_SIZE(mp) */ 153 __be32 agfl_bno[1]; /* actually XFS_AGFL_SIZE(mp) */
154} xfs_agfl_t; 154} xfs_agfl_t;
155 155
156/* 156/*
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index d2bbcd882a69..879aa38ddd2a 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -2021,7 +2021,7 @@ xfs_alloc_get_freelist(
2021 /* 2021 /*
2022 * Get the block number and update the data structures. 2022 * Get the block number and update the data structures.
2023 */ 2023 */
2024 bno = INT_GET(agfl->agfl_bno[be32_to_cpu(agf->agf_flfirst)], ARCH_CONVERT); 2024 bno = be32_to_cpu(agfl->agfl_bno[be32_to_cpu(agf->agf_flfirst)]);
2025 be32_add(&agf->agf_flfirst, 1); 2025 be32_add(&agf->agf_flfirst, 1);
2026 xfs_trans_brelse(tp, agflbp); 2026 xfs_trans_brelse(tp, agflbp);
2027 if (be32_to_cpu(agf->agf_flfirst) == XFS_AGFL_SIZE(mp)) 2027 if (be32_to_cpu(agf->agf_flfirst) == XFS_AGFL_SIZE(mp))
@@ -2108,7 +2108,7 @@ xfs_alloc_put_freelist(
2108{ 2108{
2109 xfs_agf_t *agf; /* a.g. freespace structure */ 2109 xfs_agf_t *agf; /* a.g. freespace structure */
2110 xfs_agfl_t *agfl; /* a.g. free block array */ 2110 xfs_agfl_t *agfl; /* a.g. free block array */
2111 xfs_agblock_t *blockp;/* pointer to array entry */ 2111 __be32 *blockp;/* pointer to array entry */
2112 int error; 2112 int error;
2113#ifdef XFS_ALLOC_TRACE 2113#ifdef XFS_ALLOC_TRACE
2114 static char fname[] = "xfs_alloc_put_freelist"; 2114 static char fname[] = "xfs_alloc_put_freelist";
@@ -2132,7 +2132,7 @@ xfs_alloc_put_freelist(
2132 pag->pagf_flcount++; 2132 pag->pagf_flcount++;
2133 ASSERT(be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp)); 2133 ASSERT(be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp));
2134 blockp = &agfl->agfl_bno[be32_to_cpu(agf->agf_fllast)]; 2134 blockp = &agfl->agfl_bno[be32_to_cpu(agf->agf_fllast)];
2135 INT_SET(*blockp, ARCH_CONVERT, bno); 2135 *blockp = cpu_to_be32(bno);
2136 TRACE_MODAGF(NULL, agf, XFS_AGF_FLLAST | XFS_AGF_FLCOUNT); 2136 TRACE_MODAGF(NULL, agf, XFS_AGF_FLLAST | XFS_AGF_FLCOUNT);
2137 xfs_alloc_log_agf(tp, agbp, XFS_AGF_FLLAST | XFS_AGF_FLCOUNT); 2137 xfs_alloc_log_agf(tp, agbp, XFS_AGF_FLLAST | XFS_AGF_FLCOUNT);
2138 xfs_trans_log_buf(tp, agflbp, 2138 xfs_trans_log_buf(tp, agflbp,