]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: move xfs_ino_geometry to xfs_shared.h
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 28 Aug 2019 16:08:08 +0000 (12:08 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 28 Aug 2019 16:08:08 +0000 (12:08 -0400)
Source kernel commit: 5467b34bd1e81c8e719ae968ba6561723fdc15b8

The inode geometry structure isn't related to ondisk format; it's
support for the mount structure.  Move it to xfs_shared.h.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_dir2.c
libxfs/xfs_dir2_block.c
libxfs/xfs_dir2_data.c
libxfs/xfs_dir2_leaf.c
libxfs/xfs_dir2_node.c
libxfs/xfs_dir2_sf.c
libxfs/xfs_format.h
libxfs/xfs_iext_tree.c
libxfs/xfs_inode_fork.c
libxfs/xfs_shared.h

index 6b51a5253942d650b77a0d981368def39b1a40c9..b9b2073def645a04d09ff20e986fac7853d0384f 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include "libxfs_priv.h"
 #include "xfs_fs.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
index d13fafa48efef27fb13e1aeea58740b8fdf58d14..3c248510cc660bbeb644be7960e5dea93b929019 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include "libxfs_priv.h"
 #include "xfs_fs.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
index e3d698f3bee05993f61f232b4d79e8c26029dc2d..98882445fa67b811ad49f811f12c2a5d33b5c49e 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include "libxfs_priv.h"
 #include "xfs_fs.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
index 4c3a05a0e8fed9f2418b0501568d52cc47220bb9..9685398f7112d895b5f829017f87db1b7d7fb0c9 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include "libxfs_priv.h"
 #include "xfs_fs.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
index 2de174c06b68f9b1e91045d5d0be2c4355da05da..b34277d7d985a5d6351dff500670dfcef1653244 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include "libxfs_priv.h"
 #include "xfs_fs.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
index 24a0e61e30d3de24851318d8d8b80be5d38c285b..b13b50b0d02d48cb2a6fa740dec3d01b826b8f92 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include "libxfs_priv.h"
 #include "xfs_fs.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
index 907407f6fa9bfcfe02c2005390131b6a69b2a27a..144d716367c07f31d35a1f58d27d96a9451f8f02 100644 (file)
@@ -1694,45 +1694,4 @@ struct xfs_acl {
 #define SGI_ACL_FILE_SIZE      (sizeof(SGI_ACL_FILE)-1)
 #define SGI_ACL_DEFAULT_SIZE   (sizeof(SGI_ACL_DEFAULT)-1)
 
-struct xfs_ino_geometry {
-       /* Maximum inode count in this filesystem. */
-       uint64_t        maxicount;
-
-       /* Actual inode cluster buffer size, in bytes. */
-       unsigned int    inode_cluster_size;
-
-       /*
-        * Desired inode cluster buffer size, in bytes.  This value is not
-        * rounded up to at least one filesystem block, which is necessary for
-        * the sole purpose of validating sb_spino_align.  Runtime code must
-        * only ever use inode_cluster_size.
-        */
-       unsigned int    inode_cluster_size_raw;
-
-       /* Inode cluster sizes, adjusted to be at least 1 fsb. */
-       unsigned int    inodes_per_cluster;
-       unsigned int    blocks_per_cluster;
-
-       /* Inode cluster alignment. */
-       unsigned int    cluster_align;
-       unsigned int    cluster_align_inodes;
-       unsigned int    inoalign_mask;  /* mask sb_inoalignmt if used */
-
-       unsigned int    inobt_mxr[2]; /* max inobt btree records */
-       unsigned int    inobt_mnr[2]; /* min inobt btree records */
-       unsigned int    inobt_maxlevels; /* max inobt btree levels. */
-
-       /* Size of inode allocations under normal operation. */
-       unsigned int    ialloc_inos;
-       unsigned int    ialloc_blks;
-
-       /* Minimum inode blocks for a sparse allocation. */
-       unsigned int    ialloc_min_blks;
-
-       /* stripe unit inode alignment */
-       unsigned int    ialloc_align;
-
-       unsigned int    agino_log;      /* #bits for agino in inum */
-};
-
 #endif /* __XFS_FORMAT_H__ */
index 5bfe8f00a14cc117e00eab16e9e4408939611264..4ab8a4533dc7540d1313a6a4fd16e88016bb2604 100644 (file)
@@ -7,6 +7,7 @@
 // #include <linux/kernel.h>
 // #include <linux/slab.h>
 #include "libxfs_priv.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_bit.h"
 #include "xfs_log_format.h"
index 4cad396db2219ba510265157de5676b265db0c73..6b2ffdc0e0293664492a99979e175b1aab12d66f 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include "libxfs_priv.h"
 #include "xfs_fs.h"
+#include "xfs_shared.h"
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
index 4e909791aeac48a9ca82c6eb5564ca8e2cc7cadc..b9094709bc799bbb4f32bf403559099972893d29 100644 (file)
@@ -136,4 +136,46 @@ void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp,
                                 struct xfs_inode *ip, struct xfs_ifork *ifp);
 xfs_failaddr_t xfs_symlink_shortform_verify(struct xfs_inode *ip);
 
+/* Computed inode geometry for the filesystem. */
+struct xfs_ino_geometry {
+       /* Maximum inode count in this filesystem. */
+       uint64_t        maxicount;
+
+       /* Actual inode cluster buffer size, in bytes. */
+       unsigned int    inode_cluster_size;
+
+       /*
+        * Desired inode cluster buffer size, in bytes.  This value is not
+        * rounded up to at least one filesystem block, which is necessary for
+        * the sole purpose of validating sb_spino_align.  Runtime code must
+        * only ever use inode_cluster_size.
+        */
+       unsigned int    inode_cluster_size_raw;
+
+       /* Inode cluster sizes, adjusted to be at least 1 fsb. */
+       unsigned int    inodes_per_cluster;
+       unsigned int    blocks_per_cluster;
+
+       /* Inode cluster alignment. */
+       unsigned int    cluster_align;
+       unsigned int    cluster_align_inodes;
+       unsigned int    inoalign_mask;  /* mask sb_inoalignmt if used */
+
+       unsigned int    inobt_mxr[2]; /* max inobt btree records */
+       unsigned int    inobt_mnr[2]; /* min inobt btree records */
+       unsigned int    inobt_maxlevels; /* max inobt btree levels. */
+
+       /* Size of inode allocations under normal operation. */
+       unsigned int    ialloc_inos;
+       unsigned int    ialloc_blks;
+
+       /* Minimum inode blocks for a sparse allocation. */
+       unsigned int    ialloc_min_blks;
+
+       /* stripe unit inode alignment */
+       unsigned int    ialloc_align;
+
+       unsigned int    agino_log;      /* #bits for agino in inum */
+};
+
 #endif /* __XFS_SHARED_H__ */