btrfs-progs: move utils.[ch] to common/
Update include paths and remove some duplicates. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
408cec5086
commit
c07960c8be
2
Makefile
2
Makefile
|
@ -129,7 +129,7 @@ CHECKER_FLAGS := -include $(check_defs) -D__CHECKER__ \
|
|||
|
||||
objects = ctree.o disk-io.o kernel-lib/radix-tree.o extent-tree.o print-tree.o \
|
||||
root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \
|
||||
extent-cache.o extent_io.o volumes.o utils.o repair.o \
|
||||
extent-cache.o extent_io.o volumes.o common/utils.o repair.o \
|
||||
qgroup.o free-space-cache.o kernel-lib/list_sort.o props.o \
|
||||
kernel-shared/ulist.o qgroup-verify.o backref.o common/string-table.o \
|
||||
common/task-utils.o \
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "print-tree.h"
|
||||
#include "transaction.h"
|
||||
#include "list.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
#define FIELD_BUF_LEN 80
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "crc32c.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
void print_usage(int status)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "transaction.h"
|
||||
#include "list.h"
|
||||
#include "volumes.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "crc32c.h"
|
||||
#include "extent-cache.h"
|
||||
#include "find-root.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "kerncompat.h"
|
||||
#include "ctree.h"
|
||||
#include "ioctl.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
static int use_color;
|
||||
static void
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <libgen.h>
|
||||
#include "ctree.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "ioctl.h"
|
||||
#include <uuid/uuid.h>
|
||||
#include "btrfs-list.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "print-tree.h"
|
||||
#include "transaction.h"
|
||||
#include "list.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
#define BUFFER_SIZE SZ_64K
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "print-tree.h"
|
||||
#include "transaction.h"
|
||||
#include "list.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static void print_usage(void)
|
||||
|
|
2
btrfs.c
2
btrfs.c
|
@ -22,7 +22,7 @@
|
|||
#include "volumes.h"
|
||||
#include "crc32c.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static const char * const btrfs_cmd_group_usage[] = {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "common/help.h"
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "print-tree.h"
|
||||
#include "common/task-utils.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "free-space-cache.h"
|
||||
#include "free-space-tree.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "common/internal.h"
|
||||
#include "common/messages.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "disk-io.h"
|
||||
#include "repair.h"
|
||||
#include "check/mode-common.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "backref.h"
|
||||
#include "hash.h"
|
||||
#include "common/internal.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "check/mode-common.h"
|
||||
#include "check/mode-lowmem.h"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "volumes.h"
|
||||
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static const char * const balance_cmd_group_usage[] = {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "kerncompat.h"
|
||||
#include "ctree.h"
|
||||
#include "ioctl.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "cmds/filesystem-usage.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#define FIEMAP_EXTENT_SHARED 0x00002000
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "kerncompat.h"
|
||||
#include "rbtree.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <getopt.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "kerncompat.h"
|
||||
#include "ctree.h"
|
||||
#include "common/string-table.h"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include "kerncompat.h"
|
||||
#include "ctree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "cmds/filesystem-usage.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "print-tree.h"
|
||||
#include "transaction.h"
|
||||
#include "list.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "crc32c.h"
|
||||
#include "common/help.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "transaction.h"
|
||||
#include "volumes.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static void print_extents(struct extent_buffer *eb)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "transaction.h"
|
||||
#include "list.h"
|
||||
#include "volumes.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "common/help.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "kerncompat.h"
|
||||
#include "ioctl.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "ctree.h"
|
||||
#include "send-utils.h"
|
||||
#include "disk-io.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "cmds/commands.h"
|
||||
#include "props.h"
|
||||
#include "ctree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static const char * const property_cmd_group_usage[] = {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "cmds/commands.h"
|
||||
#include "qgroup.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static const char * const qgroup_cmd_group_usage[] = {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "ioctl.h"
|
||||
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static const char * const quota_cmd_group_usage[] = {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "ctree.h"
|
||||
#include "ioctl.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "list.h"
|
||||
#include "btrfs-list.h"
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "kerncompat.h"
|
||||
#include "ctree.h"
|
||||
#include "ioctl.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "disk-io.h"
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "volumes.h"
|
||||
#include "transaction.h"
|
||||
#include "crc32c.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "btrfsck.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "cmds/rescue.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "list.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "crc32c.h"
|
||||
#include "volumes.h"
|
||||
#include "cmds/commands.h"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "transaction.h"
|
||||
#include "disk-io.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
#include "cmds/rescue.h"
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "transaction.h"
|
||||
#include "list.h"
|
||||
#include "volumes.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "common/help.h"
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "ctree.h"
|
||||
#include "ioctl.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "disk-io.h"
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "ioctl.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "list.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "send.h"
|
||||
#include "send-utils.h"
|
||||
|
|
|
@ -37,9 +37,8 @@
|
|||
|
||||
#include "ctree.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "btrfs-list.h"
|
||||
#include "utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static int wait_for_subvolume_cleaning(int fd, size_t count, uint64_t *ids,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <linux/version.h>
|
||||
#include "common/fsfeatures.h"
|
||||
#include "ctree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
/*
|
||||
* Insert a root item for temporary tree root
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <getopt.h>
|
||||
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
||||
#define USAGE_SHORT 1U
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "crc32c.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "ioctl.h"
|
||||
#include "cmds/commands.h"
|
|
@ -18,7 +18,7 @@
|
|||
#include <uuid/uuid.h>
|
||||
#include "disk-io.h"
|
||||
#include "volumes.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "mkfs/common.h"
|
||||
#include "convert/common.h"
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
#include "disk-io.h"
|
||||
#include "volumes.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/task-utils.h"
|
||||
#include "common/help.h"
|
||||
#include "mkfs/common.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <pthread.h>
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "convert/common.h"
|
||||
#include "convert/source-ext2.h"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <stdbool.h>
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "bitops.h"
|
||||
#include "convert/common.h"
|
||||
#include "convert/source-reiserfs.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "volumes.h"
|
||||
#include "transaction.h"
|
||||
#include "crc32c.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "print-tree.h"
|
||||
#include "rbtree-utils.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "volumes.h"
|
||||
#include "free-space-cache.h"
|
||||
#include "free-space-tree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
#define PENDING_EXTENT_INSERT 0
|
||||
#define PENDING_EXTENT_DELETE 1
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "list.h"
|
||||
#include "ctree.h"
|
||||
#include "volumes.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/internal.h"
|
||||
|
||||
void extent_io_tree_init(struct extent_io_tree *tree)
|
||||
|
|
2
file.c
2
file.c
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <sys/stat.h>
|
||||
#include "ctree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "kerncompat.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "ctree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "find-root.h"
|
||||
#include "volumes.h"
|
||||
#include "disk-io.h"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "crc32c.h"
|
||||
#include "bitops.h"
|
||||
#include "common/internal.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
/*
|
||||
* Kernel always uses PAGE_CACHE_SIZE for sectorsize, but we don't have
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "volumes.h"
|
||||
#include "extent_io.h"
|
||||
#include "common/help.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "kerncompat.h"
|
||||
#include "common/internal.h"
|
||||
#include "common/messages.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "image/sanitize.h"
|
||||
#include "extent_io.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "volumes.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "kernel-lib/raid56.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "volumes.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "mkfs/common.h"
|
||||
|
||||
static u64 reference_root_table[] = {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "disk-io.h"
|
||||
#include "volumes.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "list_sort.h"
|
||||
#include "common/help.h"
|
||||
#include "rbtree-utils.h"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "disk-io.h"
|
||||
#include "common/messages.h"
|
||||
#include "transaction.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "mkfs/rootdir.h"
|
||||
#include "mkfs/common.h"
|
||||
#include "send-utils.h"
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "print-tree.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
static void print_dir_item_type(struct extent_buffer *eb,
|
||||
struct btrfs_dir_item *di)
|
||||
|
|
2
props.c
2
props.c
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "ctree.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "props.h"
|
||||
|
||||
#define XATTR_BTRFS_PREFIX "btrfs."
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "print-tree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "kernel-shared/ulist.h"
|
||||
#include "rbtree-utils.h"
|
||||
#include "transaction.h"
|
||||
|
|
2
qgroup.c
2
qgroup.c
|
@ -20,7 +20,7 @@
|
|||
#include <sys/ioctl.h>
|
||||
#include "ctree.h"
|
||||
#include "ioctl.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include <errno.h>
|
||||
|
||||
#define BTRFS_QGROUP_NFILTERS_INCREASE (2 * BTRFS_QGROUP_FILTER_MAX)
|
||||
|
|
2
repair.c
2
repair.c
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "ctree.h"
|
||||
#include "extent-cache.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "repair.h"
|
||||
|
||||
int repair = 0;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <ctype.h>
|
||||
#include <asm/types.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "send-utils.h"
|
||||
#include "send-stream.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "send.h"
|
||||
#include "send-stream.h"
|
||||
#include "crc32c.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
struct btrfs_send_stream {
|
||||
int fd;
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
#include "kerncompat.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <ioctl.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#if BTRFS_FLAT_INCLUDES
|
||||
#include "ctree.h"
|
||||
#else
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "transaction.h"
|
||||
#include "disk-io.h"
|
||||
#include "print-tree.h"
|
||||
#include "utils.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
void btrfs_uuid_to_key(const u8 *uuid, struct btrfs_key *key)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue