1*6a54128fSAndroid Build Coastguard WorkerE2fsprogs 1.20 (May 20, 2001) 2*6a54128fSAndroid Build Coastguard Worker============================= 3*6a54128fSAndroid Build Coastguard Worker 4*6a54128fSAndroid Build Coastguard WorkerAdd support for replaying the ext3 journal purely in user mode, 5*6a54128fSAndroid Build Coastguard Workerincluding handling the orphaned inode list. Used code contributed by 6*6a54128fSAndroid Build Coastguard WorkerAndreas Dilger, with bug fixes and the orphaned inode handling done 7*6a54128fSAndroid Build Coastguard Workerby Theodore Ts'o. 8*6a54128fSAndroid Build Coastguard Worker 9*6a54128fSAndroid Build Coastguard WorkerThe mke2fs and tune2fs programs can create or modify a filesystem to 10*6a54128fSAndroid Build Coastguard Workerinclude an ext3 journal. Tune2fs also can be used to remove an ext3 11*6a54128fSAndroid Build Coastguard Workerjournal from a filesystem. 12*6a54128fSAndroid Build Coastguard Worker 13*6a54128fSAndroid Build Coastguard WorkerE2fsck will now check for the existence of a linked list of orphan 14*6a54128fSAndroid Build Coastguard Workerinodes in the superblock, and clear those inodes before starting the 15*6a54128fSAndroid Build Coastguard Workerrest of the filesystem check (but after the journal playback). 16*6a54128fSAndroid Build Coastguard Worker 17*6a54128fSAndroid Build Coastguard WorkerE2fsck now validates the file descriptor passed to the -C option, 18*6a54128fSAndroid Build Coastguard Workerwhich saves against the completion bar getting written to an 19*6a54128fSAndroid Build Coastguard Workerunexpected location, such as the disk being checked. (Debian 20*6a54128fSAndroid Build Coastguard Workerbug/wishlist #55220) 21*6a54128fSAndroid Build Coastguard Worker 22*6a54128fSAndroid Build Coastguard WorkerE2fsck will now bump the filesystem revision number from zero to one 23*6a54128fSAndroid Build Coastguard Workerif any of the compatibility bits are set. 24*6a54128fSAndroid Build Coastguard Worker 25*6a54128fSAndroid Build Coastguard WorkerFixed a bug where a badly corrupted directory on a big endian system 26*6a54128fSAndroid Build Coastguard Workercould cause e2fsck to die with a bus error. The 27*6a54128fSAndroid Build Coastguard Workerext2fs_read_dir_block() and ext2fs_process_dir_block() functions in 28*6a54128fSAndroid Build Coastguard Workerthe ext2 library now does alignment sanity checks on the rec_len field 29*6a54128fSAndroid Build Coastguard Workerof the directory entry before using it. 30*6a54128fSAndroid Build Coastguard Worker 31*6a54128fSAndroid Build Coastguard WorkerThe ext2 library has been enhanced to make tune2fs safe to run on 32*6a54128fSAndroid Build Coastguard Workermounted filesystems. (Users could usually get away with using tune2fs 33*6a54128fSAndroid Build Coastguard Workeron mounted filesystems before, but with the advent of ext3 and 34*6a54128fSAndroid Build Coastguard Workerjournalling, it became important to make tune2fs was *really* safe for 35*6a54128fSAndroid Build Coastguard Workeruse even when the filesystem being modified is mounted.) E2label is 36*6a54128fSAndroid Build Coastguard Workernow implemented by tune2fs using an argv[0] dispatch, so that e2label 37*6a54128fSAndroid Build Coastguard Workeris also now safe for use on mounted filesystems. 38*6a54128fSAndroid Build Coastguard Worker 39*6a54128fSAndroid Build Coastguard WorkerAdded a new program, e2image, which creates a backup of critical ext2 40*6a54128fSAndroid Build Coastguard Workerfilesystem data structures. The generated image file can be examined 41*6a54128fSAndroid Build Coastguard Workerusing dumpe2fs and debugfs. In the future, e2fsck will be able to use 42*6a54128fSAndroid Build Coastguard Workerthe image file to help recover very badly damaged filesystems. 43*6a54128fSAndroid Build Coastguard Worker 44*6a54128fSAndroid Build Coastguard WorkerFixed a number of LFS bugs in e2fsck; very, very large (> 2**42) files 45*6a54128fSAndroid Build Coastguard Workerno longer cause e2fsck to bomb out. Also treat files > 2GB as being 46*6a54128fSAndroid Build Coastguard Workerlarge file when deciding whether or not the filesystem has large files. 47*6a54128fSAndroid Build Coastguard Worker 48*6a54128fSAndroid Build Coastguard WorkerFixed lsattr and chattr so that they work correctly on large files. 49*6a54128fSAndroid Build Coastguard Worker(Fixes Debian bug #72690.) 50*6a54128fSAndroid Build Coastguard Worker 51*6a54128fSAndroid Build Coastguard WorkerRemoved limitation in get_device_size() which imposed a one terabyte 52*6a54128fSAndroid Build Coastguard Workerfilesystem limitation. (Most 2.2 kernels still have a signed int 53*6a54128fSAndroid Build Coastguard Workerproblem which cause 1 TB block device limitation. Fortunately, the 54*6a54128fSAndroid Build Coastguard Workerkernel patches to fix this are much easier than fixing the 2TB 55*6a54128fSAndroid Build Coastguard Workerlimitation in the kernel. :-) 56*6a54128fSAndroid Build Coastguard Worker 57*6a54128fSAndroid Build Coastguard WorkerA max_mount_count of zero is now treated as if no mount count were 58*6a54128fSAndroid Build Coastguard Workerset. (Previously, no mount count was indicated by using -1, and a 59*6a54128fSAndroid Build Coastguard Workermount count of zero caused e2fsck to always be run.) 60*6a54128fSAndroid Build Coastguard Worker 61*6a54128fSAndroid Build Coastguard WorkerMke2fs supports two new filesystem types largefile and largefile4. 62*6a54128fSAndroid Build Coastguard Worker 63*6a54128fSAndroid Build Coastguard WorkerMke2fs now adds some randomness in s_max_mount_count so that multiple 64*6a54128fSAndroid Build Coastguard Workerfilesystems won't be all checked at the same time under normal 65*6a54128fSAndroid Build Coastguard Workeroperations. 66*6a54128fSAndroid Build Coastguard Worker 67*6a54128fSAndroid Build Coastguard WorkerFixed bug in the progress bar printing code which could cause e2fsck 68*6a54128fSAndroid Build Coastguard Workerto core dump on an illegal filesystem. 69*6a54128fSAndroid Build Coastguard Worker 70*6a54128fSAndroid Build Coastguard WorkerFixed bug in fsck which could allow more than one instance of e2fsck 71*6a54128fSAndroid Build Coastguard Workerto be printing a progress bar. (Debian bug #65267) 72*6a54128fSAndroid Build Coastguard Worker 73*6a54128fSAndroid Build Coastguard WorkerFsck using a UUID or a LABEL specifier will work even if devfs is 74*6a54128fSAndroid Build Coastguard Workercompiled into the kernel and not mounted. If the pathnames in 75*6a54128fSAndroid Build Coastguard Worker/proc/partitions are incorrect, fsck will search /dev for the correct 76*6a54128fSAndroid Build Coastguard Workerdevice (using the new ext2fs_find_block_device library function). 77*6a54128fSAndroid Build Coastguard WorkerFsck now also checks the RAID devices first so that they are properly 78*6a54128fSAndroid Build Coastguard Workerfound when they are in use. Support has also been added to support 79*6a54128fSAndroid Build Coastguard Workeradditional IDE disks and the DAC 960 device names. (Debian bug #94159) 80*6a54128fSAndroid Build Coastguard Worker 81*6a54128fSAndroid Build Coastguard WorkerFixed a bug in fsck which caused it not deal properly with 16 82*6a54128fSAndroid Build Coastguard Workerbyte long filesystem labels. 83*6a54128fSAndroid Build Coastguard Worker 84*6a54128fSAndroid Build Coastguard WorkerFsck's -t option has been made a lot more flexible. The semantics for 85*6a54128fSAndroid Build Coastguard Workerwhat happens if a comma-separated list to fsck has been regularized, 86*6a54128fSAndroid Build Coastguard Workerand it is now possible to filter what filesystems will get checked 87*6a54128fSAndroid Build Coastguard Workerbased what is in the filesystem's fstab entry's option field. (Debian 88*6a54128fSAndroid Build Coastguard Workerbug #89483.) 89*6a54128fSAndroid Build Coastguard Worker 90*6a54128fSAndroid Build Coastguard WorkerThe dumpe2fs program can now print out the group description 91*6a54128fSAndroid Build Coastguard Workerinformation in hex, and also prints the location of the superblock and 92*6a54128fSAndroid Build Coastguard Workerblock group descriptor for those block groups that have them. 93*6a54128fSAndroid Build Coastguard Worker 94*6a54128fSAndroid Build Coastguard WorkerMke2fs now clears the ext2 superblock before it starts creating a 95*6a54128fSAndroid Build Coastguard Workerfilesystem, so that the superblock magic number is only written if the 96*6a54128fSAndroid Build Coastguard Workerfilesystem creation process successfully completes. 97*6a54128fSAndroid Build Coastguard Worker 98*6a54128fSAndroid Build Coastguard WorkerThe debugfs program's stat command now pretty-prints the blocks used 99*6a54128fSAndroid Build Coastguard Workerby an inode so that it's more compact and informative. 100*6a54128fSAndroid Build Coastguard Worker 101*6a54128fSAndroid Build Coastguard WorkerThe debugfs stats command now uses the same libe2p code (which is used 102*6a54128fSAndroid Build Coastguard Workerby dumpe2fs) to print the superblock header information. This is more 103*6a54128fSAndroid Build Coastguard Workercomplete, and it avoids a bit of code duplication. 104*6a54128fSAndroid Build Coastguard Worker 105*6a54128fSAndroid Build Coastguard WorkerAdded a new debugfs command, set_super_value (ssv) which allows the 106*6a54128fSAndroid Build Coastguard Workeruser to set arbitrary superblock fields. 107*6a54128fSAndroid Build Coastguard Worker 108*6a54128fSAndroid Build Coastguard WorkerDebugfs was extended to support inode numbers in hex (by prefixing 109*6a54128fSAndroid Build Coastguard Workerthem with 0x), and so that modify_inode can set the inode generation 110*6a54128fSAndroid Build Coastguard Workernumber. Also, there is now a new function command called logdump 111*6a54128fSAndroid Build Coastguard Workerwhich will dump an ext3 journal. 112*6a54128fSAndroid Build Coastguard Worker 113*6a54128fSAndroid Build Coastguard WorkerFixed a bug in debugfs so that quitting out of the pager doesn't kill 114*6a54128fSAndroid Build Coastguard Workerdebugfs. 115*6a54128fSAndroid Build Coastguard Worker 116*6a54128fSAndroid Build Coastguard WorkerDebugfs's dump command now stops immediately upon reporting a disk 117*6a54128fSAndroid Build Coastguard Workerread error. (Fixed a bug in ext2fs_file_read library routine which 118*6a54128fSAndroid Build Coastguard Workercaused debugfs not to stop.) (Debian bug #79163) 119*6a54128fSAndroid Build Coastguard Worker 120*6a54128fSAndroid Build Coastguard WorkerOn systems with /proc/mounts (mainly Linux systems), /proc/mounts is 121*6a54128fSAndroid Build Coastguard Workerchecked before /etc/mtab is used, since /proc/mounts is more likely to 122*6a54128fSAndroid Build Coastguard Workerbe accurate. 123*6a54128fSAndroid Build Coastguard Worker 124*6a54128fSAndroid Build Coastguard WorkerAdded portability fixes for Solaris and Linux/ia64. 125*6a54128fSAndroid Build Coastguard Worker 126*6a54128fSAndroid Build Coastguard WorkerVarious manual pages were clarified and cleaned up. (Fixed debian 127*6a54128fSAndroid Build Coastguard Workerbugs #63442, #67446, and #87216) 128*6a54128fSAndroid Build Coastguard Worker 129*6a54128fSAndroid Build Coastguard Worker 130*6a54128fSAndroid Build Coastguard WorkerProgrammer's notes: 131*6a54128fSAndroid Build Coastguard Worker------------------- 132*6a54128fSAndroid Build Coastguard Worker 133*6a54128fSAndroid Build Coastguard WorkerThe e2fsck message printer now supports %Iu and %Ig, which will print 134*6a54128fSAndroid Build Coastguard Workerout the inode's user and group owners, respectively. 135*6a54128fSAndroid Build Coastguard Worker 136*6a54128fSAndroid Build Coastguard WorkerE2fsprogs now includes its own version of include/linux/ext2_fs.h, so 137*6a54128fSAndroid Build Coastguard Workerthat no longer dependent on the system having the correct version of 138*6a54128fSAndroid Build Coastguard Workerthe kernel header files. 139*6a54128fSAndroid Build Coastguard Worker 140*6a54128fSAndroid Build Coastguard WorkerAdded a new function to libext2, ext2fs_find_block_device(), which 141*6a54128fSAndroid Build Coastguard Workersearches the system (i.e., /dev, /devfs, /devices) for a pathname to a 142*6a54128fSAndroid Build Coastguard Workerdevice given its device number. 143*6a54128fSAndroid Build Coastguard Worker 144*6a54128fSAndroid Build Coastguard WorkerAdded a new function to libext2, ext2fs_sync_device, which centralizes 145*6a54128fSAndroid Build Coastguard Workerall of the places which might try to use the BLKFLSBUF or FDFLUSH 146*6a54128fSAndroid Build Coastguard Workerioctls (and usually failing to define them since the system header 147*6a54128fSAndroid Build Coastguard Workerfiles don't usually do this for us, and we're trying to avoid usage of 148*6a54128fSAndroid Build Coastguard Workerkernel include files now). 149*6a54128fSAndroid Build Coastguard Worker 150*6a54128fSAndroid Build Coastguard WorkerAdded new utility programs in tests/progs: random_exercise and 151*6a54128fSAndroid Build Coastguard Workerhold_inode. They aren't built by default; they're useful for 152*6a54128fSAndroid Build Coastguard Workerexercising ext3 filesystem code. 153*6a54128fSAndroid Build Coastguard Worker 154*6a54128fSAndroid Build Coastguard WorkerAdded a new ext2 filesystem flag, EXT2_FLAG_SUPER_ONLY, which causes 155*6a54128fSAndroid Build Coastguard Workerthe filesystem close functions to only update the superblock, and to 156*6a54128fSAndroid Build Coastguard Workernot touch the block group descriptors. Needed by tune2fs when 157*6a54128fSAndroid Build Coastguard Workermodifying a mounted filesystem. 158*6a54128fSAndroid Build Coastguard Worker 159*6a54128fSAndroid Build Coastguard WorkerGot rid of struct ext2fs_sb and replaced it with the standard struct 160*6a54128fSAndroid Build Coastguard Workerext2_super_block from include/linux/ext2_fs.h. Note: this may break 161*6a54128fSAndroid Build Coastguard Workersource (but not binary) compatibility of some users of the ext2 162*6a54128fSAndroid Build Coastguard Workerlibrary. Those applications should just simply do a global search and 163*6a54128fSAndroid Build Coastguard Workerreplace of struct ext2fs_sb with struct ext2_super_block, and include 164*6a54128fSAndroid Build Coastguard Workerthe new header file <ext2fs/ext2_fs.h> which defines it. 165*6a54128fSAndroid Build Coastguard Worker 166*6a54128fSAndroid Build Coastguard WorkerThe ino_t type has been renamed ext2_ino_t to protect applications 167*6a54128fSAndroid Build Coastguard Workerthat attempt to compile -D_FILE_OFFSET_BITS=64, since this 168*6a54128fSAndroid Build Coastguard Workerinexplicably changes ino_t(!?). So we use ext2_ino_t to avoid an 169*6a54128fSAndroid Build Coastguard Workerunexpected ABI change. 170*6a54128fSAndroid Build Coastguard Worker 171*6a54128fSAndroid Build Coastguard WorkerThe Makefiles have been reworked so that "make check" can be run from 172*6a54128fSAndroid Build Coastguard Workerthe top-level Makefile. 173*6a54128fSAndroid Build Coastguard Worker 174*6a54128fSAndroid Build Coastguard WorkerFix general gcc -Wall complaints and removed dead code. 175*6a54128fSAndroid Build Coastguard Worker 176*6a54128fSAndroid Build Coastguard WorkerRemove use of NOARGS, because we assume everyone does ANSI C these 177*6a54128fSAndroid Build Coastguard Workerdays. 178*6a54128fSAndroid Build Coastguard Worker 179*6a54128fSAndroid Build Coastguard WorkerAdded build-rpm script from sct. 180*6a54128fSAndroid Build Coastguard Worker 181*6a54128fSAndroid Build Coastguard WorkerNew functions ext2fs_image_{inode,super,bitmap}_{read,write} added 182*6a54128fSAndroid Build Coastguard Workerto support e2image. 183*6a54128fSAndroid Build Coastguard Worker 184*6a54128fSAndroid Build Coastguard WorkerNew function ext2fs_flush_icache which must be called if the 185*6a54128fSAndroid Build Coastguard Workerapplication program modifies the inode table blocks without going 186*6a54128fSAndroid Build Coastguard Workerthrough ext2fs_write_inode() interface. 187*6a54128fSAndroid Build Coastguard Worker 188*6a54128fSAndroid Build Coastguard WorkerNew ext2fs_check_mount_point() function, which will return the mount 189*6a54128fSAndroid Build Coastguard Workerpoint of a device if mounted. 190*6a54128fSAndroid Build Coastguard Worker 191*6a54128fSAndroid Build Coastguard WorkerThe io_channel abstraction now has an optional interface, 192*6a54128fSAndroid Build Coastguard Workerio_channel_write_range, which allows specific byte ranges to be 193*6a54128fSAndroid Build Coastguard Workerwritten. 194*6a54128fSAndroid Build Coastguard Worker 195*6a54128fSAndroid Build Coastguard WorkerThe unix_io IO channel now supports write-through caching, so that 196*6a54128fSAndroid Build Coastguard Workerjournal creation is more efficient. 197*6a54128fSAndroid Build Coastguard Worker 198*6a54128fSAndroid Build Coastguard WorkerAdded x86 assembly language routines to support byte swapping, to 199*6a54128fSAndroid Build Coastguard Workerreduce executable size. 200*6a54128fSAndroid Build Coastguard Worker 201*6a54128fSAndroid Build Coastguard WorkerFixed bug in the utility program subst so that it's possible to 202*6a54128fSAndroid Build Coastguard Workerreplace a substitution variable with a zero-length string. 203*6a54128fSAndroid Build Coastguard Worker 204*6a54128fSAndroid Build Coastguard WorkerFixed numbering e2fsck pass1 problem numbers; an extra zero had 205*6a54128fSAndroid Build Coastguard Workerslipped into some of the problem number. 206*6a54128fSAndroid Build Coastguard Worker 207