mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 00:26:39 +08:00
[XFS] endianess annotations for xfs_attr_leaf_name_remote_t
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25500a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
parent
053b5758cb
commit
c0f054e7a4
@ -2006,11 +2006,9 @@ xfs_attr_leaf_lookup_int(xfs_dabuf_t *bp, xfs_da_args_t *args)
|
||||
((entry->flags & XFS_ATTR_ROOT) != 0))
|
||||
continue;
|
||||
args->index = probe;
|
||||
args->rmtblkno
|
||||
= INT_GET(name_rmt->valueblk, ARCH_CONVERT);
|
||||
args->rmtblkno = be32_to_cpu(name_rmt->valueblk);
|
||||
args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount,
|
||||
INT_GET(name_rmt->valuelen,
|
||||
ARCH_CONVERT));
|
||||
be32_to_cpu(name_rmt->valuelen));
|
||||
return(XFS_ERROR(EEXIST));
|
||||
}
|
||||
}
|
||||
@ -2057,8 +2055,8 @@ xfs_attr_leaf_getvalue(xfs_dabuf_t *bp, xfs_da_args_t *args)
|
||||
name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index);
|
||||
ASSERT(name_rmt->namelen == args->namelen);
|
||||
ASSERT(memcmp(args->name, name_rmt->name, args->namelen) == 0);
|
||||
valuelen = INT_GET(name_rmt->valuelen, ARCH_CONVERT);
|
||||
args->rmtblkno = INT_GET(name_rmt->valueblk, ARCH_CONVERT);
|
||||
valuelen = be32_to_cpu(name_rmt->valuelen);
|
||||
args->rmtblkno = be32_to_cpu(name_rmt->valueblk);
|
||||
args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount, valuelen);
|
||||
if (args->flags & ATTR_KERNOVAL) {
|
||||
args->valuelen = valuelen;
|
||||
@ -2413,8 +2411,7 @@ xfs_attr_leaf_list_int(xfs_dabuf_t *bp, xfs_attr_list_context_t *context)
|
||||
retval = xfs_attr_put_listent(context, namesp,
|
||||
(char *)name_rmt->name,
|
||||
(int)name_rmt->namelen,
|
||||
(int)INT_GET(name_rmt->valuelen,
|
||||
ARCH_CONVERT));
|
||||
be32_to_cpu(name_rmt->valuelen));
|
||||
}
|
||||
}
|
||||
if (retval == 0) {
|
||||
@ -2549,8 +2546,8 @@ xfs_attr_leaf_clearflag(xfs_da_args_t *args)
|
||||
if (args->rmtblkno) {
|
||||
ASSERT((entry->flags & XFS_ATTR_LOCAL) == 0);
|
||||
name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index);
|
||||
INT_SET(name_rmt->valueblk, ARCH_CONVERT, args->rmtblkno);
|
||||
INT_SET(name_rmt->valuelen, ARCH_CONVERT, args->valuelen);
|
||||
name_rmt->valueblk = cpu_to_be32(args->rmtblkno);
|
||||
name_rmt->valuelen = cpu_to_be32(args->valuelen);
|
||||
xfs_da_log_buf(args->trans, bp,
|
||||
XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt)));
|
||||
}
|
||||
@ -2703,8 +2700,8 @@ xfs_attr_leaf_flipflags(xfs_da_args_t *args)
|
||||
if (args->rmtblkno) {
|
||||
ASSERT((entry1->flags & XFS_ATTR_LOCAL) == 0);
|
||||
name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf1, args->index);
|
||||
INT_SET(name_rmt->valueblk, ARCH_CONVERT, args->rmtblkno);
|
||||
INT_SET(name_rmt->valuelen, ARCH_CONVERT, args->valuelen);
|
||||
name_rmt->valueblk = cpu_to_be32(args->rmtblkno);
|
||||
name_rmt->valuelen = cpu_to_be32(args->valuelen);
|
||||
xfs_da_log_buf(args->trans, bp1,
|
||||
XFS_DA_LOGRANGE(leaf1, name_rmt, sizeof(*name_rmt)));
|
||||
}
|
||||
@ -2953,8 +2950,7 @@ xfs_attr_leaf_inactive(xfs_trans_t **trans, xfs_inode_t *dp, xfs_dabuf_t *bp)
|
||||
lp->valueblk = name_rmt->valueblk;
|
||||
INT_SET(lp->valuelen, ARCH_CONVERT,
|
||||
XFS_B_TO_FSB(dp->i_mount,
|
||||
INT_GET(name_rmt->valuelen,
|
||||
ARCH_CONVERT)));
|
||||
be32_to_cpu(name_rmt->valuelen)));
|
||||
lp++;
|
||||
}
|
||||
}
|
||||
|
@ -102,10 +102,10 @@ typedef struct xfs_attr_leaf_name_local {
|
||||
} xfs_attr_leaf_name_local_t;
|
||||
|
||||
typedef struct xfs_attr_leaf_name_remote {
|
||||
xfs_dablk_t valueblk; /* block number of value bytes */
|
||||
__uint32_t valuelen; /* number of bytes in value */
|
||||
__uint8_t namelen; /* length of name bytes */
|
||||
__uint8_t name[1]; /* name bytes */
|
||||
__be32 valueblk; /* block number of value bytes */
|
||||
__be32 valuelen; /* number of bytes in value */
|
||||
__u8 namelen; /* length of name bytes */
|
||||
__u8 name[1]; /* name bytes */
|
||||
} xfs_attr_leaf_name_remote_t;
|
||||
|
||||
typedef struct xfs_attr_leafblock {
|
||||
|
Loading…
Reference in New Issue
Block a user