xfs: merge xfs_inum.h into xfs_format.h
authorChristoph Hellwig <hch@lst.de>
Fri, 28 Nov 2014 03:27:10 +0000 (14:27 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 28 Nov 2014 03:27:10 +0000 (14:27 +1100)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
13 files changed:
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_dir2.c
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_ialloc.c
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/libxfs/xfs_inum.h [deleted file]
fs/xfs/xfs_filestream.c
fs/xfs/xfs_icache.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_itable.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_super.c

index 68d91338fcc42607454e657705ae420bf7833861..c2a36c331b9c52ae241b93e05483d3b077ee2838 100644 (file)
@@ -22,7 +22,6 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_bit.h"
-#include "xfs_inum.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
 #include "xfs_da_format.h"
index 5d892911158ba836846825999532126e4ba1b306..d399f174a809ac50dcc9848bc10a78acccd5f89f 100644 (file)
@@ -20,7 +20,6 @@
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
-#include "xfs_inum.h"
 #include "xfs_mount.h"
 #include "xfs_da_format.h"
 #include "xfs_da_btree.h"
index 70ca740f34ac5972e4ebb095c1778440471719bd..fbd6da263571438309249141b1d5a266c26a3ea4 100644 (file)
@@ -1068,6 +1068,41 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev)
         XFS_DIFLAG_PROJINHERIT | XFS_DIFLAG_NOSYMLINKS | XFS_DIFLAG_EXTSIZE | \
         XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_FILESTREAM)
 
+/*
+ * Inode number format:
+ * low inopblog bits - offset in block
+ * next agblklog bits - block number in ag
+ * next agno_log bits - ag number
+ * high agno_log-agblklog-inopblog bits - 0
+ */
+#define        XFS_INO_MASK(k)                 (__uint32_t)((1ULL << (k)) - 1)
+#define        XFS_INO_OFFSET_BITS(mp)         (mp)->m_sb.sb_inopblog
+#define        XFS_INO_AGBNO_BITS(mp)          (mp)->m_sb.sb_agblklog
+#define        XFS_INO_AGINO_BITS(mp)          (mp)->m_agino_log
+#define        XFS_INO_AGNO_BITS(mp)           (mp)->m_agno_log
+#define        XFS_INO_BITS(mp)                \
+       XFS_INO_AGNO_BITS(mp) + XFS_INO_AGINO_BITS(mp)
+#define        XFS_INO_TO_AGNO(mp,i)           \
+       ((xfs_agnumber_t)((i) >> XFS_INO_AGINO_BITS(mp)))
+#define        XFS_INO_TO_AGINO(mp,i)          \
+       ((xfs_agino_t)(i) & XFS_INO_MASK(XFS_INO_AGINO_BITS(mp)))
+#define        XFS_INO_TO_AGBNO(mp,i)          \
+       (((xfs_agblock_t)(i) >> XFS_INO_OFFSET_BITS(mp)) & \
+               XFS_INO_MASK(XFS_INO_AGBNO_BITS(mp)))
+#define        XFS_INO_TO_OFFSET(mp,i)         \
+       ((int)(i) & XFS_INO_MASK(XFS_INO_OFFSET_BITS(mp)))
+#define        XFS_INO_TO_FSB(mp,i)            \
+       XFS_AGB_TO_FSB(mp, XFS_INO_TO_AGNO(mp,i), XFS_INO_TO_AGBNO(mp,i))
+#define        XFS_AGINO_TO_INO(mp,a,i)        \
+       (((xfs_ino_t)(a) << XFS_INO_AGINO_BITS(mp)) | (i))
+#define        XFS_AGINO_TO_AGBNO(mp,i)        ((i) >> XFS_INO_OFFSET_BITS(mp))
+#define        XFS_AGINO_TO_OFFSET(mp,i)       \
+       ((i) & XFS_INO_MASK(XFS_INO_OFFSET_BITS(mp)))
+#define        XFS_OFFBNO_TO_AGINO(mp,b,o)     \
+       ((xfs_agino_t)(((b) << XFS_INO_OFFSET_BITS(mp)) | (o)))
+
+#define        XFS_MAXINUMBER          ((xfs_ino_t)((1ULL << 56) - 1ULL))
+#define        XFS_MAXINUMBER_32       ((xfs_ino_t)((1ULL << 32) - 1ULL))
 
 /*
  * RealTime Device format definitions
index 1dae7dae6a3c5c831a27b41f1b39c5dc362162f7..92d2617e61faf83b342b475d60e5fd2168377209 100644 (file)
@@ -22,7 +22,6 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_bit.h"
-#include "xfs_inum.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
 #include "xfs_inode.h"
index 8912d28eb43e731bbd5204ebaff63604e9ef34af..0defbd02f62d58bb36e62f2cc4738cf862de4e1c 100644 (file)
@@ -22,7 +22,6 @@
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
-#include "xfs_inum.h"
 #include "xfs_mount.h"
 #include "xfs_inode.h"
 #include "xfs_trans.h"
diff --git a/fs/xfs/libxfs/xfs_inum.h b/fs/xfs/libxfs/xfs_inum.h
deleted file mode 100644 (file)
index 4ff2278..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#ifndef __XFS_INUM_H__
-#define        __XFS_INUM_H__
-
-/*
- * Inode number format:
- * low inopblog bits - offset in block
- * next agblklog bits - block number in ag
- * next agno_log bits - ag number
- * high agno_log-agblklog-inopblog bits - 0
- */
-
-struct xfs_mount;
-
-#define        XFS_INO_MASK(k)                 (__uint32_t)((1ULL << (k)) - 1)
-#define        XFS_INO_OFFSET_BITS(mp)         (mp)->m_sb.sb_inopblog
-#define        XFS_INO_AGBNO_BITS(mp)          (mp)->m_sb.sb_agblklog
-#define        XFS_INO_AGINO_BITS(mp)          (mp)->m_agino_log
-#define        XFS_INO_AGNO_BITS(mp)           (mp)->m_agno_log
-#define        XFS_INO_BITS(mp)                \
-       XFS_INO_AGNO_BITS(mp) + XFS_INO_AGINO_BITS(mp)
-#define        XFS_INO_TO_AGNO(mp,i)           \
-       ((xfs_agnumber_t)((i) >> XFS_INO_AGINO_BITS(mp)))
-#define        XFS_INO_TO_AGINO(mp,i)          \
-       ((xfs_agino_t)(i) & XFS_INO_MASK(XFS_INO_AGINO_BITS(mp)))
-#define        XFS_INO_TO_AGBNO(mp,i)          \
-       (((xfs_agblock_t)(i) >> XFS_INO_OFFSET_BITS(mp)) & \
-               XFS_INO_MASK(XFS_INO_AGBNO_BITS(mp)))
-#define        XFS_INO_TO_OFFSET(mp,i)         \
-       ((int)(i) & XFS_INO_MASK(XFS_INO_OFFSET_BITS(mp)))
-#define        XFS_INO_TO_FSB(mp,i)            \
-       XFS_AGB_TO_FSB(mp, XFS_INO_TO_AGNO(mp,i), XFS_INO_TO_AGBNO(mp,i))
-#define        XFS_AGINO_TO_INO(mp,a,i)        \
-       (((xfs_ino_t)(a) << XFS_INO_AGINO_BITS(mp)) | (i))
-#define        XFS_AGINO_TO_AGBNO(mp,i)        ((i) >> XFS_INO_OFFSET_BITS(mp))
-#define        XFS_AGINO_TO_OFFSET(mp,i)       \
-       ((i) & XFS_INO_MASK(XFS_INO_OFFSET_BITS(mp)))
-#define        XFS_OFFBNO_TO_AGINO(mp,b,o)     \
-       ((xfs_agino_t)(((b) << XFS_INO_OFFSET_BITS(mp)) | (o)))
-
-#define        XFS_MAXINUMBER          ((xfs_ino_t)((1ULL << 56) - 1ULL))
-#define        XFS_MAXINUMBER_32       ((xfs_ino_t)((1ULL << 32) - 1ULL))
-
-#endif /* __XFS_INUM_H__ */
index c5b06a9250359b72d6ab39d51a5fbb28ad2d99bf..a2e86e8a0feac8fabf316fb8a790fc805153469a 100644 (file)
@@ -22,7 +22,6 @@
 #include "xfs_trans_resv.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
-#include "xfs_inum.h"
 #include "xfs_inode.h"
 #include "xfs_bmap.h"
 #include "xfs_bmap_util.h"
index e364723bd160458223c2aa4f1b9c9374acfa536c..92ca910d0ec69434489f3678394f6f8e59d15251 100644 (file)
@@ -20,7 +20,6 @@
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
-#include "xfs_inum.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
 #include "xfs_inode.h"
index 229dfdefdb85187ae62031234c0723aff212ccea..7054bae57a8f7ea3ed78d291983fbd8ad40ee9d6 100644 (file)
@@ -23,7 +23,6 @@
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
-#include "xfs_inum.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
 #include "xfs_inode.h"
index 584feee3edb7bf30798570ad556f75c483e580af..17cf161831369281bc1a574c2d5bec02d1d86be0 100644 (file)
@@ -21,7 +21,6 @@
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
-#include "xfs_inum.h"
 #include "xfs_mount.h"
 #include "xfs_inode.h"
 #include "xfs_btree.h"
index 697073acc3e52e3f4710401a739e68f470170692..75705dd047b5697a2b972523ff067d8c86620346 100644 (file)
@@ -22,7 +22,6 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_bit.h"
-#include "xfs_inum.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
 #include "xfs_da_format.h"
index e627336265c83c2e50ec94a0398b8ae360eacab8..92faae5db406d5d6509b1b5974379b8d74e57974 100644 (file)
@@ -22,7 +22,6 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_bit.h"
-#include "xfs_inum.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
 #include "xfs_da_format.h"
index af4f63efa2a8f77199b64936d4128fa460725afb..f14affca296b9991e96edcbc77fec9e0700e304b 100644 (file)
@@ -21,7 +21,6 @@
 #include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
-#include "xfs_inum.h"
 #include "xfs_sb.h"
 #include "xfs_mount.h"
 #include "xfs_da_format.h"