void
convert_extent(
- xfs_bmbt_rec_64_t *rp,
+ xfs_bmbt_rec_64_t *rp,
xfs_dfiloff_t *op,
xfs_dfsbno_t *sp,
xfs_dfilblks_t *cp,
int *fp)
{
xfs_bmbt_irec_t irec, *s = &irec;
+ xfs_bmbt_rec_t rpcopy, *p = &rpcopy;
- libxfs_bmbt_get_all((xfs_bmbt_rec_t *)rp, s);
+ memmove(&rpcopy, rp, sizeof(rpcopy));
+ libxfs_bmbt_get_all(p, s);
if (s->br_state == XFS_EXT_UNWRITTEN) {
*fp = 1;
extern xfs_filblks_t libxfs_bmbt_get_blockcount (xfs_bmbt_rec_t *);
extern xfs_fileoff_t libxfs_bmbt_get_startoff (xfs_bmbt_rec_t *);
-extern void libxfs_bmbt_get_all (xfs_bmbt_rec_32_t *, xfs_bmbt_irec_t *);
+extern void libxfs_bmbt_get_all (xfs_bmbt_rec_t *, xfs_bmbt_irec_t *);
extern int libxfs_free_extent (xfs_trans_t *, xfs_fsblock_t, xfs_extlen_t);
extern int libxfs_rtfree_extent (xfs_trans_t *, xfs_rtblock_t,
* Convert a compressed bmap extent record to an uncompressed form.
* This code must be in sync with the routines xfs_bmbt_get_startoff,
* xfs_bmbt_get_startblock, xfs_bmbt_get_blockcount and xfs_bmbt_get_state.
- *
- * In the kernel this function is called with xfs_bmbt_rec_t, the caller has
- * already ensured that the data is suitably aligned. In commands, the data is
- * aligned to 32 bit until it gets here so this routine has to convert to the
- * machine alignment. This is a divergence between kernel and commands. KAO.
*/
void
xfs_bmbt_get_all(
- xfs_bmbt_rec_32_t *rp,
+ xfs_bmbt_rec_t *r,
xfs_bmbt_irec_t *s)
{
int ext_flag;
xfs_exntst_t st;
- xfs_bmbt_rec_t rpcopy, *r = &rpcopy;
- memcpy(&rpcopy, rp, sizeof(rpcopy));
#if BMBT_USE_64
ext_flag = (int)((INT_GET(r->l0, ARCH_CONVERT)) >> (64 - BMBT_EXNTFLAG_BITLEN));
int *fp) /* extent flag */
{
xfs_bmbt_irec_t irec, *s = &irec;
+ xfs_bmbt_rec_t rpcopy, *p = &rpcopy;
+
+ memcpy(&rpcopy, rp, sizeof(rpcopy));
/* Just use the extent parsing routine from the kernel */
- libxfs_bmbt_get_all(rp, s);
+ libxfs_bmbt_get_all(p, s);
if (fs_has_extflgbit) {
if (s->br_state == XFS_EXT_UNWRITTEN) {