btrfs-progs: move clear-cache.[ch] from check/ to common/ directory

The clear-cache functionality is shared by several commands:

- btrfs check
  For --clear-cache and --clear-ino-cache.

- btrfstune
  Mostly for block-group-tree feature conversion.

- btrfs-convert
  To enable the now default v2 space cache.

Thus it's no longer proper to keep clear-cache.[ch] under check/
directory, move them to common/ directory.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2023-10-09 15:16:59 +10:30 committed by David Sterba
parent 4c6f41f2b8
commit 146cca7e16
6 changed files with 7 additions and 7 deletions

View File

@ -242,7 +242,7 @@ cmds_objects = cmds/subvolume.o cmds/subvolume-list.o \
cmds/inspect-dump-super.o cmds/inspect-tree-stats.o cmds/filesystem-du.o \
cmds/reflink.o \
mkfs/common.o check/mode-common.o check/mode-lowmem.o \
check/clear-cache.o
common/clear-cache.o
libbtrfs_objects = \
kernel-lib/rbtree.o \
@ -262,12 +262,12 @@ libbtrfsutil_objects = libbtrfsutil/errors.o libbtrfsutil/filesystem.o \
libbtrfsutil/stubs.o
convert_objects = convert/main.o convert/common.o convert/source-fs.o \
convert/source-ext2.o convert/source-reiserfs.o \
mkfs/common.o check/clear-cache.o
mkfs/common.o common/clear-cache.o
mkfs_objects = mkfs/main.o mkfs/common.o mkfs/rootdir.o
image_objects = image/main.o image/sanitize.o image/image-create.o image/common.o \
image/image-restore.o
tune_objects = tune/main.o tune/seeding.o tune/change-uuid.o tune/change-metadata-uuid.o \
tune/convert-bgt.o tune/change-csum.o check/clear-cache.o tune/quota.o
tune/convert-bgt.o tune/change-csum.o common/clear-cache.o tune/quota.o
all_objects = $(objects) $(cmds_objects) $(libbtrfs_objects) $(convert_objects) \
$(mkfs_objects) $(image_objects) $(tune_objects) $(libbtrfsutil_objects)

View File

@ -58,6 +58,7 @@
#include "common/help.h"
#include "common/open-utils.h"
#include "common/string-utils.h"
#include "common/clear-cache.h"
#include "cmds/commands.h"
#include "mkfs/common.h"
#include "check/common.h"
@ -66,7 +67,6 @@
#include "check/mode-original.h"
#include "check/mode-lowmem.h"
#include "check/qgroup-verify.h"
#include "check/clear-cache.h"
/* Global context variables */
struct btrfs_fs_info *gfs_info;

View File

@ -33,7 +33,7 @@
#include "common/messages.h"
#include "check/repair.h"
#include "check/mode-common.h"
#include "check/clear-cache.h"
#include "common/clear-cache.h"
/*
* Number of free space cache inodes to delete in one transaction.

View File

@ -119,9 +119,9 @@
#include "common/box.h"
#include "common/open-utils.h"
#include "common/extent-tree-utils.h"
#include "common/clear-cache.h"
#include "cmds/commands.h"
#include "check/repair.h"
#include "check/clear-cache.h"
#include "mkfs/common.h"
#include "convert/common.h"
#include "convert/source-fs.h"

View File

@ -37,9 +37,9 @@
#include "common/string-utils.h"
#include "common/help.h"
#include "common/box.h"
#include "common/clear-cache.h"
#include "cmds/commands.h"
#include "tune/tune.h"
#include "check/clear-cache.h"
static char *device;
static int force = 0;