1E2fsprogs 1.42.13 (May 17, 2015) 2================================ 3 4Fixed a potential buffer overflow while closing a file system in 5libext2fs. (CVE-2015-1572, Addresses Debian Bug: #778948) 6 7Fixed a bug which could cause e2fsck to corrupt Hurd file systems. 8(Addresses Debian Bug: #760275) 9 10Fixed a deadlock which occurs when using systemd and e2fsck.conf's 11logging feature. (Addresses Debian Bug: #775234) 12 13Fixed a bug which could cause programs using libext2's inode table 14scanning functions from crashing on certain corrupted file systems. 15(Addresses Debian Bug: #773795) 16 17Fixed dumpe2fs so it won't crash if the user doesn't specify a block 18device (file system). (Addresses Debian Bug: #764293) 19 20Fixed e2fsck so if it notices unexpected HTREE blocks in pass 2, it 21will report the correct directory inode containing the inconsistency. 22 23If e2fsck fails to grow the dir_info structure due realloc(3) not 24having enough memory, it will now fail with explanatory message 25instead of staggering on failing with a confusing internal error 26messages. 27 28The tune2fs program will zero out the superblock journal backup 29information when removing a journal from a file system. 30 31The mke2fs program now enables the large_file feature by default. 32 33Fixed a bug which could cause badblocks to crash if there are millions 34and millions of bad blocks. 35 36Fixed some use-after-free bug in resize2fs and e2fsck. 37 38Fixed a memory leak in tune2fs. 39 40Fixed some bigendian bugs that had crept into both indirect and extent 41handling inside libext2fs. 42 43Updated/fixed various man pages. 44 45Update Esperanto, German, and Spanish translations. Added Danish 46translation. 47 48Programmer's Notes 49------------------ 50 51Fixed coverity, sparse, gcc -Wall, and clang warnings/nits. 52 53Clean up some build system problems (build failures with various 54configure options, fix Posix portability issues, etc.) 55 56The functions ext2fs_inode_alloc_stats[2]() and 57ext2fs_block_alloc_stats[2]() now check the inode and block numbers 58passed to them, to avoid crashes caused by buggy callers. 59 60The libext2fs directory iterator will now check for an invalid 61directory entry length instead of possibly walking off the end of the 62directory buffer. 63 64 65E2fsprogs 1.42.12 (August 25, 2014) 66=================================== 67 68Fix various e2fsck bugs when trying to repair bigalloc file systems. 69 70E2fsck can now repair a file system with an overly large 71s_first_meta_bg field, which had previously caused all e2fsprogs 72programs to crash when trying to open such a file system. 73 74Fix e2fsck so that it can correctly fix a number of rare file system 75corruptions that were discovered when using a file system fuzzer. 76 77Fix e2fsck so it does not try to write back block group descriptors if 78they have not been modified. 79 80Mke2fs program will now place metadata blocks in the last flex_bg so 81they are contiguous. This reduces free space fragmentation in a 82freshly created file system, as well as allowing mke2fs commands which 83request extremely large flex_bg size to succeed. 84 85Mke2fs now creates hugefiles more efficiently (with fewer extent tree 86blocks). 87 88Fix a 32/64-bit overflow bug that could cause resize2fs to loop 89forever. (Addresses-Launchpad-Bug: #1321958) 90 91The resize2fs program will now use much less memory when resizing very 92large file systems. 93 94Fix a bug which could cause resize2fs to get confused and produce a 95corrupted file system when shrinking a file system that had been 96previously expanded and converted to use the meta_bg file system 97format, but which no longer needs to use the meta_bg file system 98format any longer. This typically happened with large (> 16TB) file 99systems. (Addresses Debian Bug: #756922) 100 101The e4defrag program will now defrag backwards-allocated files. 102 103Fix tune2fs updating UUID's when manipulating file systems with 104external journals (both the file system and journal UUID). 105 106Fix tune2fs so it can remove an external journal for file systems with 107a 1k block size. 108 109Add a new debugfs command, "inode_dump", which prints the inode in hex 110and ASCII format. 111 112The debugfs's "set_inode_field" will now automatically allocate blocks 113for indirect blocks and extent tree blocks. 114 115Fix debugfs's "set_inode_field" so can properly handle 116"block[IND|DIND|TIND]". 117 118The debugfs "rdump" command will now take multiple source arguments. 119 120Fixed a double close(2) bug in "rdump" and "rdump -p". 121 122Fix debugfs's argument parsing for the freefrag command. 123 124Fix filefrag to properly handle using the FIBMAP ioctl (with -B). 125(Addresses Launchpad Bug: #1356496) 126 127Clarified messages that were confusing users in debugfs, e2fsck, 128mke2fs, and resize2fs (Addresses Debian Bugs: #758029, #757543, 129#757544) 130 131Dumpe2fs will now complain if extra arguments are given to it. 132(Addresses Debian Bug: #758074) 133 134Updated/fixed various man pages. (Addresses-Debian-Bug: #726760) 135 136Update Czech, Dutch, French, Polish, Spanish, Swedish, Ukrainian, and 137Vietnamese translations. 138 139Programmer's Notes 140------------------ 141 142The Unix I/O layer will now use pread[64]/pwrite[64] to reduce the 143number of system calls issued. 144 145Fixed profiled build. 146 147The libext2fs library will now more efficiently split an extent tree 148index block when appending to an end of a file. 149 150Fixed free block accounting for 64-bit file systems. 151 152Add a new function ext2s_inode_size_set() which takes care of all of 153the required feature flag modifications. 154 155The regression tests no longer require the presence of the md5sum 156program. 157 158Fix build failure on MIPS platforms on Debian (Addresses Debian Bug: 159#754605) 160 161Fix various Coverity warnings (#1225003, #1229243, #1252003) 162 163 164E2fsprogs 1.42.11 (July 9, 2014) 165================================ 166 167Add support so that mke2fs can create hugefiles so that they are 168aligned relative to the beginning of the disk, instead of relative to 169the beginning of the partition, using the mke2fs.conf configuration 170parameter "hugefiles_align_disk". 171 172Fix a bug which causes e2fsck to abort a journal replay on a file 173system with bigalloc enabled. (Addresses Debian Bug: #744953) 174 175Add sanity checks so that mke2fs will refuse insanely large flex_bg 176counts specified by the -G option. Insanely large flex_bg sizes can 177result in a file system which can't be unmounted, or with extremely 178pessimal metadata layouts. 179 180The mke2fs program will provide a better metadata layout for 181moderately large (but believable) flex_bg counts, such as 133,072. 182 183The mke2fs program will also check the kernel version number to 184determine whether the lazy_itable_init option is supported, so that 185lazy inode table initialization can be used even if the ext4 is 186compiled as a module which isn't loaded at the time that mke2fs is 187run. 188 189Add description of ext4's mount options to the ext4 section 5 man 190page. 191 192Improve the chattr man page and clean up the chattr usage message. 193 194E2fsck will now automatically fix a last mount time or last write time 195which is in the future in preen mode, instead of aborting the fsck 196check. 197 198Mke2fs will now check the file system revision number requested by the 199command line, and reject it if it is too large. A file system with an 200unsupported revision number will not be accepted by any of the other 201file system tools, and this command line option is rarely used, so 202let's try to help the user not shoot their own foot off. 203 204The debugfs program can now set the error count and associated 205first_error and last_error fields in the superblock using the 206set_super_value command. 207 208Resize2fs will not try to calculate the minimum size of a file system 209if it contains errors. Otherwise a very badly corrupted file system 210image can cause the minimum size calculation to loop forever. Since 211resize2fs will not allow a file system marked as containing errors to 212be resized. It's pointless to calculate the minimum size, so just 213skip it. 214 215Fixed a typo in one of mke2fs's error message. 216 217If filefrag runs into an error, it will continue processing the rest 218of the files specified on the command line, but then exit with an 219error code. 220 221Filefrag now prints some additional new flags (such as 222FIEMAP_EXTENT_ENCODED), and print unknown flags as hex values. 223 224Fixed support in filefrag for files with > 2**32 blocks on 32-bit 225platforms. 226 227Fixed a file descriptor leak in debugfs when copying files. 228 229Fixed a regression introduced in 1.42.10 which caused mke2fs to fail 230to create file systems larger than 2GB on 32-bit platforms. 231(Addresses Red Hat Bugzilla: #1099892, Debian Bug: #752107) 232 233Add Esperanto and Ukrainian translations, and update Czech, Dutch, 234French, German, Italian, Polish, Swedish, and Vietnamese 235translations. 236 237Fixed various compiler warnings. 238 239 240Programmer's Notes 241------------------ 242 243The gcc "-checker" option has been long deprecated, so remove support 244from e2fsprogs. It was causing a few people to be confused when they 245tried enabling the configure option. 246 247Update to the latest version of the config.status and config.rpath 248files, as well as newer versions of the autoconf files in aclocal.m4. 249Also, move the e2fsprogs-specific macros to acinclude.m4, which allows 250people who want to use autoreconf to do so. 251 252Make the use of strptime() function in debugfs to be more portable to 253fix regression test failures for FreeBSD and MacOS. 254 255A few miscellaneous changes designed to make life easier for 256translators. 257 258Fix the f_quota test and some Makefile dependencies if quota support 259is not enabled. 260 261Fix cross-compilation support, which got broken in 1.42.10. 262(Addresses Debian Bug: #753375) 263 264Delete lib/ext2_types.h on a make clean, and build it as necessary. 265 266Add a debug program used for libext2fs unit tests. 267 268Clean up the tests so that it avoids using GNU-specific behaviour in 269mktemp. Make sure the temporary files are cleaned up if the tests are 270interrupted. 271 272Add a new ext2fs_close_free() helper function which automatically 273takes care of freeing the ext2_filsys structure even if ext2fs_close() 274returns an error. 275 276 277E2fsprogs 1.42.10 (May 18, 2014) 278================================ 279 280Mke2fs now creates file systems in regular files (which is very often 281used when maintaining virtual machine images) without requiring the 282user to use the force option. In addition, the mke2fs output has been 283made much less verbose and only displays information that users will 284be more likely to find useful by default. 285 286Mke2fs now will ask the user to confirm that they want to continue 287before wiping out a pre-existing file system, partition table, or LVM 288physical volume. 289 290Mke2fs now has the ability to create file systems where all the 291metadata is located at the very beginning of the device. This can be 292useful for flash devices which have SLC flash at the beginning of the 293disk, for FAT compatibility, for example. As part of this, mke2fs and 294tune2fs can control the location of the data blocks used by the 295journal inode. In addition, the new sparse_super2 feature allows for 296even fewer (anywhere from zero to two) backup superblocks. 297 298Mke2fs now uses much less CPU when allocating the blocks used for very 299large file systems. 300 301Mke2fs can now support creating a file system at an offset. This can 302be useful when creating a disk image for virtual machines (Addresses 303Debian Bug: #497984) 304 305Previously, e2fsck had a number of very serious bugs when checking a 306file system which used the new the quota file system option (where the 307quota inodes were stored in hidden inodes) and the quota inode was 308inconsistent with the actual usage data. This problem was documented 309in https://ext4.wiki.kernel.org/index.php/Quota. These problems have 310been fixed in 1.42.10, so the quota should be safe to use with 311e2fsprogs 1.42.10. 312 313Fixed in a bug in resize2fs which could cause shrink operation fail in 314the unlikely situation when the inode table needs to be moved to a 315location before the current location. 316 317Resize2fs now has a much more accurate (and less conservative) 318estimation of how far the file system can be shrunk. This allows a 319mostly empty filesystem which is a few terabytes, to be shrunk to a 320few megabytes in a single resize2fs -M operation. 321 322E2fsck will now force a full file system check if there are any file 323system inconsistencies detected in the super block. 324 325The filefrag program will now display the shared extent flag, which is 326used by file systems such as btrfs. 327 328If the number of inodes in the file systems is larger than the time 329that file system was created (as measured by the number of seconds 330since January 1, 1970) e2fsck would print a scary (but otherwise 331harmless) warning of file system corruption for each inode in the 332orphan list. This false positive has been fixed. 333 334The e4defrag program has been fixed so it will no longer refuse with 335filesystem with the 64-bit or the bigalloc feature enabled. 336 337The logsave program will print a much less scary message which could 338lead users to believe something has gone very wrong with e2fsck exits 339with a non-zero exit status (since this is normal after e2fsck has 340automatically fixed a file system corruption during a preen 341operation). (Addresses Debian Bug: #468821) 342 343When creating a file system which is larger than 16TB, the 344resize_inode option must be disabled -- since the resize_inode simply 345doesn't support reserving metadata block numbers which is larger than 34632 bits. The mke2fs program does this automatically if the file 347system size is determined automatically. It will now also do this if 348the file size is specified explicitly. 349 350Fixed bugs associated with resize2fs and shrinking bigalloc file 351systems. 352 353The e2fsck program will no longer try to add a UUID on a mounted file 354system with checksums enabled, since this could leave the file system 355checksums broken. 356 357Tune2fs will allow the removal of an external journal from file system 358which is marked as needing the journal replayed when the force ("-f") 359option is given twice. (Addresses Debian Bug: #559301) 360 361Tune2fs will no longer support enabling sparse_super if the meta_bg 362file system feature is enabled, since it could result in data loss. 363In practice, all modern file systems have sparse_super is enabled, so 364it's not worth trying to change how tune2fs handles enabling the 365sparse_super feature. 366 367Fixed support for 1k block file systems with the meta_bg feature. 368 369When the superblock is corrupt, e2fsck can't figure out the location 370of the alternate superblock. Unfortunately, the routine that 371calculates the location of the alternate superblock uses 8193 if it 372can't figure this out, so the message printed by e2fsck always 373suggests using "e2fsck -b 8193". This message has been fixed to 374suggest both the superblock location of 8193 and and 32768. 375(Addresses Debian Bug: #719185) 376 377The lookback mount detection code that was introduced in 1.42.9 wasn't 378actually compiled in due to an autoconf oops, so it's fixed now in 3791.42.10. (Addresses Debian Bug: #497984) 380 381A bug introduced in 1.42.9 would cause debugfs to print two error 382messages if it found an error while parsing a user-supplied block 383number. This has been fixed in 1.42.10. 384 385Update Czech, Dutch, French, German, Polish, Spanish, Swedish, and 386Vietnamese translations. (Addresses Debian Bug: #703048) 387 388Updated/fixed various man pages. (Addresses Debian Bugs: #719189, 389#719184) 390 391Fixed various Debian Packaging Issues. (Addresses Debian Bug: #718725) 392 393 394Programmer's Notes 395------------------ 396 397Fixed a lot of coverity, sparse, gcc -Wall, and clang warnings/nits. 398 399Allow the location of pkg-config files to be specified independent of 400the libdir location via a makefile variable. 401 402Fixed parse-types.sh not to complain when cross-compiling and the 403sizes of types are different between the target architecture and the 404architecture of the build system 405 406Allow the regression test suite to work correctly on systems which do 407not have the "truncate" or "mksawp" programs. 408 409Allow e2fsck to build correctly on systems (such as Android) that do 410not have the signal.h file. 411 412E2fsprogs now has code coverage testing which can be enabled using 413"configure --enable-gcov". 414 415The libe2p.h header file can now be used included by C++ programs. 416 417The profile/config file used by e2fsck and mke2fs will interpret 418numbers with a leading 0 character to mean that they should be 419interpreted as an octal integer. 420 421The extent handling functions in libext2fs have been improved so they 422have proper rollback when there is an error splitting an extent. Also 423fix a number of bugs when punching holes in files, and fix an 424off-by-one bug when inserting an extent into an empty inode. 425 426The libext2fs library now handles the support of BLOCK_UNINIT by 427clearing the portion of block bitmap when it is loaded, instead of 428when it is used. This reduces the chances of bugs, and and simplifies 429the code. It also means that debugfs will properly show that blocks 430in uninitialized block groups as being unused when using the testb 431command. 432 433The e4defrag program will try to use fadvise64 or posix_fadvise64() if 434it is present, which allows 64-bit offsets on 32-bit systems. 435 436 437E2fsprogs 1.42.9 (December 28, 2013) 438==================================== 439 440Mke2fs will detect an attempt to create a file system on a loop 441mounted file and complain without the -FF option. Also fixed mke2fs 442so it allows the creation of a file system on a mounted device with 443two -F options, as documented in the man page, instead of three -F 444options. 445 446Fixed a large number of bugs in resize2fs, e2fsck, debugfs, and 447libext2fs to correctly handle bigalloc and 64-bit file systems. There 448were many corner cases that had not been noticed in previous uses of 449these file systems, since they are not as common. Some of the bugs 450could cause file system corruption or data loss, so users of 64-bit or 451bigalloc file systems are strongly urged to upgrade to e2fsprogs 4521.42.9. 453 454The tune2fs program will now not allow changing the uuid on a mounted 455file system which has the uninit_bg feature enabled. This avoids a 456nasty race where the kernel and tune2fs are both retrying rewrite the 457group descriptors at the same time, with different ideas about what 458the UUID should be. 459 460When e2fsck is rehashing an extent-mapped directory, it's possible 461(although very rare) that an extent block will need to be allocated; 462fix e2fsck to make sure that the block gets marked as used. 463 464Mke2fs will now properly set the LARGE_FILE feature when creating a 465journal >= 2GB --- which can happen when using 64k block size. 466 467Fixed debugfs so that its freei command will correctly handle a request 468to free a range of consecutive inodes. 469 470Fixed 2fsck so it will not erroneously complain that an external journal 471is invalid if it is exactly 2**32 blocks. 472 473Fixed e2fsck so it won't try checking for, and adding, a missing 474lost+found directory when running in read-only mode. 475 476Fixed e2image so that progress information won't get leaked to stdout. 477(Addresses Red Hat Bugzilla: #1327329) 478 479Fixed e2image to avoid some buffer overruns which would cause it to when 480creating a "standard (non-raw, non-qcow2) image file. Standard 481e2image files are actually very rarely used, so we didn't notice when 482the changes to enable the qcow2 format broke this e2image mode. 483 484Fixed mke2fs so that the extended option "-E resize=NNN" will not turn 485on the resize_inode feature when the meta_bg feature is set, since 486these two features can not be set at the same time. 487 488Fixed tune2fs so that when it disables the quota feature, it updates all 489of the backup superblocks. 490 491Fixed dumpe2fs that would cause it to abort when run using an image file 492when trying to print the journal information (which is not present in 493an e2image created image file). 494 495Fixed a potential integer overflow in e2reefrag. 496(Addresses-Debian-Bug: #718205) 497 498Enhance debugfs so that when copying a sparse file from a native file 499system into the file system image using the "write" command, it will 500create a sparse file into the destination file system. 501 502Enhanced debugfs so it can support a command line which is up to 8k 503long. 504 505E2image will refuse (unless the -f option is specified to force the 506issue) to create a raw or qcow image using a mounted file system, 507unless the -f option is specified to force the issue. 508 509E2image has been optimized for using it to efficiently copy a file 510system by only copying the allocated blocks, by using the options -ra. 511New options (-o and -O) have been added so that a source and 512destination offset can be given. The -p option will print progress 513information so the user will know how far along the copy is going. 514And finally, the new option -c is useful for updating a file system on 515an SSD, by avoiding unnecessary writes. E2image can also shift a file 516system image by doing an in place move. 517 518Fix a regression introduced in 1.42.8 which would cause e2fsck to 519erroneously report uninitialized extents past the EOF (as determined by 520i_size) to be invalid. 521 522Fixed resize2fs so under a corner case when an inode has a complex 523extent tree, it will not corrupt an interior node in the extent tree. 524 525Fixed resize2fs which would sometimes corrupt a file system when 526shrinking a file system to a minimum size using resize2fs -M. 527(Addresses Debian Bug: #660793) 528 529Fixed resize2fs so that it will relocate inode table blocks if this 530becomes necessary when shrinking the file system. 531 532Fixed resize2fs and e2fsck so they will not crash when hit a failure 533while operating on a file system with the MMP feature enabled. 534 535Fixed a bug in debugfs which caused it create an invalid inode when 536trying to write a zero-length file. 537 538E2fsck will no longer crash if it tries to delete an invalid 539extent-mapped symlink. 540 541E2fsck will no longer crash if it comes across an directory which is 542larger than 2GB (which is not allowed in valid file systems). 543 544Fixed debugfs's help texts to fully document all options and otherwise 545be more helpful. 546 547Updated/fixed various man pages. (Addresses Debian Bugs: #586218, 548#669730, #698076) 549 550Fixed various Debian Packaging Issues (#698879, #721365) 551 552 553Programmer's Notes 554------------------ 555 556Fix sparse, gcc -Wall and clang nits. 557 558Update config.{guess,sub} to the latest version 559 560Fixed various memory and file descriptor leaks on various error paths, 561as well as some missing error return checks, which were found using 562Coverity. 563 564Run sparse against source files when building e2fsprogs with 'make 565C=1'. If instead C=2, it configures basic ext2 types for bitwise 566checking with sparse, which can help find the (many many) spots where 567conversion errors are (possibly) happening. 568 569Allow the regression test to be run in chrooted environments where 570/etc/mtab might be missing. 571 572The ext2fs_punch() function, which was introduced in 1.42, was broken 573in many ways, but this was never noticed since it wasn't used for 574anything significant. Some of the bugs include failing when trying to 575punch a completely sparse file, failing when punching an extent-mapped 576inode when the starting block was at the beginning of the inode, and 577not being able to punch a single block (where start_blk == end_block). 578It also didn't handle being passed an invalid, too-large ending block 579number, and didn't handle properly terminate at the right place when 580operating on an indirect-mapped inode. 581 582Fixed some minor typo's in the error catalog for libext2fs. 583 584Fixed ext2fs_file_set_size2() so that if it truncates an inode by 585setting the file size, to zero the rest of the block to the end of the 586file, so that if an ext4 FUSE driver tries to extended the file, that 587we don't avoid stale data from being returned. 588 589Fixed ext2fs_bmap() to disallow clients from trying to map or set 590logical blocks which are larger than what an extent-mapped or indirect 591block-mapped inode can allow. 592 593If debugfs (or some userspace program using libext2fs) creates a file 594which is larger than 2GB, make sure the large_file feature flag gets 595set. 596 597Fix a bug in ext2fs_link() where if there is multiple empty slots in the 598directory which are large enough, the directory entry could get 599inserted more than once in the directory. 600 601If quota support is disabled (which is the default), make sure that 602all traces of the quota support is removed from usage messages, man 603pages, and tune2fs must not be able to enable the quota file system 604feature. (Addresses Red Hat Bugzilla: #1010709) 605 606The ext2fs_file_write() now updates i_size on a successful write, 607instead of only updating i_size wen the file is closed via 608ext2fs_file_close(). 609 610Added a shell script, populate-extfs.sh which uses debugfs to populate 611an ext2/3/4 file system image from a given directory. It is similar 612to the genext2fs program, but it supports ext3 and ext4 file system. 613 614Add changes to the libext2fs library to support block group 615descriptors larger than 64 bytes (for future compatibility). 616 617Fixed an off-by-one bug in ext2fs_file_set_size2() so that it will not 618leave an extra block in the file when truncating the file down to 619size. 620 621The html version info pages are now built using makeinfo --html 622instead of the unmaintained and now-obsolete texi2html program. 623 624 625E2fsprogs 1.42.8 (June 20, 2013) 626================================ 627 628As a part of mke2fs's option parsing cleanup, the use of the -R option 629will give a warning that it is deprecated (it has been so documented 630since 2005) and -E should be used instead. 631 632Mke2fs will not give warnings about the bigalloc and quota options in 633quiet mode. 634 635If an invalid journal size is given to mke2fs, it will now complain 636and exit sooner. 637 638Debugfs was erroneously giving spurious error messages for certain 639extent_inode subcommands which take arguments (split_node, 640replace_node, and insert_node). This has been fixed. 641 642Fix the parsing of the 's' (sectors) in parse_num_blocks2, which among 643other programs is used by mke2fs. 644 645Change mke2fs so that it does not set the root directory to the real 646uid/gid of the mke2fs process. Add the extended option root_owner to 647override this behavior. 648 649Fix resize2fs when shrinking file systems to make sure that bitmap 650blocks aren't left outside the bounds of the shrunken file system. 651This could happen with flex_bg file systems that were grown using 652the old online resizing algorithm. 653 654E2fsck will now detect and repair corrupted extent trees which contain 655invalid extents at the end of the extent tree leaf block. 656 657E2fsck will now longer complain about zero length extended attribute 658values. 659 660Fix a regression introduced in e2fsprogs v1.42 which caused e2image -s 661to crash. 662 663Add safety check so tune2fs will not attempt to set the inode size to 664be larger than the block size. 665 666Fix e2fsck so it can check a read-only root file system with an 667external journal. (Addresses Debian Bug: #707030 668 669Fix off-line resizing of file systems with flex_bg && !resize_inode 670(Addresses Debian Bug: #696746) 671 672Fix e2image with large (> 32-bit) file systems (Addresses Debian Bug: 673#703067) 674 675Enhance chattr to allow clearing the extent flag if the kernel allows 676migrating extent based files to use indirect blocks. 677 678Update German translation. 679 680Updated/fixed various man pages. (Addresses Debian Bugs: #712429, 681#712430, #707609) 682 683Fixed various Debian Packaging Issues (Addresses Debian Bug #708307) 684 685Programmer's Notes 686------------------ 687 688Use secure_getenv() in preference to __secure_getenv(). 689 690Optimize CPU utilization of ext2fs_bg_has_super(). 691 692Fix ext2fs_llseek() on 32-bit i386 systems to work correctly when 693SEEK_CUR is used with large files. 694 695The ext2fs_read_inode_full() function will no longer use 696fs->read_inode() if the caller has requested more than the base 128 697byte inode structure and the inode size is greater than 128 bytes. 698 699Fix build failure with --enable-jbd-debug. 700 701Clean up filtering of outputs for the regression tests by using a 702common sed script. 703 704Fix gcc -Wall and clang nits. 705 706 707E2fsprogs 1.42.7 (January 21, 2013) 708=================================== 709 710Add warnings to mke2fs, resize2fs, and tune2fs that the bigalloc and 711quota features are still under development. For more information 712please see: 713 * https://ext4.wiki.kernel.org/index.php/Bigalloc 714 * https://ext4.wiki.kernel.org/index.php/Quota 715 716Add some new options to filefrag from Lustre's patches to e2fsprogs: 717 * add -k option to print extents in kB-sized units (like df -k) 718 * add -b {blocksize} to print extents in blocksize units 719 * add -e option to print extent format, even when FIBMAP is used 720 * add -X option to print extents in hexadecimal format 721 722Fix resize2fs so that it can handle off-line resizes of file systems 723with the flex_bg feature but without a resize_inode (or if we run out 724of reserved gdt blocks). This also fixes a problem where if the user 725creates a filesystem with a restricted number of reserved gdt blocks, 726an off-line resize which grows the file system could potentially 727result in file system corruption. 728 729Fix a resize2fs bug which could cause it to corrupt bigalloc file 730systems when doing an off-line resize. 731 732Further optimize resize2fs so it doesn't use quite as much CPU when 733resizing very large file systems. 734 735Fixed 32-bit overflow bugs which could cause resize2fs to fail and 736possibly corrupt the file system while resizing 64-bit file systems. 737 738Fix a bug in mke2fs where parsing "-E resize=NNN" will result in a 739mke2fs crash due to a divide-by-zero if the 64bit file system feature 740is enabled. 741 742Add better error checking to mke2fs to check for invalid parameters 743when creating bigalloc file system. 744 745When creating bigalloc filesystems, the -g option to mke2fs will now 746specify the number of clusters per block group. 747 748Add to debugfs the functionality to corrupt a specific file system 749block via the "zap_block" command. 750 751Add to debugfs the functionality to print out a hex dump of a block in 752the file system via the "block_dump" command. 753 754Add to debugfs the functionality to manipulate the extent tree 755directly via the "extent_open" command. 756 757Fixed debugfs's mknod command so that it updates the block group 758statistics. 759 760Fix e2fsck so it can detect and fix inconsistencies in the interior 761nodes of an inode's extent tree. 762 763Fix a potential memory corruption failure in e2fsck's error path if 764the call to ext2fs_open2() fails. 765 766Fix e2fsck if its logging function is enabled in e2fsck.conf, and the 767resulting file name for the log file is longer than 100 bytes, that it 768properly handles this situation instead of crashing. 769 770E2fsck will now report the amount of memory that it attempted to 771allocate when a memory allocation request fails, to make it easier to 772track down the problem. 773 774Fix mke2fs's handling of the mmp_update_interval option. (Addresses 775Lustre Bug: LU-1888) 776 777E2image can now include all data blocks in the e2image output file 778when the user specifies the -a option. 779 780If e2fsprogs is compiled without --enable-quota, make sure that 781tune2fs can not turn on the feature for new-style quota support, since 782afterwards, none of the e2fsprogs tools will be willing to touch that 783file system. 784 785Optimize e2fsck's so that it uses much less CPU for large file 786systems. This can result in significant speedups, especially on 787CPU-constrained systems. This was primarily done by optimizing 788libext2fs's bitmap functions. (Addresses Google Bug: #7534813) 789 790Fix debugfs's htree command so that all its messages are sent through 791the pager. 792 793Fixed debugfs's "dump_file" and "cat" functions work correctly 794on file systems whose block size is greater than 8k. 795 796Fix e2freefrag so it works on 64-bit file systems, and so it uses much 797less memory. (Addresses Google Bug: 7269948) 798 799Update the spd_readdir.c file in the contrib directory to include some 800additions which were made in 2008 that didn't get folded into the 801version which we checked into the e2fsprogs source tree. These 802enhancements include thread safety, support for readdir64_r(), and 803safe_getenv() support in case spd_readdir.so is used for setuid binaries. 804 805Update Czech, Dutch, French, German, Polish, Swedish, and Vietnamese 806translations 807 808Add a command to debugfs to create symlinks. 809 810Document the bigalloc feature in the mke2fs man page. (Addresses 811Debian Bug: #669730) 812 813 814Programmer's Notes 815------------------ 816 817Fix gcc -Wall nits. 818 819Fix a spelling typo in the libext2fs texinfo documentation. 820 821Change the output from "make check" so that tools such as emacs's "M-x 822compile" does not mistake the output as containing a compiler error. 823 824Export two new functions from libext2fs: ext2fs_extent_node_split() 825and ext2fs_extent_goto2(). 826 827The ext2fs_extents_fix_parents() was fixed so it does not modify the 828location of the extent handle if its current location is at an 829interior node, rather than a leaf node of an inode's extent tree. 830 831Add a regression test to assure that e2fsck can correctly fix an 832inconsistent interior node in an inode's extent tree. 833 834The ext2fs_{mark,unmark,test}_block_bitmap_range2() functions now 835correctly support bigalloc file systems which use store block usage 836information in units of clusters. 837 838Fixed the help text in the configure script for --enable-quota. 839 840The m68k-specific bitops code has been removed since they were 841incorrectly treating bit numbers with the high bit set as signed 842integers. Furthermore, modern compilers do a good enough job 843optimizing the generic code there is no point in having the m68k 844specific asm statements. 845 846Fixed how we link the test programs so they always use the static 847libraries, so that we test using the libraries which we have just 848built. 849 850Update config.guess and config.sub to the latest versions from the GNU 851project. 852 853Fixed the com_err.texinfo file so that it can produce a valid 854postscript/pdf printed output. 855 856Add a regression test which checks debugfs's ability to create 857symlinks, named FIFO's, and device nodes. 858 859Add a function ext2fs_symlink(), which creates symlinks to the 860libext2fs library. 861 862Add debugging code so we can test old kernel interfaces for online 863resize to resize2fs. This backwards compatibility checking is keyed 864off of the RESIZE2FS_KERNEL_VERSION, which is designed to allow us to 865test the functionality of the kernel's older resize ioctls without 866needing to install an old version of resize2fs, and to also test a 867modern resize2fs's ability to work with older kernels without having 868to install an older version of the kernel. 869 870 871E2fsprogs 1.42.6 (September 21, 2012) 872===================================== 873 874When mke2fs creates file systems with lazy itable initialization, the 875progress updates for writing the inode table happens so quickly that 876on a serial console, the time to write the progress updates can be the 877bottleneck. So mke2fs will now only update its progress indicators 878once a second. 879 880Resize2fs will skip initializing the inode tables if the kernel 881supports lazy_itable_init, which speeds up growing off-line growth of 882uninit_bg file systems significantly. Resize2fs will now also 883correctly set the itable_unused field in the block group descriptor to 884speed up the first e2fsck after the file system is grown. 885 886Resize2fs has been fixed so that on-line resizing of meta_bg file 887systems work correctly. This is needed to grow file system which are 888larger than 16T. 889 890Resize2fs will now correctly handle resizing file systems to 16TB on 89132-bit file systems when "16TB" is specified on the command line. 892 893Fix mke2fs so that it will be careful to set the reserved blocks ratio 894larger than 50%; this can happen when creating small file systems and 895when the last block group is dropped because there are not enough 896blocks to support the metadata blocks in the last block group. 897 898Fixed spelling mistake in debugfs's help message. 899 900Fixed a potential seg fault in e2fsck when there is an I/O error while 901reading the superblock. 902 903Fixed various Debian Packaging Issues (Addresses Debian Bug #677497) 904 905Updated/fixed various man pages. (Addresses Sourceforge Bug: 906#3559210) 907 908Programmer's Notes 909------------------ 910 911The configure option --enable-relative-symlink was broken so that it 912needed to be --enable-symlink-relative-symlinks. We will support both 913for at least two years, but then the wrong configure option will be 914removed. 915 916Fixed a regression introduced in 1.42.5 so the link order for 917e2fsprogs' libraries will be correct for both static and shared 918linking. (Addresses Sourceforge Bug: #3554345) 919 920Add support for e2fsprogs to be compiled using clang/LLVM. 921 922Fix portability problems on non-Linux systems: avoid compile failures 923on systems that don't have malloc.h 924 925Fix f_mmp regression test suite so that debugfs gets killed if the 926test is interrupted. 927 928 929 930E2fsprogs 1.42.5 (July 29, 2012) 931================================ 932 933Fixed a bug with mke2fs where if there is only 8 inodes per block 934group, the calculation of the number of uninitialized inodes in the 935first block group would go negative. This resulted in "mke2fs -N 256 936-t ext4 /tmp/foo.img 256m" trying to write so many blocks that /tmp 937would run out of space. (Addresses Sourceforge Bug: #3528892) 938 939Fixed a bug in how e2fsck would uniquify directory entry names. 940(AddressesSourceforge Bug: #3540545) 941 942Previously, e2fsck would only allow a mounted file system to be 943checked if it was the root file system and it was mounted read-only. 944Now it will allow any file system mounted read-only to be checked if 945the -f option is specified. This makes it easier to test how e2fsck 946handles checking file systems which are mounted without having to test 947on the root file system. 948 949Fixed a problem if e2fsck where if the root file system is mounted 950read-only, e2fsck would not clear an error indication in the journal 951superblock. Combined with a kernel bug, this would cause the e2fsck 952to check the file system after every single boot. 953 954The e4defrag program can now handle device symlinks, such as 955/dev/mapper/testvg-testlv, instead of insisting on a less 956human-friendly name such as /dev/dm-2. (Addresses Red Hat Bugzilla: 957#707209) 958 959Fixed filefrag so it will not crash with a segfault on files from a 960virtual file system such as /proc. (e.g., "filefrag 961/proc/partitions") 962 963Fixed filefrag so that it correctly reports the number of extents. 964(Addresses Red Hat Bugzilla: #840848) 965 966Fixed a file descriptor leak in logsave which could cause it to hang. 967(Addresses Debian Bug: #682592) 968 969Fixed e2fsck so that the file system is marked as containing an error 970if the user chooses not to fix the quota usage information. 971 972Fixed tune2fs so that it correctly removes the quota feature when the 973last quota inode is removed. 974 975Fix tune2fs so that after removing a quota inode, the block bitmap is 976updated; otherwise, e2fsck would complain after running 'tune2fs -O 977^quota <dev>'. 978 979Fix tune2fs so that when converting a file system from using legacy 980quota files to the new quota file system feature with hidden quota 981files, the accounting for these files is handled correctly so that 982e2fsck doesn't complain. 983 984Improved e2fsck's verbose reporting statistics, and allow the more 985verbose reporting to be enabled via /etc/e2fsck.conf. 986 987Fixed various Debian Packaging Issues (Addresses Debian Bug #678395) 988 989Updated/fixed various man pages. (Addresses Debian Bugs: #680114) 990 991 992Programmer's Notes 993------------------ 994 995Fixed portability problems on other operating systems (e.g., Hurd and 996FreeBsd) caused by the attempted inclusion of <sys/quota.h>. 997 998Make sure that shared libraries link with the shared libraries built 999in the build tree, instead of the system provided libraries. 1000Previously, libraries and executables were linked with the system 1001libraries if present, and possibly using static archives instead of 1002shared libraries. This was also problematic since if libext2fs.so is 1003linked with a static libcom_err.a from system, the build system would 1004attempt to link without -lpthread. (Addresses Sourceforge Bug: 1005#3542572) 1006 1007 1008E2fsprogs 1.42.4 (June 12, 2012) 1009================================ 1010 1011Fixed more 64-bit block number bugs (which could end up corrupting 1012file systems!) in e2fsck, debugfs, and libext2fs. 1013 1014Fixed e2fsck's handling of the journal's s_errno field. E2fsck was 1015not properly propagating the journal's s_errno field to the superblock 1016field; it was not checking this field if the journal had already been 1017replayed, and if the journal *was* being replayed, the "error bit" 1018wasn't getting flushed out to disk. 1019 1020Fixed a false positive complaint by e2fsck if all of the extents in 1021the last extent tree block are uninitialized and located after the end 1022of the file as defined by i_size. 1023 1024The dumpe2fs will now display the journal's s_errno field if it is 1025non-zero, and it will also display the journal's 64-bit feature flag 1026if present. 1027 1028Fix e2fsck so that it always opens the device file in exclusive mode 1029when it might need to modify the file system, and never if the -n 1030option is specified. (Previously, there were a few corner cases where 1031it might get things wrong in either direction.) 1032 1033E2fsck now correctly truncates or deallocates extent-mapped inodes on 1034the orphan list. The root cause was a bug in libext2fs's block 1035iterator which could end up skipping an extent when the last block in 1036an extent is removed, causing the current extent to be removed from 1037the extent tree. 1038 1039E2fsck now correctly sets the global free block and inode counts when 1040truncating or removing inodes on the orphan list in preen mode. 1041Previously, it would leave these values would be set incorrectly, 1042which is largely a cosmetic issue since the kernel no longer pays 1043attention to those fields, but it can cause spurious complaints in 1044subsequent e2fsck runs. 1045 1046Fix i_blocks accounting when the libext2fs library needs to add or 1047remove an extent tree block on bigalloc file systems. 1048 1049The lsattr and chattr programs now support the No_COW flag for the 1050benefit of btrfs. 1051 1052Debugfs now interprets date strings of the form @ddd as ddd seconds 1053after the beginning of the epoch. This is handy when setting an inode 1054number into the d_time field when debugging orphan list handling. 1055 1056Fix a precedence bug with built-in quota support which might result in 1057e2fsck paying attention to the quota inode field even if the built-in 1058quota feature flag is not set. Fortunately, in practice that 1059superblock field should be zero for non-built-in quota file systems, 1060so it's unlikely this bug would have caused problems. 1061 1062Updated/fixed various man pages. (Addresses Debian Bugs: #674453, 1063#674694) 1064 1065Programmer's Notes 1066------------------ 1067 1068The regression test suite can now run the integration tests in the 1069tests directory in parallel, via "make -jN check". 1070 1071Add new test, f_zero_extent_length which tests e2fsck's handling of 1072the case where all of the extents in the last extent tree block are 1073uninitialized extents after i_size. 1074 1075Add a new test, f_jnl_errno, which checks handling of an error 1076indication set in the journal superblock. 1077 1078Fix the test f_jnl_64bit so that it properly checks e2fsck's handling 1079of a 64-bit journal. 1080 1081Add two tests, f_orphan_indirect_inode and f_orphan_extent_inode which 1082tests e2fsck's handling of orphan inodes in preen mode, and truncation 1083of extent inodes on the orphan list. 1084 1085Fixed more OS X portability issues. 1086 1087 1088E2fsprogs 1.42.3 (May 14, 2012) 1089=============================== 1090 1091Fix a bug in the Unix I/O manager which could cause corruption of file 1092systems with more than 16TB when e2fsprogs is compiled in 32-bit mode 1093(i.e., when unsigned long is 32-bits). Also fix a bug which caused 1094dumpe2fs to incorrectly display block numbers > 32-bits. 1095 1096Improve the support for integrated quota files (where quota is a first 1097class supported feature using hidden files in the ext4 file system). 1098Previously the quota file was getting rewritten even when it was not 1099necessary, and e2fsck would erroneously try to hide quota files which 1100were already hidden. 1101 1102Quiet complaints in e2fsck when the total free blocks or inodes are 1103incorrect in the superblock after an system crash, since we don't 1104update nor depend on the superblock summaries at each commit boundary. 1105 1106Fixed a regression introduced in 1.42.2 which would cause applications 1107outside of e2fsprogs which did not pass the EXT2_FLAG_64BIT (and so 1108would were still using the legacy 32-bit bitmaps) to crash. This was 1109due to missing 32-bit compat code in side the function 1110ext2fs_find_first_zero_generic_bmap(). (Addresses Red Hat Bugzilla: 1111#808421) 1112 1113Fix a bug which would cause mke2fs to fail creating the journal if 1114/etc/mtab and /proc/mounts are missing. (Addresses Sourceforge Bug: 1115#3509398) 1116 1117Updated/fixed various man pages. 1118 1119Update Czech, Dutch, French, German, Polish, Swedish, and Vietnamese 1120translations 1121 1122Fixed various Debian Packaging issues. 1123 1124 1125Programmer's Notes 1126------------------ 1127 1128Change the nonsensically wrong types in the function signature of the 1129inline function ext2fs_find_first_zero_block_bitmap2(). This was 1130caused by a cut and paste error; fortunately no code in e2fsprogs used 1131this inline function, and there are any users of this functions 1132outside of e2fsprogs. 1133 1134Add support for systems which have valloc(), but which do have 1135posix_memalign() nor memalign() (such as MacOS 10.5). 1136 1137Refactor and clean up the allocation of aligned buffers for Direct I/O 1138support. Previously some allocations were requesting a greater 1139alignment factor that what was strictly necessary. Also optimize 1140reading and writing bitmaps using Direct I/O when the size of the 1141bitmap did not fully cover the file system blocksize. 1142 1143Reserve the codepoints for the INCOMPAT features LARGEDATA and 1144INLINEDATA. 1145 1146Improved the regression test suite by adding some new integration 1147tests (f_jnl_32bit, f_jnl_64bit) which detect breakage of the on-disk 1148jbd2 format, as well as f_eofblocks which tests the new handling of 1149uninitialized and initialized blocks beyond i_size. Also add a new 1150unit test which verifies 32-bit bitmaps support and the new 1151find_first_zero primitives. 1152 1153Add a few dependencies to fix parallel (make -j) builds. 1154 1155Removed bash'isms which were breaking the regression test suite on 1156systems where /bin/sh is not bash. 1157 1158The config.guess and config.sub have been updated to the 2012-02-10 1159version. 1160 1161Fix a portability problem caused by assuming the present of mntent.h 1162means that setmntent() exists. Instead, explicitly test for this in 1163the configure script. 1164 1165If the sys/signal.h header file does not exist, don't try to include 1166it, since it's not available on all systems. 1167 1168Add support for systems that do not support getpwuid_r() 1169 1170The configure script now supports a new option, 1171--enable-relative-symlinks, which will install relative symlinks for 1172the ELF shared library files. (Addresses Sourceforge Bug: #3520767). 1173 1174When building BSD shared libraries make sure the LDFLAGS variable is 1175passed to the linker. Fixing this allows, for example, e2fsprogs to 1176be built in 32-bit mode on Mac OS X Lion (Addresses Sourceforge Bug: 1177#3517272) 1178 1179Fix gcc -Wall nitpicks 1180 1181 1182E2fsprogs 1.42.2 (March 27, 2012) 1183================================= 1184 1185The resize2fs program uses much less CPU and is much faster for very 1186large file systems. (Addresses Debian Bug: #663237) 1187 1188The seti and freei commands in debugfs can now take an optional length 1189argument to set and clear a contiguous range of inodes. 1190 1191E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we 1192plan to remove support for it from the kernel file system driver. It 1193really wasn't very useful and was causing more problems than it 1194solves. Since e2fsck will complain if inodes that should have 1195EOFBLOCKS_FL do not have the flag set, we are going to remove this 1196check from e2fsprogs first, and then only remove the flag from the 1197kernel much later. 1198 1199The mke2fs program can now use direct I/O via "mke2fs -D". This will 1200slow down the mke2fs, but it makes it more polite on a loaded server 1201by limiting the amount of memory that gets dirtied by mke2fs when it 1202is using buffered I/O. 1203 1204E2fsck was needlessly closing and re-opening the file system as a side 1205effect of adding Multiple Mount Protection (MMP). This isn't 1206necessary for non-MMP file systems, so drop it. 1207 1208Print errors returned by ext2fs_open2() and ext2fs_check_desc() so we 1209can more easily diagnose memory allocation failures caused by 1210insufficient memory. E2fsck will now abort if there are memory 1211allocation failures when the file system is initially opened and 1212during the block group descriptor checks. (Addresses Google Bug: 1213#6208183) 1214 1215If there are incorrect block group checks, e2fsck will now report the 1216incorrect and corrected checksum values. 1217 1218The e2fsck program can now write log files containing the details of 1219the problems that were found and fixed directly, via configuration 1220parameters in /etc/e2fsck.conf. 1221 1222Added the ability to limit the number of messages reported by e2fsck 1223for a given problem type. This avoids a potential bottleneck if there 1224is a serial console which can cause a boot sequence to take a long 1225time if e2fsck needs to report many, many file system errors. 1226 1227The dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which cause 1228them to use much less memory for large file systems. 1229 1230The dumpe2fs program will now print the expected block group checksum 1231if it is incorrect. This helps to diagnose problems caused by 1232incorrect block group checksums. 1233 1234E2fsck now checks for extents with a zero length, since the kernel 1235will oops if it comes across such a corrupted data structure. (See 1236https://bugzilla.kernel.org/show_bug.cgi?id=42859) 1237 1238E2fsck has a number of bugs relating to discard that have been fixed. 1239(1) Fixed a bug which could cause e2fsck to discard portions of the 1240inode table which were actually in use. (2) E2fsck will now avoid 1241using discard if the block device doesn't zero data on discard, since 1242otherwise this could cause problems if the file system gets corrupted 1243in the future. (3) E2fsck will now avoid using discard when it is run 1244in read-only mode. (4) Fixed a bug which caused e2fsck to not issue 1245discards in the last block group. 1246 1247E2fsck's CPU utilization in pass 5 has been optimized, which will 1248speed up e2fsck slightly. 1249 1250E2image will now skip copying uninitialized bitmap and inode table 1251blocks. 1252 1253Fixed mke2fs -S so it does not corrupt the first block group's 1254information. 1255 1256E2fsck will now check the new sysfs interface to determine if we are 1257using the battery or AC mains. (Addresses SourceForge Bug: #3439277) 1258 1259Updated/fixed various man pages. (Addresses Debian Bug: #665427) 1260 1261Fixed various Debian Packaging issues. (Addresses Debian Bug: #665885) 1262 1263Programmer's Notes 1264------------------ 1265 1266Fixed various portability issues for non-Linux systems, particularly 1267MacOS X, as well as Linux systems running with the just-released glibc 12682.15. 1269 1270Fix file descriptor leak in ext2fs_close() if the file system with 1271uninit_bg is opened read/only with a backup superblock. (Addresses 1272SourceForge Bug: #3444351) 1273 1274Fixed an invalid return in a non-void function in the quota code. 1275(Addresses SourceForge Bug: #3468423) 1276 1277Fixed the debian rules file so that the calls to dpkg-buildflags works 1278when the shell is dash. 1279 1280The debian package build now uses V=1 so that there is more 1281information about potential build failures in debian build logs. 1282 1283If the uninit flags get cleared by functions such as 1284ext2fs_new_inode() or ext2fs_new_block2(), we now make sure the 1285superblock is marked dirty and the block group descriptor checksum is 1286updated if necessary. 1287 1288The debian rules file will now try to load debian/rules.custom of it 1289exists. This file can skip various builds for speed reasons if there 1290is no need for the e2fsck-static or udeb packages. Available 1291customizations in the rules file includes SKIP_STATIC=yes, 1292SKIP_BF=yes, and SKIP_DIETLIBC=yes. 1293 1294In addition, if the file misc/mke2fs.conf.custom.in exists in the 1295source tree, it will be used instead of the standard misc.conf file in 1296the upstream sources. This makes it easier for Debian-derived systems 1297to distribute a custom mke2fs.conf file without having to worry about 1298merge issues if future versions of e2fsprogs makes changes in the 1299upstream default version of mke2fs.conf. 1300 1301 1302E2fsprogs 1.42.1 (February 17, 2012) 1303=================================== 1304 1305The mke2fs and e2fsck now use significantly less memory when creating 1306or checking very large file systems. This was enabled by adding 1307extent-based bitmaps which are stored using a red-block tree, since 1308block and inode allocations tend to be contiguous. 1309 1310The command mke2fs -S is used as a last ditch recovery command to 1311write new superblock and block group descriptors, but _not_ to destroy 1312the inode table in hopes of recovering from a badly corrupted file 1313system. So if the uninit_bg feature is enabled, mke2fs -S will now 1314set the unused inodes count field to zero. Otherwise, e2fsck -fy 1315after using mke2fs -S would leave the file system completely empty. 1316 1317Since mke2fs recognizes mke3fs in argv[0] to mean "mkfs.ext3", also 1318honor "mke4fs" to work the same as "mke2fs.ext4", since RHEL5 has 1319installed an mke2fs binary using that name. 1320 1321The usage and help messages for the -G, -t and -T options in mke2fs 1322have been fixed. 1323 1324If e2fsck needs to use the backup group descriptors, the 1325ext2fs_open2() function clears the UNINIT bits to ensure all of the 1326inodes in the file systems get scanned. However, the code which reset 1327the UNINIT flags did not also recalculate the checksum, which produced 1328many spurious (and scary) e2fsck messages. This has been fixed by 1329resetting checksums when the UNINIT bits are cleared. 1330 1331Relax a check in e2fsck which required that the block bitmap to be 1332initialized when the inode bitmap is in use. This will allow us to 1333eventually eliminate code from the kernel which forcibly initialized 1334the block bitmap when the inode bitmap is first used, requiring an 1335extra journal credit and disk write. (Addresses Google Bug: #5944440) 1336 1337Make sure rdebugfs (which may be installed setuid or setgid disk) does 1338not honor environment variables if euid != uid or egid != gid. 1339 1340Debugfs's ncheck command has been optimized and now is much more 1341robust with faced with corrupted file systems. The ncheck command 1342also now has a -c option which will verify the file type information 1343in the directory entry to see if matches the inode's mode bits. This 1344is extremely useful when trying to use debugsfs to determine which 1345parts of the file system metadata can be trusted. 1346 1347E2image will try to use ftruncate64() to set the i_size for raw 1348images, instead of writing a single null byte. This avoid allocating 1349an extra block to the raw image, for those file systems and/or 1350operating systems that support this. (Linux does.) In addition, fix 1351a logic bug that caused the file to not be properly extended if the 1352size of the last hole was exactly an multiple of a megabyte. 1353 1354Fixed a bug in resize2fs where for 1k and 2k file systems, where 1355s_first_data_block is non-zero, this wasn't taken into account when 1356calculate the minimum file system size for use with the -M option. 1357 1358Fixed the badblocks program to honor the -s flag when in read-only -t 1359mode. (Addresses Debian Bug #646629) 1360 1361Update Czech, Dutch, French, Polish, and Swedish translations from the 1362Translation Project. 1363 1364Fixed various Debian Packaging issues so that dpkg-buildflags is used 1365if present, which allows e2fsprogs to be built with security hardening 1366flags. (Addresses Debian Bugs: #654457) 1367 1368Programmer's Notes 1369------------------ 1370 1371Fix a bug in ext2fs_clear_generic_bmap() when used for 32-bit bitmaps. 1372This was only an issue for programs compiled against e2fsprogs 1.41 1373that manipulate bitmaps directly. (Addresses Sourceforge Bugs: 1374#3451486) 1375 1376The libext2fs library now uses sysconf() to fetch the page size, instead 1377of the deprecated getpagesize(). 1378 1379The ext2fs_get_pathname() function will return a partial path if an a 1380directory in the path is not a directory, displaying it as an inode 1381number in angle brackets instead of giving up and displaying an error. 1382This is much more helpful when a user is trying to debug a corrupted 1383file system. 1384 1385Codepoints for the RO_COMPAT_REPLICA feature has been reserved. 1386 1387Added a new library function, ext2fs_file_get_inode_num(), for use by 1388fuse2fs. 1389 1390Fixed a bug in ext2fs_file_set_size2() so that when it is truncating a 1391file, it actually works. 1392 1393The block iterator now properly honors the BLOCK_ABORT flag for 1394extent-based flags. Previously, it didn't, which generally made code 1395be less efficient, but it could cause bugs in ext2fs_link(), for 1396example, by causing it to insert multiple directory entries. 1397 1398Fixed an (harmless other than causing a compiler warning) use of an 1399uninitialized variable in e2fsck's MMP code. 1400 1401 1402E2fsprogs 1.42 (November 29, 2011) 1403================================== 1404 1405This release of e2fsprogs has support for file systems > 16TB. Online 1406resize requires kernel support which will hopefully be in Linux 1407version 3.2. Offline support is not yet available for > 16TB file 1408systems, but will be coming. 1409 1410This release of e2fsprogs has support for clustered allocation. This 1411reduces the number of block (now cluster) bitmaps by allocating and 1412deallocating space in contiguous power-of-2 collections of blocks, 1413which are called clustered. This is a file system level feature, 1414called 'bigalloc', which must be enabled when the file system is 1415initially formatted. It is not backwards compatible with older 1416kernels. 1417 1418Added support for the Multi-Mount Protection (MMP) feature. 1419 1420E2fsck more efficiently uses scratch files for really big file 1421systems. (This is a feature that has to be turned on explicitly; see 1422[scratch_files] in the e2fsck.conf man page.) 1423 1424Fix a bug in e2fsck where if the free blocks and inodes counts are 1425incorrect, e2fsck would fix them without printing an error message. 1426This would cause a "*** FILE SYSTEM WAS MODIFIED ***" message without 1427any explanation of what was fixed. 1428 1429E2fsck will no longer attempt to clone an extended attribute block in 1430pass1b handling if the file system does not support extended 1431attributes. 1432 1433E2fsck will be more careful accidentally asking the user to continue 1434if the file system is mounted, so that an escape sequence won't cause 1435a false positive. (Addresses Debian Bug: #619859) 1436 1437E2fsck now uses less cpu time in pass 5 when large portions of the 1438bitmaps are uninitialized. 1439 1440E2fsck will no longer segfault when a corrupted file system has a bad 1441extent, and removing it leads to a block needing to be deallocated. 1442(Addresses SourceForge Bug: #2971800) 1443 1444E2fsck will catch termination signals (segfaults, bus errors, sigfpe) 1445and print debugging information to make it easier to find potential 1446problems. 1447 1448E2fsck will check to see if the bad block inode looks insane, and will 1449skip trying to use if it certain fields which should be zero look 1450non-zero. This is to avoid a corrupted bad block inode causing e2fsck 1451to get confused and do more harm than good. 1452 1453If e2fsck modifies certain superblock fields which the kernel doesn't 1454look at, it will now mark the superblock as dirty without marking the 1455file system as changed. This avoids signaling the init scripts that 1456a reboot is necessary, since the kernel isn't going to look at those 1457fields, so it won't care if they have been changed. 1458 1459Fixed a bug in the libext2fs library (in the binary search routine of 1460the icount abstraction) that could (very, very rarely) cause e2fsck to 1461die in the middle of pass 1 or pass 2 processing. 1462 1463E2fsck will not try to do a discard operation if the -n option was 1464specified on the command line. 1465 1466E2fsck now supports an extended "discard" option which will cause 1467e2fsck to attempt discard all unused blocks after a full, successful 1468file system check. 1469 1470E2fsck will check for the bad block inode to make sure it looks sane 1471before trusting it, to avoid causing more harm than good to the file 1472system. 1473 1474E2fsck now returns additional status bits in its exit code if it 1475aborts early in the e2fsck run. 1476 1477E2fsck now correctly calculates the maximum file size in the case of 1478the huge_file file system feature enabled without extents. 1479 1480The mke2fs and e2fsck programs now tries to use the punch hole command 1481as a "discard" when operating on normal files. 1482 1483The e2image program now supports the qcow2 format, which is a more 1484efficient way of capturing file system dumps. 1485 1486Mke2fs now supports the [devices] stanza in mke2fs.conf which allows 1487per-device defaults to be specified in the configuration file. 1488 1489Mke2fs now supports the reserved_ratio relation in the [defaults] and 1490[fs_types] section in mke2fs.conf. 1491 1492Mke2fs now creates extent-mapped directories for the root and 1493lost+found directories. 1494 1495Mke2fs will skip zero'ing the journal if the extended option 1496"lazy_journal_init" is specified. This can save a lot of time, but it 1497does add a small amount of risk if the system crashes before the 1498journal is overwritten entirely once. It is especially useful for 1499testing. 1500 1501Mke2fs will now create file systems that enable user namespace 1502extended attributes and with time- and mount count-based file 1503system checks disabled. 1504 1505Mke2fs will not set a stride or strip size of one block based on block 1506device attributes obtained from sysfs. 1507 1508Mke2fs now displays a progress report during the discard process. 1509 1510Mke2fs now handles extreme file system parameters correctly which 1511previously caused the inodes per group to drop below 8, leading to a 1512segfault. (The inodes per group must be a multiple of 8, but the code 1513didn't correctly deal with an inodes per group count less than 8.) 1514 1515Mke2fs and tune2fs previously would give an error if the user tried 1516setting the stride and stripe-width parameters to zero; but this is 1517necessary to disable the stride and stripe-width settings. So allow 1518setting these superblock fields to zero. (Addresses Google Bug: 1519#4988557) 1520 1521Mke2fs now gives a warning if the auto-detected block size exceeds the 1522system's page size. 1523 1524If the enable_periodic_fsck option is false in /etc/mke2fs.conf (which 1525is the default), mke2fs will now set the s_max_mnt_count superblock 1526field to -1, instead of 0. Kernels older then 3.0 will print a 1527spurious message on each mount then they see a s_max_mnt_count set to 15280, which will annoy users. (Addresses Debian Bug: #632637) 1529 1530The default mke2fs.conf now has entries for "big" and "huge", which 1531are needed for very big file systems. 1532 1533The resize2fs program now has support for a new online resize ioctl 1534that can support file systems > 16TB, once it arrives in v3.x kernels. 1535 1536Fixed bug which caused resize2fs to fail when shrinking an empty file 1537system down to its minimal size. (Addresses Sourceforge Bug #3404051) 1538 1539Fixed tune2fs's mount options parsing. (Addresses Debian Bug: #641667) 1540 1541Allow tune2fs to remove external journals if the device can not be 1542found. 1543 1544Debugfs's icheck will now correctly find inodes which use the 1545searched-for block as an extended attribute block. 1546 1547Debugfs now has a new "punch" command which remove blocks from the 1548middle of an inode. 1549 1550Debugfs now has a new "e2freefrag" command which analyzes the free 1551space fragmentation of the file system, using the same code as the 1552e2freefrag program. 1553 1554Debugfs now has a "filefrag" command which displays information about 1555a file's fragmentation. 1556 1557Add support to build a metadata-only, read-only, stripped-down version 1558of debugfs called rdebugfs. 1559 1560Fixed a potential stack overrun bug in debugfs. 1561 1562The badblocks program now correctly recovers from I/O errors when 1563direct I/O is being used. The badblocks command now also supports a 1564-B option which forces the use of buffered I/O, and the -v option will 1565provide a more detailed breakdown of read, write, and failed 1566comparison errors. 1567 1568Added e4defrag tool which uses the EXT4_IOC_MOVE_EXT ioctl. 1569 1570Added support for journals larger than 2GB. 1571 1572Support using both hard links and symlinks when installing e2fsprogs. 1573 1574Add overflow checking to tune2fs -i's fsck interval, which must fit in 1575a 32-bit field. 1576 1577The debugfs command now has a new 'blocks' command which prints out 1578data blocks of a particular inode in a format which is useful for 1579scripting. 1580 1581Filefrag will report 0 extents correctly in verbose mode. (Addresses 1582RedHat Bugzilla: #653234) 1583 1584Filefrag has been fixed so its -v report prints the correct expected 1585block number (previously there had been an off-by-one error). In 1586addition, it will now display the number of contiguous extents when -v 1587is not specified. This makes it consistent with the number of extents 1588printed when the -v option was specified. In addition, the number of 1589contiguous extents is far more interesting/useful than the number of 1590physical extents for very large files. (Addresses Debian Bug: 1591#631498, #644792) 1592 1593Logsave's usage message has been fixed. (Addresses Debian Bug: 1594#619788) 1595 1596Avoid an infinite loop in ext2fs_find_block_device() if there are 1597symlink loops in /dev caused by a buggy udev. 1598 1599Added a useful "fallocate" program to the contrib directory. 1600 1601Fixed an ABI compatibility problem in libext2fs which broke the dump 1602program. Also added back some macros which dump needed so it could 1603compile against the latest version of ext2_fs.h (Addresses Debian Bug: 1604#636418) 1605 1606Fixed parsing of MNTOPT_ options for tune2fs and debugfs (Addresses 1607Debian Bug: #641667) 1608 1609Added internationalization support for libcom_err error table strings. 1610 1611Fixed various spelling mistakes found in various output strings found 1612by I18N translators. 1613 1614Update translations: French, Chinese, Germany, Indonesian, Swedish, 1615Vietnamese, Polish, Dutch, Czech. (Addresses Debian Bugs: #520985, 1616#620659) 1617 1618Fixed various Debian Packaging issues. (Addresses Debian Bugs: 1619#614662, #632169, #641838, #627535, #629355) 1620 1621Updated/clarified man pages. (Addresses Debian Bugs: #639411, 1622#642193, #634883) 1623 1624Programmer's Notes 1625------------------ 1626 1627Initial support for quota as an integrated feature, where the quota 1628files are hidden system files that are automatically maintained by 1629e2fsck is present, although disabled by default. It must be enabled 1630by using the configure option --enable-quota. 1631 1632Reserved the on-disk fields for the metadata checksum and snapshot 1633features, which are currently in development. 1634 1635The ext2fs library now has the new functions ext2fs_punch(), 1636ext2fs_get_memzero() and ext2fs_file_get_inode(). 1637 1638The ext2fs library now has support for calculating the crc32c checksum 1639(via the new functions ext2fs_crc32c_be and ext2fs_crc32c_le). 1640 1641The I/O manager now supports the discard operation. 1642 1643Reserved file system code points for new 1st class quota feature. 1644 1645Shortened the compilation lines by moving the autoconf defines to 1646a config.h header file. 1647 1648Fixed a potential free of an uninitialized pointer in 1649ext2fs_update_bb_inode(). 1650 1651Fixed miscellaneous gcc -Wall and coverity warnings. 1652 1653Fixed portability issues for Mac OS X, Hurd, and FreeBSD. 1654 1655Fixed a build failure when OMIT_COM_ERR is defined. 1656 1657Improved error checking and fixed memory leaks caused by error return 1658paths. 1659 1660Add ext2fs_flush2() and ext2fs_close2() which takes a flag to allow 1661the fsync() to be skipped. 1662 1663Added a test for extent-mapped journals by mke2fs and tune2fs. 1664 1665Added a test for creating a large (over 4GB) journal using mke2fs. 1666 1667Added a test to make sure the inode size remains constant. 1668 1669The regression test script now prints the list of which tests failed. 1670 1671The regression test system now uses /tmp for its scratch files, which 1672is often a tmpfs mounted file system and hence much faster. 1673 1674The i_e2image test was fixed so it works with valgrind. 1675 1676Tests that rely on debugfs are now skipped if debugfs wasn't built. 1677 1678Fixed the dependencies for "make check" so all required dependencies 1679are built before running the regression tests. 1680 1681A link to com_err.h is installed in $(includedir) during a "make install". 1682 1683The po/*.gmo files are automatically rebuilt if they are missing or 1684out of date. This helps out Debian packaging. 1685 1686Allow ext2fs_get_memalign() to compile on systems that don't have 1687posix_memalign(). 1688 1689Fixed a namespace leak in libext2fs (tdb_null). 1690 1691