Re: [PATCH 16/18] xfs: use a b+tree for the in-core extent list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FWIW the attached crap patch fixes all the fstests failures I saw.

--D

---
 fs/xfs/libxfs/xfs_iext_tree.c |   21 ++++++++++++---------
 fs/xfs/xfs_trace.h            |    1 +
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_iext_tree.c b/fs/xfs/libxfs/xfs_iext_tree.c
index c18d344..2aa5651 100644
--- a/fs/xfs/libxfs/xfs_iext_tree.c
+++ b/fs/xfs/libxfs/xfs_iext_tree.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux