btrfs-progs: check: Move lowmem check code to its own check/lowmem.[ch]

Since lowmem mode code is highly internally connected, it's pretty hard to
move them piece by piece.
In theory it's possible to move part of the functions and temporarily
export them, but it will just cause extra temporarily modifications.

So this patch moves the whole lowmem check part into its own
check/lowmem.[ch].

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2018-02-01 13:37:31 +08:00 committed by David Sterba
parent 5dade4b951
commit b8d706e58e
4 changed files with 4574 additions and 4556 deletions

View File

@ -113,7 +113,7 @@ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o \
cmds-property.o cmds-fi-usage.o cmds-inspect-dump-tree.o \
cmds-inspect-dump-super.o cmds-inspect-tree-stats.o cmds-fi-du.o \
mkfs/common.o check/common.o
mkfs/common.o check/common.o check/lowmem.o
libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
kernel-lib/crc32c.o messages.o \
uuid-tree.o utils-lib.o rbtree-utils.o

4568
check/lowmem.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,8 @@
#ifndef __BTRFS_CHECK_LOWMEM_H__
#define __BTRFS_CHECK_LOWMEM_H__
#include "check/common.h"
#define ROOT_DIR_ERROR (1<<1) /* bad ROOT_DIR */
#define DIR_ITEM_MISSING (1<<2) /* DIR_ITEM not found */
#define DIR_ITEM_MISMATCH (1<<3) /* DIR_ITEM found but not match */
@ -59,4 +61,7 @@
#define ACCOUNTING_MISMATCH (1 << 7) /* Used space accounting error */
#define CHUNK_TYPE_MISMATCH (1 << 8)
int check_fs_roots_v2(struct btrfs_fs_info *fs_info);
int check_chunks_and_extents_v2(struct btrfs_fs_info *fs_info);
#endif

File diff suppressed because it is too large Load Diff