xfs: Move extent count limits to xfs_format.h
authorChandan Babu R <chandan.babu@oracle.com>
Wed, 7 Oct 2020 09:30:03 +0000 (15:00 +0530)
committerChandan Babu R <chandan.babu@oracle.com>
Mon, 11 Apr 2022 04:11:17 +0000 (04:11 +0000)
Maximum values associated with extent counters i.e. Maximum extent length,
Maximum data extents and Maximum xattr extents are dictated by the on-disk
format. Hence move these definitions over to xfs_format.h.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_types.h

index d665c04..d75e5b1 100644 (file)
@@ -870,6 +870,13 @@ enum xfs_dinode_fmt {
        { XFS_DINODE_FMT_UUID,          "uuid" }
 
 /*
+ * Max values for extlen, extnum, aextnum.
+ */
+#define        MAXEXTLEN       ((xfs_extlen_t)0x001fffff)      /* 21 bits */
+#define        MAXEXTNUM       ((xfs_extnum_t)0x7fffffff)      /* signed int */
+#define        MAXAEXTNUM      ((xfs_aextnum_t)0x7fff)         /* signed short */
+
+/*
  * Inode minimum and maximum sizes.
  */
 #define        XFS_DINODE_MIN_LOG      8
index b6da06b..794a54c 100644 (file)
@@ -57,13 +57,6 @@ typedef void *               xfs_failaddr_t;
 #define        NULLAGINO       ((xfs_agino_t)-1)
 
 /*
- * Max values for extlen, extnum, aextnum.
- */
-#define        MAXEXTLEN       ((xfs_extlen_t)0x001fffff)      /* 21 bits */
-#define        MAXEXTNUM       ((xfs_extnum_t)0x7fffffff)      /* signed int */
-#define        MAXAEXTNUM      ((xfs_aextnum_t)0x7fff)         /* signed short */
-
-/*
  * Minimum and maximum blocksize and sectorsize.
  * The blocksize upper limit is pretty much arbitrary.
  * The sectorsize upper limit is due to sizeof(sb_sectsize).