+2006-07-15 Theodore Tso <tytso@mit.edu>
+
+ * ext2fs.h: Remove unneeded #ifdef since EXT2_DYNAMIC_REV is
+ always defined in the e2fsprogs-provided ext2_fs.h
+
2006-05-21 Theodore Tso <tytso@mit.edu>
* openfs.c (ext2fs_open2): Fix type warning problem with sizeof()
typedef struct ext2fs_struct_generic_bitmap *ext2fs_inode_bitmap;
typedef struct ext2fs_struct_generic_bitmap *ext2fs_block_bitmap;
-#ifdef EXT2_DYNAMIC_REV
#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO(s)
-#else
-#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO
-#define EXT2_INODE_SIZE(s) sizeof(struct ext2_inode)
-#endif
+
/*
- * badblocks list definitions
+ * Badblocks list definitions
*/
typedef struct ext2_struct_u32_list *ext2_badblocks_list;
2006-07-15 Theodore Tso <tytso@mit.edu>
+ * mke2fs.c (PRS): Look up the default inode size in the
+ mke2fs.conf file.
+
+ * mke2fs.8.in, mke2fs.c(usage): Document the -I option.
+
+ * mke2fs.conf.5.in: Document the inode_size relation in [defaults]
+ and [fs_types].
+
* chattr.1.in: Fix spelling typo
2006-05-29 Theodore Tso <tytso@mit.edu>
.I bytes-per-inode
]
[
+.B \-I
+.I inode-size
+]
+[
.B \-j
]
[
inodes will be made. Be warned that is not possible to expand the number
of inodes on a filesystem after it is created, so be careful deciding the
correct value for this parameter.
+.TP
+.BI \-I " inode-size"
+Specify the size of each inode in bytes.
+.B mke2fs
+creates 128-byte inodes by default. In kernels after 2.6.10 and some
+earlier vendor kernels it is possible to utilize larger inodes to store
+extended attributes for improved performance. The
+.I inode-size
+value must be a power of two larger or equal to 128. The larger the
+.I inode-size
+the more space the inode table will consume, and this reduces the usable
+space in the filesystem and can also negatively impact performance. Using
+the default value is always safe, though it may be desirable to use 256-byte
+inodes if full backward compatibility is not a concern. Extended attributes
+stored in large inodes are not visible with older kernels, and such
+filesystems will not be mountable with 2.4 kernels at all. It is not
+possible to change this value after the filesystem is created.
.TP
.B \-j
Create the filesystem with an ext3 journal. If the
static void usage(void)
{
fprintf(stderr, _("Usage: %s [-c|-t|-l filename] [-b block-size] "
- "[-f fragment-size]\n\t[-i bytes-per-inode] [-j] [-J journal-options]"
- " [-N number-of-inodes]\n\t[-m reserved-blocks-percentage] "
- "[-o creator-os] [-g blocks-per-group]\n\t[-L volume-label] "
- "[-M last-mounted-directory] [-O feature[,...]]\n\t"
- "[-r fs-revision] [-R options] [-qvSV] device [blocks-count]\n"),
+ "[-f fragment-size]\n\t[-i bytes-per-inode] [-I inode-size] "
+ "[-j] [-J journal-options]\n"
+ "\t[-N number-of-inodes] [-m reserved-blocks-percentage] "
+ "[-o creator-os]\n\t[-g blocks-per-group] [-L volume-label] "
+ "[-M last-mounted-directory]\n\t[-O feature[,...]] "
+ "[-r fs-revision] [-R options] [-qvSV]\n\tdevice [blocks-count]\n"),
program_name);
exit(1);
}
case 's': /* deprecated */
s_opt = atoi(optarg);
break;
-#ifdef EXT2_DYNAMIC_REV
case 'I':
inode_size = strtoul(optarg, &tmp, 0);
if (*tmp) {
exit(1);
}
break;
-#endif
case 'v':
verbose = 1;
break;
"blocksizes greater than 4096\n\tusing ext3. "
"Use -b 4096 if this is an issue for you.\n\n"));
- if (inode_size) {
+ if (inode_size == 0) {
+ profile_get_integer(profile, "defaults", "inode_size", NULL,
+ 0, &inode_size);
+ profile_get_integer(profile, "fs_types", fs_type,
+ "inode_size", inode_size,
+ &inode_size);
+ }
+
+ if (inode_size && fs_param.s_rev_level >= EXT2_DYNAMIC_REV) {
if (inode_size < EXT2_GOOD_OLD_INODE_SIZE ||
inode_size > EXT2_BLOCK_SIZE(&fs_param) ||
inode_size & (inode_size - 1)) {
}
if (inode_size != EXT2_GOOD_OLD_INODE_SIZE)
fprintf(stderr, _("Warning: %d-byte inodes not usable "
- "on most systems\n"),
+ "on older systems\n"),
inode_size);
fs_param.s_inode_size = inode_size;
}
specify one on the command line, and the filesystem-type
specific section of the configuration file does not specify a default
inode ratio.
+.TP
+.I inode_size
+This relation specifies the default inode size if the user does not
+specify one on the command line, and the filesystem-type
+specific section of the configuration file does not specify a default
+inode size.
.SH THE [fs_types] STANZA
Each tag in the
.I [fs_types]
.I inode_ratio
This relation specifies the default inode ratio if the user does not
specify one on the command line.
+.TP
+.I inode_size
+This relation specifies the default inode size if the user does not
+specify one on the command line.
.SH FILES
.TP
.I /etc/mke2fs.conf