修改的部分
在mke2fs.c中
//write_inode_tables(fs, lazy_itable_init, itable_zeroed);
create_root_dir(fs);
create_lost_and_found(fs);
reserve_inodes(fs);
create_bad_block_inode(fs, bb_list);
//if (fs->super->s_feature_compat &
// EXT2_FEATURE_COMPAT_RESIZE_INODE) {
// retval = ext2fs_create_resize_inode(fs);
// if (retval) {
// com_err("ext2fs_create_resize_inode", retval,
// _("while reserving blocks for online resize"));
//exit(1);
// }
//}
1、在e2fsprogs-1.42.4执行
./configure --host=arm-linux CC=arm-hismall-linux-gcc --enable-elf-shlibs --prefix=/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/arm-hisi-linux --disable-tls --disable-defrag --disable-rpath --disable-nls --disable-debugfs --disable-imager --disable-resizer --disable-e2initrd-helper --disable-testio-debug --disable-uuidd
mke2fs快速格式化优化时间缩短一半的方法
最新推荐文章于 2024-03-22 06:00:00 发布
通过修改mke2fs源码并创建静态版本,减少了格式化时间。但在断电后可能会导致Input/output error,因未清理inode。解决方法是在程序中添加检查并unlink错误节点的代码。
摘要由CSDN通过智能技术生成