@@ -5,6 +5,7 @@
*/
#include "libxfs.h"
+#include "init.h"
#include <sys/stat.h>
#include <sys/wait.h>
#include <pthread.h>
@@ -16,8 +17,6 @@
#define rounddown(x, y) (((x)/(y))*(y))
#define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
-extern int platform_check_ismounted(char *, char *, struct stat *, int);
-
static char *logfile_name;
static FILE *logerr;
static char LOGFILE_NAME[] = "/var/tmp/xfs_copy.log.XXXXXX";
@@ -17,6 +17,7 @@
#include "output.h"
#include "bit.h"
#include "print.h"
+#include "crc.h"
static int crc_f(int argc, char **argv);
static void crc_help(void);
@@ -21,6 +21,7 @@
#include "print.h"
#include "write.h"
#include "malloc.h"
+#include "fuzz.h"
static int fuzz_f(int argc, char **argv);
static void fuzz_help(void);
@@ -10,6 +10,7 @@
#include "type.h"
#include "io.h"
#include "output.h"
+#include "hash.h"
static int hash_f(int argc, char **argv);
static void hash_help(void);
@@ -9,6 +9,7 @@
#include "init.h"
#include "output.h"
#include "libxlog.h"
+#include "logformat.h"
#define MAX_LSUNIT 256 * 1024 /* max log buf. size */
@@ -11,7 +11,7 @@
#include "field.h"
#include "bit.h"
#include "init.h"
-
+#include "symlink.h"
/*
* XXX: no idea how to handle multiple contiguous block symlinks here.
@@ -17,6 +17,7 @@
#include "io.h"
#include "output.h"
#include "init.h"
+#include "text.h"
static void print_rawtext(void *data, int len);
@@ -69,6 +69,12 @@ avl64_insert_immediate(
avl64node_t *afterp,
avl64node_t *newnode);
+avl64node_t *
+avl64_firstino(avl64node_t *root);
+
+avl64node_t *
+avl64_lastino(avl64node_t *root);
+
void
avl64_init_tree(
avl64tree_desc_t *tree,
@@ -6,6 +6,8 @@
#ifndef __KMEM_H__
#define __KMEM_H__
+#include <stdlib.h>
+
#define KM_SLEEP 0x0001u
#define KM_NOSLEEP 0x0002u
#define KM_NOFS 0x0004u
@@ -133,8 +133,6 @@ extern dev_t libxfs_device_open (char *, int, int, int);
extern void libxfs_device_close (dev_t);
extern int libxfs_device_alignment (void);
extern void libxfs_report(FILE *);
-extern void platform_findsizes(char *path, int fd, long long *sz, int *bsz);
-extern int platform_nproc(void);
/* check or write log footer: specify device, log size in blocks & uuid */
typedef char *(libxfs_get_block_t)(char *, int, void *);
@@ -9,6 +9,7 @@
#include <sys/time.h>
#include <sys/resource.h>
#include "init.h"
+#include "io.h"
static cmdinfo_t getrusage_cmd;
@@ -8,6 +8,7 @@
#include <libdevmapper.h>
#include "command.h"
#include "init.h"
+#include "io.h"
static cmdinfo_t log_writes_cmd;
@@ -33,6 +33,7 @@
#include "xfs.h"
#include "xfs_arch.h"
#include "crc32defs.h"
+#include "crc32c.h"
/* types specifc to this file */
typedef __u8 u8;
@@ -10,6 +10,7 @@
#include <sys/sysinfo.h>
#include "libxfs_priv.h"
+#include "init.h"
#include "xfs_fs.h"
extern char *progname;
@@ -10,6 +10,7 @@
# include <blkid/blkid.h>
#endif /* ENABLE_BLKID */
#include "xfs_multidisk.h"
+#include "init.h"
#define TERABYTES(count, blog) ((uint64_t)(count) << (40 - (blog)))
#define GIGABYTES(count, blog) ((uint64_t)(count) << (30 - (blog)))
@@ -363,15 +363,6 @@ done:
static int
manage_zones(int release)
{
- extern kmem_zone_t *xfs_buf_zone;
- extern kmem_zone_t *xfs_ili_zone;
- extern kmem_zone_t *xfs_inode_zone;
- extern kmem_zone_t *xfs_ifork_zone;
- extern kmem_zone_t *xfs_buf_item_zone;
- extern kmem_zone_t *xfs_da_state_zone;
- extern kmem_zone_t *xfs_btree_cur_zone;
- extern kmem_zone_t *xfs_bmap_free_item_zone;
- extern kmem_zone_t *xfs_trans_zone;
extern void xfs_dir_startup();
if (release) { /* free zone allocation */
@@ -6,7 +6,10 @@
#ifndef LIBXFS_INIT_H
#define LIBXFS_INIT_H
+#include "kmem.h"
+
struct stat;
+extern int use_xfs_buf_lock;
extern int platform_check_ismounted (char *path, char *block,
struct stat *sptr, int verbose);
@@ -19,5 +22,13 @@ extern char *platform_findblockpath (char *path);
extern int platform_direct_blockdev (void);
extern int platform_align_blockdev (void);
extern unsigned long platform_physmem(void); /* in kilobytes */
+extern void platform_findsizes(char *path, int fd, long long *sz, int *bsz);
+extern int platform_nproc(void);
+
+extern kmem_zone_t *xfs_buf_item_zone;
+extern kmem_zone_t *xfs_ili_zone;
+extern kmem_zone_t *xfs_buf_zone;
+extern kmem_zone_t *xfs_inode_zone;
+extern kmem_zone_t *xfs_trans_zone;
#endif /* LIBXFS_INIT_H */
@@ -15,6 +15,7 @@
#include "xfs_inode_fork.h"
#include "xfs_inode.h"
#include "xfs_trans.h"
+#include "init.h"
kmem_zone_t *xfs_buf_item_zone;
kmem_zone_t *xfs_ili_zone; /* inode log item zone */
@@ -18,6 +18,7 @@
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_defer.h"
+#include "init.h"
static void xfs_trans_free_items(struct xfs_trans *tp);
STATIC struct xfs_trans *xfs_trans_dup(struct xfs_trans *tp);
@@ -5,6 +5,7 @@
*/
#include "libxfs_priv.h"
+#include "libxfs.h"
#include "libxfs_io.h"
#include "init.h"
#include "xfs_fs.h"
@@ -5,6 +5,7 @@
*/
#include "libxfs.h"
+#include "init.h"
#include "xfs_metadump.h"
char *progname;
@@ -183,8 +184,6 @@ usage(void)
exit(1);
}
-extern int platform_check_ismounted(char *, char *, struct stat *, int);
-
int
main(
int argc,
@@ -15,8 +15,6 @@
#include "progress.h"
#include "scan.h"
-void set_mp(xfs_mount_t *mpp);
-
/* workaround craziness in the xlog routines */
int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *t, int p)
{
@@ -58,4 +58,5 @@ scan_ags(
struct xfs_mount *mp,
int scan_threads);
+extern void set_mp(xfs_mount_t *mpp);
#endif /* _XR_SCAN_H */
@@ -22,6 +22,7 @@
#include "dinode.h"
#include "slab.h"
#include "rmap.h"
+#include "init.h"
/*
* option tables for getsubopt calls
@@ -10,6 +10,7 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/statvfs.h>
+#include "libxfs.h"
#include "platform_defs.h"
#include "input.h"
#include "path.h"