btrfs: move maximum limits to btrfs_tree.h
authorJosef Bacik <josef@toxicpanda.com>
Wed, 14 Sep 2022 15:06:30 +0000 (11:06 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:37 +0000 (18:00 +0100)
We have maximum link and name length limits, move these to btrfs_tree.h
as they're on disk limitations.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ reformat comments ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
include/uapi/linux/btrfs_tree.h

index 7a80f93801467e4235ad47733802a94df0e6b35d..6a37df0fa0ebf0e44765076c01417cb24a761632 100644 (file)
@@ -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
index d43f67f676c21c92898a9a81cb23b3e4b4314fe1..4809272f50632f163d127e04650573cfb69b5cc1 100644 (file)
 
 #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