Re: [PATCH] btrfs-progs: Use shared kernel btrfs_tree.h

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

 



On Tue, Apr 07, 2020 at 03:52:09PM +0800, Qu Wenruo wrote:
> Unlike kernel, btrfs-progs uses a monolithic ctree.h to define both
> on-disk data and runtime structures.
> 
> This is not good for future development, especially when we need a
> read-only code basis, for projects like U-boot.
> 
> This patch will cross-port the btree_header.h file to btrfs-progs. The

btrfs_tree.h

> only modification is to remove the existing headers.

As this is supposed to be copy of the kernel file, the progs patch
should use the final version once it's done.

> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
> ---

> diff --git a/kernel-shared/btrfs_tree.h b/kernel-shared/btrfs_tree.h
> new file mode 100644
> index 000000000000..c595d3c78a8e
> --- /dev/null
> +++ b/kernel-shared/btrfs_tree.h
> @@ -0,0 +1,991 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +#ifndef _BTRFS_CTREE_H_
> +#define _BTRFS_CTREE_H_

The define should roughly match the file name, _BTRFS_CTREE_H_ is too
close to __BTRFS_CTREE_H__ that's in ctree.h

> +
> +/*
> + * Cross-ported from kernel/include/uapi/linux/btrfs_tree.h.
> + *
> + * With include files removed.
> + */



[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