Re: [PATCH v3 1/5] btrfs: Move leaf and node validation checker to tree-checker.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 29, 2017 at 06:48:45AM +0000, Qu Wenruo wrote:
> It's no doubt the comprehensive tree block checker will become larger
> and larger, so move them into their own file is quite reasonable.
> 
> Signed-off-by: Qu Wenruo <quwenruo.btrfs@xxxxxxx>
> ---
>  fs/btrfs/Makefile       |   2 +-
>  fs/btrfs/ctree.h        |   4 +
>  fs/btrfs/disk-io.c      | 284 +-------------------------------------------
>  fs/btrfs/tree-checker.c | 309 ++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 317 insertions(+), 282 deletions(-)
>  create mode 100644 fs/btrfs/tree-checker.c
> 
> diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
> index 962a95aefb81..88255e133ade 100644
> --- a/fs/btrfs/Makefile
> +++ b/fs/btrfs/Makefile
> @@ -9,7 +9,7 @@ btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
>  	   export.o tree-log.o free-space-cache.o zlib.o lzo.o zstd.o \
>  	   compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o \
>  	   reada.o backref.o ulist.o qgroup.o send.o dev-replace.o raid56.o \
> -	   uuid-tree.o props.o hash.o free-space-tree.o
> +	   uuid-tree.o props.o hash.o free-space-tree.o tree-checker.o
>  
>  btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o
>  btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY) += check-integrity.o
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index ea9c5648ff70..6b7c6fcbc5d5 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3732,4 +3732,8 @@ static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info)
>  #endif
>  	return 0;
>  }
> +
> +/* Tree block validation checker */
> +int btrfs_check_leaf(struct btrfs_root *root, struct extent_buffer *leaf);
> +int btrfs_check_node(struct btrfs_root *root, struct extent_buffer *node);
>  #endif

Please add tree-checker.h for such definitions.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux