hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/fs/xfs/libxfs/xfs_shared.h
....@@ -25,7 +25,8 @@
2525 extern const struct xfs_buf_ops xfs_agi_buf_ops;
2626 extern const struct xfs_buf_ops xfs_agf_buf_ops;
2727 extern const struct xfs_buf_ops xfs_agfl_buf_ops;
28
-extern const struct xfs_buf_ops xfs_allocbt_buf_ops;
28
+extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
29
+extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
2930 extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
3031 extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
3132 extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops;
....@@ -36,6 +37,7 @@
3637 extern const struct xfs_buf_ops xfs_symlink_buf_ops;
3738 extern const struct xfs_buf_ops xfs_agi_buf_ops;
3839 extern const struct xfs_buf_ops xfs_inobt_buf_ops;
40
+extern const struct xfs_buf_ops xfs_finobt_buf_ops;
3941 extern const struct xfs_buf_ops xfs_inode_buf_ops;
4042 extern const struct xfs_buf_ops xfs_inode_buf_ra_ops;
4143 extern const struct xfs_buf_ops xfs_dquot_buf_ops;
....@@ -63,7 +65,7 @@
6365 #define XFS_TRANS_DQ_DIRTY 0x10 /* at least one dquot in trx dirty */
6466 #define XFS_TRANS_RESERVE 0x20 /* OK to use reserved data blocks */
6567 #define XFS_TRANS_NO_WRITECOUNT 0x40 /* do not elevate SB writecount */
66
-#define XFS_TRANS_NOFS 0x80 /* pass KM_NOFS to kmem_alloc */
68
+#define XFS_TRANS_RES_FDBLKS 0x80 /* reserve newly freed blocks */
6769 /*
6870 * LOWMODE is used by the allocator to activate the lowspace algorithm - when
6971 * free space is running low the extent allocator may choose to allocate an
....@@ -134,4 +136,49 @@
134136 struct xfs_inode *ip, struct xfs_ifork *ifp);
135137 xfs_failaddr_t xfs_symlink_shortform_verify(struct xfs_inode *ip);
136138
139
+/* Computed inode geometry for the filesystem. */
140
+struct xfs_ino_geometry {
141
+ /* Maximum inode count in this filesystem. */
142
+ uint64_t maxicount;
143
+
144
+ /* Actual inode cluster buffer size, in bytes. */
145
+ unsigned int inode_cluster_size;
146
+
147
+ /*
148
+ * Desired inode cluster buffer size, in bytes. This value is not
149
+ * rounded up to at least one filesystem block, which is necessary for
150
+ * the sole purpose of validating sb_spino_align. Runtime code must
151
+ * only ever use inode_cluster_size.
152
+ */
153
+ unsigned int inode_cluster_size_raw;
154
+
155
+ /* Inode cluster sizes, adjusted to be at least 1 fsb. */
156
+ unsigned int inodes_per_cluster;
157
+ unsigned int blocks_per_cluster;
158
+
159
+ /* Inode cluster alignment. */
160
+ unsigned int cluster_align;
161
+ unsigned int cluster_align_inodes;
162
+ unsigned int inoalign_mask; /* mask sb_inoalignmt if used */
163
+
164
+ unsigned int inobt_mxr[2]; /* max inobt btree records */
165
+ unsigned int inobt_mnr[2]; /* min inobt btree records */
166
+ unsigned int inobt_maxlevels; /* max inobt btree levels. */
167
+
168
+ /* Size of inode allocations under normal operation. */
169
+ unsigned int ialloc_inos;
170
+ unsigned int ialloc_blks;
171
+
172
+ /* Minimum inode blocks for a sparse allocation. */
173
+ unsigned int ialloc_min_blks;
174
+
175
+ /* stripe unit inode alignment */
176
+ unsigned int ialloc_align;
177
+
178
+ unsigned int agino_log; /* #bits for agino in inum */
179
+
180
+ /* precomputed value for di_flags2 */
181
+ uint64_t new_diflags2;
182
+};
183
+
137184 #endif /* __XFS_SHARED_H__ */