btrfs-progs: move internal.h to common/

Create directory for all sources that can be used by anything that's not
rellated to a relevant kernel part, all common functions, helpers,
utilities that do not fit any other specific category.

The traditional location would be probably lib/ with all things that are
statically linked to the main binaries, but we have libbtrfs and
libbtrfsutil so this would be confusing.

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2019-06-20 00:44:36 +02:00
parent 96f58629c6
commit f63f29e9e9
16 changed files with 18 additions and 18 deletions

View File

@ -613,21 +613,21 @@ tags: FORCE
@echo " [TAGS] $(TAGS_CMD)"
$(Q)$(TAGS_CMD) *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch] \
check/*.[ch] kernel-lib/*.[ch] kernel-shared/*.[ch] \
cmds/*.[ch] \
cmds/*.[ch] common/*.[ch] \
libbtrfsutil/*.[ch]
etags: FORCE
@echo " [ETAGS] $(ETAGS_CMD)"
$(Q)$(ETAGS_CMD) *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch] \
check/*.[ch] kernel-lib/*.[ch] kernel-shared/*.[ch] \
cmds/*.[ch] \
cmds/*.[ch] common/*.[ch] \
libbtrfsutil/*.[ch]
cscope: FORCE
@echo " [CSCOPE] $(CSCOPE_CMD)"
$(Q)ls -1 *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch] check/*.[ch] \
kernel-lib/*.[ch] kernel-shared/*.[ch] libbtrfsutil/*.[ch] \
cmds/*.[ch] \
cmds/*.[ch] common/*.[ch] \
> cscope.files
$(Q)$(CSCOPE_CMD)
@ -641,7 +641,7 @@ clean: $(CLEANDIRS)
image/*.o image/*.o.d \
convert/*.o convert/*.o.d \
mkfs/*.o mkfs/*.o.d check/*.o check/*.o.d \
cmds/*.o cmds/*.o.d \
cmds/*.o cmds/*.o.d common/*.o common/*.o.d \
ioctl-test quick-test library-test library-test-static \
mktables btrfs.static mkfs.btrfs.static fssum \
$(check_defs) \

View File

@ -22,7 +22,7 @@
#include "backref.h"
#include "kernel-shared/ulist.h"
#include "transaction.h"
#include "internal.h"
#include "common/internal.h"
#define pr_debug(...) do { } while (0)

View File

@ -16,7 +16,7 @@
#include <time.h>
#include "ctree.h"
#include "internal.h"
#include "common/internal.h"
#include "messages.h"
#include "transaction.h"
#include "utils.h"

View File

@ -22,7 +22,7 @@
#include "disk-io.h"
#include "backref.h"
#include "hash.h"
#include "internal.h"
#include "common/internal.h"
#include "utils.h"
#include "volumes.h"
#include "check/mode-common.h"

View File

@ -16,7 +16,7 @@
#include "kerncompat.h"
#include <unistd.h>
#include "internal.h"
#include "common/internal.h"
#include "disk-io.h"
#include "volumes.h"
#include "convert/common.h"

View File

@ -20,7 +20,7 @@
#include "transaction.h"
#include "print-tree.h"
#include "repair.h"
#include "internal.h"
#include "common/internal.h"
#include "sizes.h"
#include "messages.h"
#include "volumes.h"

View File

@ -29,7 +29,7 @@
#include "ctree.h"
#include "volumes.h"
#include "utils.h"
#include "internal.h"
#include "common/internal.h"
void extent_io_tree_init(struct extent_io_tree *tree)
{

View File

@ -25,7 +25,7 @@
#include "transaction.h"
#include "print-tree.h"
#include "crc32c.h"
#include "internal.h"
#include "common/internal.h"
#define MAX_CSUM_ITEMS(r, size) ((((BTRFS_LEAF_DATA_SIZE(r->fs_info) - \
sizeof(struct btrfs_item) * 2) / \

View File

@ -24,7 +24,7 @@
#include "extent_io.h"
#include "crc32c.h"
#include "bitops.h"
#include "internal.h"
#include "common/internal.h"
#include "utils.h"
/*

View File

@ -23,7 +23,7 @@
#include "volumes.h"
#include "transaction.h"
#include "bitops.h"
#include "internal.h"
#include "common/internal.h"
static struct btrfs_free_space_info *
search_free_space_info(struct btrfs_trans_handle *trans,

View File

@ -15,7 +15,7 @@
*/
#include "kerncompat.h"
#include "internal.h"
#include "common/internal.h"
#include "messages.h"
#include "utils.h"
#include "kernel-lib/crc32c.h"

View File

@ -19,7 +19,7 @@
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
#include "internal.h"
#include "common/internal.h"
/*
* walks the btree of allocated inodes and find a hole.

View File

@ -3,7 +3,7 @@
#include <linux/kernel.h>
#include <endian.h>
#include "internal.h"
#include "common/internal.h"
#ifndef DIV_ROUND_UP
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))

View File

@ -27,7 +27,7 @@
#include <ftw.h>
#include "ctree.h"
#include "volumes.h"
#include "internal.h"
#include "common/internal.h"
#include "disk-io.h"
#include "messages.h"
#include "transaction.h"

View File

@ -24,7 +24,7 @@
#include <dirent.h>
#include <stdarg.h>
#include "common-defs.h"
#include "internal.h"
#include "common/internal.h"
#include "btrfs-list.h"
#include "sizes.h"
#include "messages.h"