From: Josef Bacik Date: Wed, 14 Sep 2022 15:06:30 +0000 (-0400) Subject: btrfs: move maximum limits to btrfs_tree.h X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ad4b63caf56d0dc08e03966172d685ff9ebad996;p=linux.git btrfs: move maximum limits to btrfs_tree.h We have maximum link and name length limits, move these to btrfs_tree.h as they're on disk limitations. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ reformat comments ] Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 7a80f93801467..6a37df0fa0ebf 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -68,19 +68,6 @@ struct reloc_control; #define BTRFS_OLDEST_GENERATION 0ULL -/* - * we can actually store much bigger names, but lets not confuse the rest - * of linux - */ -#define BTRFS_NAME_LEN 255 - -/* - * Theoretical limit is larger, but we keep this down to a sane - * value. That should limit greatly the possibility of collisions on - * inode ref items. - */ -#define BTRFS_LINK_MAX 65535U - #define BTRFS_EMPTY_DIR_SIZE 0 #define BTRFS_DIRTY_METADATA_THRESH SZ_32M diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h index d43f67f676c21..4809272f50632 100644 --- a/include/uapi/linux/btrfs_tree.h +++ b/include/uapi/linux/btrfs_tree.h @@ -15,6 +15,18 @@ #define BTRFS_MAX_LEVEL 8 +/* + * We can actually store much bigger names, but lets not confuse the rest of + * linux. + */ +#define BTRFS_NAME_LEN 255 + +/* + * Theoretical limit is larger, but we keep this down to a sane value. That + * should limit greatly the possibility of collisions on inode ref items. + */ +#define BTRFS_LINK_MAX 65535U + /* * This header contains the structure definitions and constants used * by file system objects that can be retrieved using