@@ -28,17 +28,17 @@
* In-core extent record layout:
*
* +-------+----------------------------+
- * | 00:51 | all 52 bits of startoff |
- * | 52:63 | low 12 bits of startblock |
+ * | 00:53 | all 54 bits of startoff |
+ * | 54:63 | low 10 bits of startblock |
* +-------+----------------------------+
* | 00:20 | all 21 bits of length |
* | 21 | unwritten extent bit |
* | 22:63 | high 42 bits of startblock |
* +-------+----------------------------+
*/
-#define XFS_IEXT_STARTOFF_MASK xfs_mask64lo(52)
-#define XFS_IEXT_LENGTH_MASK xfs_mask64lo(21)
-#define XFS_IEXT_STARTBLOCK_MASK xfs_mask64lo(54)
+#define XFS_IEXT_STARTOFF_MASK xfs_mask64lo(BMBT_STARTOFF_BITLEN)
+#define XFS_IEXT_LENGTH_MASK xfs_mask64lo(BMBT_BLOCKCOUNT_BITLEN)
+#define XFS_IEXT_STARTBLOCK_MASK xfs_mask64lo(BMBT_STARTBLOCK_BITLEN)
struct xfs_iext_rec {
uint64_t lo;
@@ -72,8 +74,8 @@ xfs_iext_set(
rec->lo = irec->br_startoff & XFS_IEXT_STARTOFF_MASK;
rec->hi = irec->br_blockcount & XFS_IEXT_LENGTH_MASK;
- rec->lo |= (irec->br_startblock << 52);
- rec->hi |= ((irec->br_startblock & ~xfs_mask64lo(12)) << (22 - 12));
+ rec->lo |= (irec->br_startblock << 54);
+ rec->hi |= ((irec->br_startblock & ~xfs_mask64lo(10)) << (22 - 10));
if (irec->br_state == XFS_EXT_UNWRITTEN)
rec->hi |= (1 << 21);
@@ -87,8 +89,8 @@ xfs_iext_get(
irec->br_startoff = rec->lo & XFS_IEXT_STARTOFF_MASK;
irec->br_blockcount = rec->hi & XFS_IEXT_LENGTH_MASK;
- irec->br_startblock = rec->lo >> 52;
- irec->br_startblock |= (rec->hi & xfs_mask64hi(42)) >> (22 - 12);
+ irec->br_startblock = rec->lo >> 54;
+ irec->br_startblock |= (rec->hi & xfs_mask64hi(42)) >> (22 - 10);
if (rec->hi & (1 << 21))
irec->br_state = XFS_EXT_UNWRITTEN;