]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libfrog: move topology.[ch] to libxfs
authorDarrick J. Wong <djwong@kernel.org>
Wed, 29 Sep 2021 20:57:10 +0000 (16:57 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 29 Sep 2021 20:57:10 +0000 (16:57 -0400)
The topology code depends on a few libxfs structures and is only needed
by mkfs and xfs_repair.  Move this code to libxfs to reduce the size of
libfrog and to avoid build failures caused by "xfs: move perag structure
and setup to libxfs/xfs_ag.[ch]".

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/libxfs.h
libfrog/Makefile
libxfs/Makefile
libxfs/topology.c [moved from libfrog/topology.c with 99% similarity]
libxfs/topology.h [moved from libfrog/topology.h with 88% similarity]
mkfs/xfs_mkfs.c
repair/sb.c

index a494a1d4b0026a33d544b05cc3e1fabdc1a6ce07..f170b48878a608efd564d2367204a9f0ca654d7a 100644 (file)
@@ -214,5 +214,6 @@ int libxfs_rtfree_extent(struct xfs_trans *, xfs_rtblock_t, xfs_extlen_t);
 bool libxfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);
 
 #include "xfs_attr.h"
+#include "topology.h"
 
 #endif /* __LIBXFS_H__ */
index 395ce30804b700cd424049ac2c947d730364c709..0110708239a8c2818872d5f8c12b2965ac77da0c 100644 (file)
@@ -27,7 +27,6 @@ projects.c \
 ptvar.c \
 radix-tree.c \
 scrub.c \
-topology.c \
 util.c \
 workqueue.c
 
@@ -47,7 +46,6 @@ projects.h \
 ptvar.h \
 radix-tree.h \
 scrub.h \
-topology.h \
 workqueue.h
 
 LSRCFILES += gen_crc32table.c
index de595b7cd49f4a994f460d044b857aba34e7421b..3e3c4bd0cc9e5527d42aef71874421e455b0967b 100644 (file)
@@ -20,6 +20,11 @@ PKGHFILES = xfs_fs.h \
        xfs_log_format.h
 
 HFILES = \
+       libxfs_io.h \
+       libxfs_api_defs.h \
+       init.h \
+       libxfs_priv.h \
+       topology.h \
        xfs_ag_resv.h \
        xfs_alloc.h \
        xfs_alloc_btree.h \
@@ -48,10 +53,6 @@ HFILES = \
        xfs_shared.h \
        xfs_trans_resv.h \
        xfs_trans_space.h \
-       libxfs_io.h \
-       libxfs_api_defs.h \
-       init.h \
-       libxfs_priv.h \
        xfs_dir2_priv.h
 
 CFILES = cache.c \
@@ -60,6 +61,7 @@ CFILES = cache.c \
        kmem.c \
        logitem.c \
        rdwr.c \
+       topology.c \
        trans.c \
        util.c \
        xfs_ag.c \
similarity index 99%
rename from libfrog/topology.c
rename to libxfs/topology.c
index b1b470c9b6d32d67d8d1b100a62390c40c5762b9..a17c19691a45945cf38688637d7e24a394fe673a 100644 (file)
@@ -4,14 +4,13 @@
  * All Rights Reserved.
  */
 
-#include "libxfs.h"
+#include "libxfs_priv.h"
 #include "libxcmd.h"
 #ifdef ENABLE_BLKID
 #  include <blkid/blkid.h>
 #endif /* ENABLE_BLKID */
 #include "xfs_multidisk.h"
-#include "topology.h"
-#include "platform.h"
+#include "libfrog/platform.h"
 
 #define TERABYTES(count, blog) ((uint64_t)(count) << (40 - (blog)))
 #define GIGABYTES(count, blog) ((uint64_t)(count) << (30 - (blog)))
similarity index 88%
rename from libfrog/topology.h
rename to libxfs/topology.h
index 6fde868a59231aaa30a1d9d4f8d3a74e4d65b2a9..1a0fe24c09d091ab0e2c90cd2633f9fabb5f10a4 100644 (file)
@@ -4,8 +4,8 @@
  * All Rights Reserved.
  */
 
-#ifndef __LIBFROG_TOPOLOGY_H__
-#define __LIBFROG_TOPOLOGY_H__
+#ifndef __LIBXFS_TOPOLOGY_H__
+#define __LIBXFS_TOPOLOGY_H__
 
 /*
  * Device topology information.
@@ -36,4 +36,4 @@ extern int
 check_overwrite(
        const char      *device);
 
-#endif /* __LIBFROG_TOPOLOGY_H__ */
+#endif /* __LIBXFS_TOPOLOGY_H__ */
index 16e347e5b1fda5c79b716dab01fbc33e25c913ee..5390467741a946e71aa8113d397228295502745d 100644 (file)
@@ -9,7 +9,6 @@
 #include "xfs_multidisk.h"
 #include "libxcmd.h"
 #include "libfrog/fsgeom.h"
-#include "libfrog/topology.h"
 #include "libfrog/convert.h"
 #include "proto.h"
 #include <ini.h>
index 17ce43cc510df0f5cdd8c174329f2eb7d6f13c78..90f32e74f908acec0bf6c069782a4e7ab66878af 100644 (file)
@@ -12,7 +12,6 @@
 #include "protos.h"
 #include "err_protos.h"
 #include "xfs_multidisk.h"
-#include "libfrog/topology.h"
 
 #define BSIZE  (1024 * 1024)