Commit 135dcc10 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: allow unaligned extent records in xfs_bmbt_disk_set_all

To make life a little simpler make xfs_bmbt_set_all unaligned access
aware so that we can use it directly on the destination buffer.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 43518812
......@@ -199,14 +199,14 @@ xfs_bmbt_disk_set_all(
ASSERT(!(s->br_blockcount & xfs_mask64hi(64-BMBT_BLOCKCOUNT_BITLEN)));
ASSERT(!(s->br_startblock & xfs_mask64hi(64-BMBT_STARTBLOCK_BITLEN)));
r->l0 = cpu_to_be64(
put_unaligned_be64(
((xfs_bmbt_rec_base_t)extent_flag << 63) |
((xfs_bmbt_rec_base_t)s->br_startoff << 9) |
((xfs_bmbt_rec_base_t)s->br_startblock >> 43));
r->l1 = cpu_to_be64(
((xfs_bmbt_rec_base_t)s->br_startblock >> 43), &r->l0);
put_unaligned_be64(
((xfs_bmbt_rec_base_t)s->br_startblock << 21) |
((xfs_bmbt_rec_base_t)s->br_blockcount &
(xfs_bmbt_rec_base_t)xfs_mask64lo(21)));
(xfs_bmbt_rec_base_t)xfs_mask64lo(21)), &r->l1);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment