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