]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Remove defines pertaining to arbitrary limits not affecting GRUB
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 14 Jan 2012 10:30:43 +0000 (11:30 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 14 Jan 2012 10:30:43 +0000 (11:30 +0100)
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.

ChangeLog
grub-core/fs/ext2.c
grub-core/fs/nilfs2.c
grub-core/net/tftp.c
include/grub/i386/pc/pxe.h
include/grub/normal.h
include/grub/zfs/dnode.h
include/grub/zfs/spa.h
include/grub/zfs/zap_impl.h

index 3e34a478c6f55b6915e47abe1138847ec7b2bd17..80c774256005a74e357ec9fb39619dea0bd09dbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+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
index 6eb53d3f88803d6a02f4cb43c7d81a8688b55890..51f3a658fdd23ed05c5cd0afe6642012e7fa30b0 100644 (file)
 #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
index 0b001eb0e3ed2a3cf51a7cfcc59182c28354b835..c2eecba2f5e2299da3377b1780c4c3e837716636 100644 (file)
@@ -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 */
index c05ef24d49478eea6f0de00d00c1060ea6a11614..9704a345ba7fd20dfa2ff1c8a44555171d21bc8f 100644 (file)
@@ -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;
index 376a18962972e01793b357a13b7f71f66f19da1b..925631d04c059c77bd89be771cf171b2dd8e69a5 100644 (file)
 #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
index 08c14d20914befabf6ffdcf3cbfe9d3f9691fafb..84e387242694e9ab474a93d523ca99761f96d95d 100644 (file)
@@ -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
 
index 279c5451e8e5257d3fd2d9b7f0a8ef21d18e8fb1..5103b1c20add9ad20ff205c69077e769c637e257 100644 (file)
  */
 #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.
 #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)
 
index 0e29fa44ab3d5a8f3b440fea2648a28427d76043..19a2b640ad6b76b5bf062bb31c88e0541873633d 100644 (file)
 #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)
index e42727ab645f70a944fc555d96e5abb25d7103c9..0e985d9f910380b62c3506ef32728ccf7cb3416d 100644 (file)
@@ -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;