Commit 75b49ebe authored by Vladimir 'phcoder' Serbinenko's avatar Vladimir 'phcoder' Serbinenko
Browse files

Remove defines pertaining to arbitrary limits not affecting GRUB

	anymore.

	* grub-core/fs/ext2.c (EXT2_PATH_MAX): Removed.
	(EXT2_MAX_SYMLINKCNT): Likewise.
	* grub-core/fs/nilfs2.c (NILFS_BTREE_LEVEL_MAX): Likewise.
	* grub-core/net/tftp.c (TFTP_MAX_PACKET): Likewise.
	* include/grub/i386/pc/pxe.h (GRUB_PXE_MIN_BLKSIZE): Likewise.
	(GRUB_PXE_MAX_BLKSIZE): Likewise.
	* include/grub/normal.h (GRUB_MAX_CMDLINE): Likewise.
	* include/grub/zfs/dnode.h (DN_MAX_INDBLKSHIFT): Likewise.
	(DN_MAX_OBJECT_SHIFT): Likewise.
	(DN_MAX_OFFSET_SHIFT): Likewise.
	(DN_MAX_OBJECT): Likewise.
	(DNODES_PER_LEVEL_SHIFT): Likewise.
	* include/grub/zfs/spa.h (SPA_MAXBLOCKSHIFT): Likewise.
	(SPA_MAXBLOCKSIZE): Likewise.
	(SPA_BLOCKSIZES): Likewise.
	* include/grub/zfs/zap_impl.h (MZAP_MAX_BLKSHIFT): Likewise.
	(MZAP_MAX_BLKSZ): Likewise.
parent 74a1dce7
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
Remove defines pertaining to arbitrary limits not affecting GRUB
anymore.
* grub-core/fs/ext2.c (EXT2_PATH_MAX): Removed.
(EXT2_MAX_SYMLINKCNT): Likewise.
* grub-core/fs/nilfs2.c (NILFS_BTREE_LEVEL_MAX): Likewise.
* grub-core/net/tftp.c (TFTP_MAX_PACKET): Likewise.
* include/grub/i386/pc/pxe.h (GRUB_PXE_MIN_BLKSIZE): Likewise.
(GRUB_PXE_MAX_BLKSIZE): Likewise.
* include/grub/normal.h (GRUB_MAX_CMDLINE): Likewise.
* include/grub/zfs/dnode.h (DN_MAX_INDBLKSHIFT): Likewise.
(DN_MAX_OBJECT_SHIFT): Likewise.
(DN_MAX_OFFSET_SHIFT): Likewise.
(DN_MAX_OBJECT): Likewise.
(DNODES_PER_LEVEL_SHIFT): Likewise.
* include/grub/zfs/spa.h (SPA_MAXBLOCKSHIFT): Likewise.
(SPA_MAXBLOCKSIZE): Likewise.
(SPA_BLOCKSIZES): Likewise.
* include/grub/zfs/zap_impl.h (MZAP_MAX_BLKSHIFT): Likewise.
(MZAP_MAX_BLKSZ): Likewise.
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
 
* grub-core/fs/zfs/zfs.c (grub_zfs_read): Remove useless alloc and
......@@ -21,10 +21,6 @@
#define EXT2_MAGIC 0xEF53
/* Amount of indirect blocks in an inode. */
#define INDIRECT_BLOCKS 12
/* Maximum length of a pathname. */
#define EXT2_PATH_MAX 4096
/* Maximum nesting of symlinks, used to prevent a loop. */
#define EXT2_MAX_SYMLINKCNT 8
/* The good old revision and the default inode size. */
#define EXT2_GOOD_OLD_REVISION 0
......
......@@ -49,7 +49,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
/* nilfs btree node level. */
#define NILFS_BTREE_LEVEL_DATA 0
#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
#define NILFS_BTREE_LEVEL_MAX 14
/* nilfs 1st super block posission from beginning of the partition
in 512 block size */
......
......@@ -41,7 +41,6 @@ enum
enum
{
TFTP_DEFAULTSIZE_PACKET = 512,
TFTP_MAX_PACKET = 1432
};
enum
......@@ -81,7 +80,7 @@ struct tftphdr {
grub_int8_t rrq[TFTP_DEFAULTSIZE_PACKET];
struct {
grub_uint16_t block;
grub_int8_t download[TFTP_MAX_PACKET];
grub_int8_t download[0];
} data;
struct {
grub_uint16_t block;
......
......@@ -157,9 +157,6 @@
#define GRUB_PXE_BOOTP_SIZE (312 + 236) /* DHCP standard vendor field size. */
#endif
#define GRUB_PXE_MIN_BLKSIZE 512
#define GRUB_PXE_MAX_BLKSIZE 1432
#define GRUB_PXE_TFTP_PORT 69
#define GRUB_PXE_ERR_LEN 0xFFFFFFFF
......
......@@ -28,9 +28,6 @@
#include <grub/command.h>
#include <grub/file.h>
/* The maximum size of a command-line. */
#define GRUB_MAX_CMDLINE 1600
/* The standard left and right margin for some messages. */
#define STANDARD_MARGIN 6
......
......@@ -30,11 +30,8 @@
*/
#define DNODE_SHIFT 9 /* 512 bytes */
#define DN_MIN_INDBLKSHIFT 10 /* 1k */
#define DN_MAX_INDBLKSHIFT 14 /* 16k */
#define DNODE_BLOCK_SHIFT 14 /* 16k */
#define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */
#define DN_MAX_OBJECT_SHIFT 48 /* 256 trillion (zfs_fid_t limit) */
#define DN_MAX_OFFSET_SHIFT 64 /* 2^64 bytes in a dnode */
/*
* Derived constants.
......@@ -42,11 +39,9 @@
#define DNODE_SIZE (1 << DNODE_SHIFT)
#define DN_MAX_NBLKPTR ((DNODE_SIZE - DNODE_CORE_SIZE) >> SPA_BLKPTRSHIFT)
#define DN_MAX_BONUSLEN (DNODE_SIZE - DNODE_CORE_SIZE - (1 << SPA_BLKPTRSHIFT))
#define DN_MAX_OBJECT (1ULL << DN_MAX_OBJECT_SHIFT)
#define DNODES_PER_BLOCK_SHIFT (DNODE_BLOCK_SHIFT - DNODE_SHIFT)
#define DNODES_PER_BLOCK (1ULL << DNODES_PER_BLOCK_SHIFT)
#define DNODES_PER_LEVEL_SHIFT (DN_MAX_INDBLKSHIFT - SPA_BLKPTRSHIFT)
#define DNODE_FLAG_SPILL_BLKPTR (1<<2)
......
......@@ -66,17 +66,8 @@
#define BF64_SET_SB(x, low, len, shift, bias, val) \
BF64_SET(x, low, len, ((val) >> (shift)) - (bias))
/*
* We currently support nine block sizes, from 512 bytes to 128K.
* We could go higher, but the benefits are near-zero and the cost
* of COWing a giant block to modify one byte would become excessive.
*/
#define SPA_MINBLOCKSHIFT 9
#define SPA_MAXBLOCKSHIFT 17
#define SPA_MINBLOCKSIZE (1ULL << SPA_MINBLOCKSHIFT)
#define SPA_MAXBLOCKSIZE (1ULL << SPA_MAXBLOCKSHIFT)
#define SPA_BLOCKSIZES (SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1)
/*
* Size of block to hold the configuration data (a packed nvlist)
......
......@@ -28,8 +28,6 @@
#define ZAP_HASHBITS 28
#define MZAP_ENT_LEN 64
#define MZAP_NAME_LEN (MZAP_ENT_LEN - 8 - 4 - 2)
#define MZAP_MAX_BLKSHIFT SPA_MAXBLOCKSHIFT
#define MZAP_MAX_BLKSZ (1 << MZAP_MAX_BLKSHIFT)
typedef struct mzap_ent_phys {
grub_uint64_t mze_value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment