提交 918ae424 编写于 作者: N Nathan Scott

[XFS] endianess annotations for xfs_attr_leaf_hdr_t

SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25497a
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NNathan Scott <nathans@sgi.com>
上级 8f44e047
......@@ -1772,8 +1772,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
leaf = bp->data;
if (cursor->hashval >
INT_GET(leaf->entries[
INT_GET(leaf->hdr.count,
ARCH_CONVERT)-1].hashval,
be16_to_cpu(leaf->hdr.count)-1].hashval,
ARCH_CONVERT)) {
xfs_attr_trace_l_cl("wrong blk",
context, leaf);
......@@ -2289,9 +2288,9 @@ xfs_attr_trace_l_cl(char *where, struct xfs_attr_list_context *context,
: 0,
(__psunsigned_t)context->dupcnt,
(__psunsigned_t)context->flags,
(__psunsigned_t)INT_GET(leaf->hdr.count, ARCH_CONVERT),
(__psunsigned_t)be16_to_cpu(leaf->hdr.count),
(__psunsigned_t)INT_GET(leaf->entries[0].hashval, ARCH_CONVERT),
(__psunsigned_t)INT_GET(leaf->entries[INT_GET(leaf->hdr.count, ARCH_CONVERT)-1].hashval, ARCH_CONVERT));
(__psunsigned_t)INT_GET(leaf->entries[be16_to_cpu(leaf->hdr.count)-1].hashval, ARCH_CONVERT));
}
/*
......
此差异已折叠。
......@@ -73,17 +73,17 @@ struct xfs_trans;
#define XFS_ATTR_LEAF_MAPSIZE 3 /* how many freespace slots */
typedef struct xfs_attr_leaf_map { /* RLE map of free bytes */
__uint16_t base; /* base of free region */
__uint16_t size; /* length of free region */
__be16 base; /* base of free region */
__be16 size; /* length of free region */
} xfs_attr_leaf_map_t;
typedef struct xfs_attr_leaf_hdr { /* constant-structure header block */
xfs_da_blkinfo_t info; /* block type, links, etc. */
__uint16_t count; /* count of active leaf_entry's */
__uint16_t usedbytes; /* num bytes of names/values stored */
__uint16_t firstused; /* first used byte in name area */
__uint8_t holes; /* != 0 if blk needs compaction */
__uint8_t pad1;
__be16 count; /* count of active leaf_entry's */
__be16 usedbytes; /* num bytes of names/values stored */
__be16 firstused; /* first used byte in name area */
__u8 holes; /* != 0 if blk needs compaction */
__u8 pad1;
xfs_attr_leaf_map_t freemap[XFS_ATTR_LEAF_MAPSIZE];
/* N largest free regions */
} xfs_attr_leaf_hdr_t;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册