summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_types.h')
-rw-r--r--fs/xfs/xfs_types.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/xfs_types.h b/fs/xfs/xfs_types.h
index 69074ac20ac3..781772c6f192 100644
--- a/fs/xfs/xfs_types.h
+++ b/fs/xfs/xfs_types.h
@@ -183,4 +183,14 @@ struct xfs_name {
*/
typedef __uint32_t xfs_dqid_t;
+/*
+ * Constants for bit manipulations.
+ */
+#define XFS_NBBYLOG 3 /* log2(NBBY) */
+#define XFS_WORDLOG 2 /* log2(sizeof(xfs_rtword_t)) */
+#define XFS_NBWORDLOG (XFS_NBBYLOG + XFS_WORDLOG)
+#define XFS_NBWORD (1 << XFS_NBWORDLOG)
+#define XFS_WORDMASK ((1 << XFS_WORDLOG) - 1)
+
+
#endif /* __XFS_TYPES_H__ */