Whamcloud - gitweb
ChangeLog, e2fsck.h, journal.c, problem.c, problem.h, super.c:
[tools/e2fsprogs.git] / RELEASE-NOTES
1 E2fsprogs 1.20 (May 10, 2001)
2 =============================
3
4 Add support for replaying the ext3 journal purely in user mode,
5 including handling the orphaned inode list.  Used code contributed by
6 Andreas Dilger, with bug fixes and the orphaned inode handling done
7 by Theodore Ts'o.
8
9 The mke2fs and tune2fs programs can create or modify a filesystem to
10 include an ext3 journal.  Tune2fs also can be used to remove an ext3
11 journal from a filesystem.
12
13 E2fsck will now check for the existence of a linked list of orphan
14 inodes in the superblock, and clear those inodes before starting the
15 rest of the filesystem check (but after the journal playback).
16
17 E2fsck now validates the file descriptor passed to the -C option,
18 which saves against the completion bar getting written to an
19 unexpected location, such as the disk being checked.  (Debian
20 bug/wishlist #55220)
21
22 E2fsck will now bump the filesystem revision number from zero to one
23 if any of the compatibility bits are set.
24
25 Fixed a bug where a badly corrupted directory on a big endian system
26 could cause e2fsck to die with a bus error.  The
27 ext2fs_read_dir_block() and ext2fs_process_dir_block() functions in
28 the ext2 library now does alignment sanity checks on the rec_len field
29 of the directory entry before using it.
30
31 The ext2 library has been enhanced to make tune2fs safe to run on
32 mounted filesystems.  (Users could usually get away with using tune2fs
33 on mounted filesystems before, but with the advent of ext3 and
34 journaling, it became important to make tune2fs was *really* safe for
35 use even when the filesystem being modified is mounted.)  E2label is
36 now implemented by tune2fs using an argv[0] dispatch, so that e2label
37 is also now safe for use on mounted filesystems.
38
39 Added a new program, e2image, which creates a backup of critical ext2
40 filesystem data structures.  The generated image file can be examined
41 using dumpe2fs and debugfs.  In the future, e2fsck will be able to use
42 the image file to help recover very badly damaged filesystems.
43
44 Fixed a number of LFS bugs in e2fsck; very, very large (> 2**42) files
45 no longer cause e2fsck to bomb out.  Also treat files > 2GB as being
46 large file when deciding whether or not the filesystem has large files.
47
48 Fixed lsattr and chattr so that they work correctly on large files.
49 (Fixes Debian bug #72690.)
50
51 Removed limitation in get_device_size() which imposed a one terrabyte
52 filesystem limitation.  (Most 2.2 kernels still have a signed int
53 problem which cause 1 TB block device limitation.  Fortunately, the
54 kernel patches to fix this are much easier than fixing the 2TB
55 limitation in the kernel.  :-)
56
57 A max_mount_count of zero is now treated as if no mount count were
58 set.  (Previously, no mount count was indicated by using -1, and a
59 mount count of zero caused e2fsck to always be run.)
60
61 Mke2fs supports two new filesystem types largefile and largefile64.
62
63 Mke2fs now adds some randomness in s_max_mount_count so that multiple
64 filesystems won't be all checked at the same time under normal
65 operations.
66
67 Fixed bug in the progress bar printing code which could cause e2fsck
68 to core dump on an illegal filesystem.
69
70 Fixed bug in fsck which could allow more than one instance of e2fsck
71 to be printing a progress bar.  (Debian bug #65267)
72
73 Fsck using a UUID or a LABEL specifier will work even if devfs is
74 compiled into the kernel and not mounted.  If the pathnames in
75 /proc/partitions are incorrect, fsck will search /dev for the correct
76 device (using the new ext2fs_find_block_device library function).
77 Fsck now also checks the RAID devices first so that they are properly
78 found when they are in use.  Support has also been added to support
79 additional IDE disks and the DAC 960 device names.  (Debian bug #94159)
80
81 Fixed a bug in fsck which caused it not deal properly with 16
82 byte long filesystem labels.
83
84 The dumpe2fs program can now print out the group description
85 information in hex, and also prints the location of the superblock and
86 block group descriptor for those block groups that have them.
87
88 Mke2fs now clears the ext2 superblock before it starts creating a
89 filesystem, so that the superblock magic number is only written if the
90 filesystem creation process successfully completes.
91
92 The debugfs program's stat command now pretty-prints the blocks used
93 by an inode so that it's more compact and informative.
94
95 The debugfs stats command now uses the same libe2p code (which is used
96 by dumpe2fs) to print the superblock header information.  This is more
97 complete, and it avoids a bit of code duplication.
98
99 Added a new debugfs command, set_super_value (ssv) which allows the
100 user to set arbitrary superblock fields.
101
102 Debugfs was extended to support inode numbers in hex (by prefixing
103 them with 0x), and so that modify_inode can set the inode generation
104 number.  Also, there is now a new function command called logdump
105 which will dump an ext3 journal.
106
107 Fixed a bug in debugfs so that quitting out of the pager doesn't kill
108 debugfs.
109
110 Debugfs's dump command now stops immediately upon reporting a disk
111 read error.  (Fixed a bug in ext2fs_file_read library routine which
112 caused debugfs not to stop.)  (Debian bug #79163)
113
114 On systems with /proc/mounts (mainly Linux systems), /proc/mounts is
115 checked before /etc/mtab is used, since /proc/mounts is more likely to
116 be accurate.
117
118 Added portability fixes for Solaris and Linux/ia64.
119
120 Various manual pages were clarified and cleaned up.  (Fixed debian
121 bugs #63442, #67446, and #87216)
122
123
124 Programmer's notes:
125 -------------------
126
127 The e2fsck message printer now supports %Iu and %Ig, which will print
128 out the inode's user and group owners, respectively.
129
130 E2fsprogs now includes its own version of include/linux/ext2_fs.h, so
131 that no longer dependent on the system having the correct version of
132 the kernel header files.
133
134 Added a new function to libext2, ext2fs_find_block_device(), which
135 searches the system (i.e., /dev, /devfs, /devices) for a pathname to a
136 device given its device number.
137
138 Added a new function to libext2, ext2fs_sync_device, which centralizes
139 all of the places which might try to use the BLKFLSBUF or FDFLUSH
140 ioctls (and usually failing to define them since the system header
141 files don't usually do this for us, and we're trying to avoid usage of
142 kernel include files now).
143
144 Added new utility programs in tests/progs: random_exercise and
145 hold_inode.  They aren't built by default; they're useful for
146 exercising ext3 filesystem code.
147
148 Added a new ext2 filesystem flag, EXT2_FLAG_SUPER_ONLY, which causes
149 the filesystem close functions to only update the superblock, and to
150 not touch the block group descriptors.  Needed by tune2fs when
151 modifying a mounted filesystem.
152
153 Got rid of struct ext2fs_sb and replaced it with the standard struct
154 ext2_super_block from include/linux/ext2_fs.h.  Note: this may break
155 source (but not binary) compatibility of some users of the ext2
156 library.  Those applications should just simply do a global search and
157 replace of struct ext2fs_sb with struct ext2_super_block, and use
158 their own private copy of ext2_fs.h if they aren't already.
159
160 The ino_t type has been renamed ext2_ino_t to protect applications
161 that attempt to compile -D_FILE_OFFSET_BITS=64, since this
162 inexplicably changes ino_t(!?).  So we use ext2_ino_t to avoid an
163 unexpected ABI change.
164
165 The Makefiles have been reworked so that "make check" can be run from
166 the top-level Makefile.
167
168 Fix general gcc -Wall complaints and removed dead code.
169
170 Remove use of NOARGS, because we assume everyone does ANSI C these
171 days.
172
173 Added build-rpm script from sct.
174
175 New functions ext2fs_image_{inode,super,bitmap}_{read,write} added 
176 to support e2image.
177
178 New function ext2fs_flush_icache which must be called if the
179 application program modifies the inode table blocks without going
180 through ext2fs_write_inode() interface.
181
182 New ext2fs_check_mount_point() function, which will return the mount
183 point of a device if mounted.
184
185 The io_channel abstraction now has an optional interface,
186 io_channel_write_range, which allows specific byte ranges to be
187 written.  
188
189 The unix_io IO channel now supports write-through caching, so that
190 journal creation is more efficient.
191
192 Added x86 assembly language routines to support byte swapping, to
193 reduce executable size.
194
195 Fixed bug in the utility program subst so that it's possible to
196 replace a substitution variable with a zero-length string.
197
198 Fixed numbering e2fsck pass1 problem numbers; an extra zero had
199 slipped into some of the problem number.
200
201 E2fsprogs 1.19 (July 13, 2000)
202 ==============================
203
204 Release the resize2fs program since the timeout before it could
205 be released under the GPL has finally expired.
206
207 Add experimental support needed for the ext2 compression patches.
208 This requires compiling e2fsprogs with the --enable-compression flag
209 to the configure script.
210
211 Added ext3 journalling support.  E2fsck will run the journal (if
212 necessary) by temporarily mounting the filesystem.  /sbin/fsck.ext3 is
213 installed as a symlink to e2fsck.  Fsck has been taught about ext3,
214 and treats it the same as ext2 in terms of the progress bar logic.
215 Dumpe2fs will display the superblock journaling information if the
216 filesystem has a journal.  The ext2 library will now permit opening an
217 ext3 filesystem with the recovery flag set.  This is necessary for
218 on-line dump's to work correctly, but there may be issues with this
219 working well since ext3 is much less agressive about syncing blocks to
220 the filesystem, since they're safe on the journal.
221
222 Tune2fs and e2fsck have been changed to allow the mount_count check to
223 be disabled by setting max_mount_count to -1.  (This was already
224 supported by the kernel.)
225
226 Create a symbolic link for fsck.ext3, since the e2fsprogs utilities
227 are used for ext3 as well.
228
229 Added internationalization support for e2fsprogs; must be enabled
230 by passing --enable-nls to configure.
231
232 Always use the provided ext2fs header files to insulate ourselves from
233 kernel version changes.  Which include files are used by e2fsprogs
234 have also been cleaned up to improve portability.
235
236 Limit the number of times that e2fsck updates the progress bar so that
237 people who are booting using a 9600 baud console don't get swampped by
238 too many updates.
239
240 Improved the loop detection algorithm in e2sck's pass #3 so that it is
241 much, much faster for large filesystems with a large number of
242 directories.
243
244 The memory footprint for e2fsck is now slightly smaller than before.
245
246 E2fsck now checks if special devices have a non-zero size, and offers
247 to clear the size field if it finds such an inode.  
248
249 E2fsck now checks if special devices have the append-only flag set,
250 and offers to clear the inode.
251
252 E2fsck now properly handles some "should never fail" cases during a
253 bitmap copy in pass5.
254
255 E2fsck now properly prints control characters in filenames as ^A .. ^Z.
256
257 E2fsck now calculates the correct location of the backup superblock in
258 the case of filesystem blocksizes > 1k.
259
260 Fixed a bug in e2fsck's calculation of the number of inodes_per_block
261 which normally didn't cause problems under most filesystem parameters,
262 but could cause a valid superblock to be rejected in extreme cases.
263 Other checks for validating superblock values were made more
264 stringent.
265
266 Added non-destructive write testing to the badblocks program, courtesy
267 of David Beattie.  The badblocks also now has an option to input the
268 current set of bad blocks, so that known bad blocks are skipped to
269 speed up the badblocks test.  There is also a persistent rescan
270 feature which causes badblocks to run until it has completed some
271 number of passes without discovering any new bad blocks.
272
273 Badblocks now checks to see if the device is mounted and refuses to do
274 the tests involving writing to the device if it is mounted.  Also,
275 badblocks now allows the number of blocks to be checked to be
276 defaulted to the size of the partition.
277
278 Fixed a bug in fsck which didn't allow non-root users to be able to
279 check filesystems if there were any LABEL= or UUID= entries in
280 /etc/fstab.
281
282 The Hurd doesn't support the filetype filesystem feature.  The mke2fs
283 program now makes sure that for the Hurd, the filestype feature is
284 turned off.  E2fsck will check to see if the filetype feature is
285 turned on for Hurd filesystems, and offer to turn off the feature.
286
287 Mke2fs now has a safety check to make sure the number of blocks do not
288 exceed 32 bits even on a 64 bit platform.
289
290 Really fixed a bug in fsck to allow "fsck -As" to run interactive
291 fsck's.  (For those people who like to do interactive fsck's in the
292 /etc/rc scripts!?!)
293
294 Debugfs has a few new features: the rdump command, which will do a
295 recursive dump of a directory and all of its contents, and the lcd
296 command which does a local chdir (much like the ftp command of the
297 same name).  In addition, the debugfs program and the open_filesystem
298 command now takes three new options: -b and -s, which allows the
299 blocksize and superblock location to be specified, and the -c option
300 which is used in catastrophic situations where the block group
301 descriptors are corrupt.  If the -c option is specified, debugfs will
302 skip trying to read in the block and inode bitmaps.
303
304 Debufs's lsdel command was fixed to handle bad blocks in the inode
305 table.
306
307 A Y2K bug in debugfs's "ls -l" handling was fixed by switching to use
308 4 digit years.
309
310 General improvements in error messages
311
312   - Mke2fs prints a sane error message if the partition size is zero
313         (usually because the partition table wasn't reread by the
314         kernel due to the partition being busy), instead of "invalid
315         argument passed to ext2 library while initializing superblock".
316
317   - Fsck now prints more self-explanatory message if an invalid UUID=
318         or LABEL= specification is passed to it.
319
320 UUID library changed to use the LGPL.
321
322 Fixed a bug in the UUID library where very rapid calls to the
323 time-based UUID generator could cause duplicate UUID's to be returned.
324 This was not a problem for e2fsprogs, but it could be a problem for
325 other users of the library.
326
327 Make the UUID library more robust in the face of missing or an
328 improper /dev/urandom or /dev/random files.
329
330 Added some random portability fixes for Solaris.
331
332 Some minor man page updates.
333
334 Fixed a memory leak in the ss library.
335
336
337 Programmer's notes:
338 -------------------
339
340 We now try to use lseek64 and open64 from the LFS if possible.
341
342 The 3rd parameter in e2p's print_flags is now a flags word, instead of
343 a boolean option.
344
345 The mark and unmark bitmap functions now return the previous state of
346 the bit that was being changed, which is useful for some speed
347 optimizations.
348
349 The following functions have been added to enhance the badblocks list
350 handling in libext2fs: ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
351 ext2fs_badblocks_equal.
352
353 The ext2 header files now have the latest journalling fields to the
354 superblock.
355
356 The ext2fs_mkdir function in libext2fs now properly backs out of error
357 conditions robustly.
358
359 Cleaned up makefiles:
360   - to cleanly  compile with the -j flag.
361   - so distclean removes all generated files.
362   - so in case of an error while installing header files, the make aborts.
363
364 Fix test_script so that it works correctly when compiling in the
365 source directory.
366
367 The random UUID generation routine has been made slightly better in
368 the case where /dev/random doesn't exist.  (Use of randomly-based UUID
369 is still not recommended if /dev/random doesn't exist, however; it's
370 better to use the time/ethernet MAC address UUID in this case.)
371
372 Clean up the build process so it's more friendly in case of missing
373 directories.
374
375 The ext2fs header file can now be #include'd into C++ programs.
376
377 The e2p.h header file is now installed.
378
379 Added workaround to a gawk 3.0.5 bug in lib/ss/mk_cmds.
380
381
382
383 E2fsprogs 1.18 (November 10, 1999)
384 ==================================
385
386 Fix a core dumping bug in e2fsck if an imagic inode is present or
387 (more rarely) if the filesystem is badly corrupted enough that e2fsck
388 has to restart pass 1 processing.  E2fsck now closes the filesystem
389 before freeing a large number of its data structures, so in the case
390 of future memory faults, at least the fixed filesystem will be fully
391 written out.
392
393 If a filesystem doesn't support imagic inodes, and e2fsck discovers an
394 imagic inode, it will offer to clear the imagic flag.
395
396 E2fsck will now offer to clear the immutable flag on special files
397 (device/socket/fifos) when running it in non-preen mode.
398
399 E2fsck will now set the filetype when creating /lost+found, and when
400 connected orphaned inodes to /lost+found.
401
402 Debugfs's ncheck and icheck commands now handles the case where there
403 are bad blocks in the inode table without bombing out.
404
405 The badblocks list processing code has been made more efficiently for
406 appending a large number of (ordered) badblocks to the badblocks list.
407
408 Some minor man page updates.
409
410 Fsck now allows interactive e2fsck's when using fsck -As (not a common
411 mode, but some people like to do this in boot scripts for silly reasons).
412
413 Programmer's notes:
414 -------------------
415
416 The internal e2fsck problem code for PR_2_SPLIT_DOT was fixed to meet
417 with the problem code convention.
418
419 The badblocks list regression test program has been updated to work
420 with previously made API name changes.
421
422 The ext2fs_free() command now uses the new badblocks API to avoid
423 using the compatibility layer.
424
425 Added new regression test cases; the run_e2fsck test script now
426 supports the ability for a test case to run a prepratory command
427 before running e2fsck.
428
429 E2fsprogs 1.17 (October 26, 1999)
430 =================================
431
432 Fixed nasty typo in fsck which caused parallelized fsck's to go into an
433 infinite loop.
434
435 Fixed a bug in fsck where it used strncmp to compare a binary UUID,
436 thus potentially causing problems if a binary UUID contained a NULL
437 character.
438
439 E2fsck now uses stricter checks for directory entries in pass 2:
440 zero-length filenames are not allowed; neither are 8 byte long
441 directory entries.
442
443 The debugfs "dirty" command now clears the filesystem valid bit.
444 (Previously this just set the dirty-as-in-needs-writing-out-to-disk
445 bit in the in-core superblock image.  The new functionality is more
446 what the user expects, and is more useful.)
447
448 Added a debugging hook to test parallel fsck; if the environment
449 variable FSCK_FORCE_ALL_PARALLEL, then filesystems on the same drive
450 will be checked in parallel when they normally would not be.
451
452 Programmer's notes:
453 -------------------
454
455 Fixed some #ifdef's for compilation under the Hurd OS.
456
457 Fixed minor W2K compatibility problems.
458
459 Fixed some miscellaneous GCC warnings.
460
461
462 E2fsprogs 1.16 (October 22, 1999)
463 =================================
464
465 Fixed a race condition bug in fsck; when printing a progress bar, if
466 checking multiple filesystems in parallel, it was possible for fsck to
467 send e2fsck a SIGUSR1 signal before e2fsck had installed its signal
468 handler, which would cause it to terminate with a signal 10.
469
470 E2fsck now properly handles filesystems that have the
471 INCOMPAT_FILETYPE feature turned on.  It can be used to convert a
472 filesystem into using or not using FILETYPE feature.
473
474 E2fsck now properly handles filesystems that have the IMAGIC feature
475 turned on (this is used on Linux AFS servers).
476
477 The mke2fs program now creates filesystems that have the filetype and
478 sparse_superblock features enabled by default, unless it is run on a
479 pre-2.2 kernel.  These features are not supported by a pre-2.2 kernel,
480 so there is now a new flag -O which allows the user to specify with
481 which features she would like to create the filesystem; "mke2fs -O
482 none" will create a filesystsem compatible with 2.0 kernels.
483
484 The tune2fs program now has a -O option which allows the user to set
485 and reset "safe" filesystem features.  Currently, the only ones which
486 allows to be modified are the filetype and sparse_superblock features.
487 Note setting or clearing either feature will require running e2fsck on
488 the filesystem afterwards.  (n.b. Clearing the sparse_superblock feature
489 requires that there is enough free space on the filesystem for the
490 extra superblocks which will be created by e2fsck.)
491
492 Debugfs can now set and print filesystem features in the superblock
493 using the "features" command.  Dumpe2fs will print out the complete
494 set of features when listing the superblock.
495
496 Dumpe2fs has new options -f (force) and -h (header-only).
497
498 Fixed a bug in e2fsck which could cause the PROGRAMMING ERROR/bonehead
499 message to come up.  This could happen when decrementing or
500 incrementing a link count could result in an overflow.
501
502 Fixed a bug in e2fsck where the block count on the lost+found
503 directory would not be properly incremented when the directory was
504 expanded to the point where an indirect block needed to be allocated.
505
506 E2fsck now makes some additional sanity checks on the superblock to
507 avoid crashing or giving a memory allocation error if some of the
508 values in the superblock are unresonable (but the superblock otherwise
509 looks valid).
510
511 Fixed a bug in e2fsck where a very badly corrupted filesystem might
512 require two passes to completely fix the filesystem.  This happened if
513 an inode claimed blocks that was part of the filesystem metadata
514 (typically, when garbage was written into an inode table or indirect
515 block, since this kind of filesystem corruption normally doesn't
516 happen otherwise).
517
518 On the Alpha, glibc declares st_flags although it isn't actually used;
519 the configure script was improved to detect this case so that
520 e2fsprogs can avoid using the non-functional stat field.
521
522 The manual pages were updated to use a more consistent formatting
523 style consistent with standard Unix man pages.  Mke2fs's man page
524 added documentation for a few previously undocumented options.
525
526 Fixed minor display bugs in tune2fs and mke2fs.
527
528 Programmer's notes:
529 -------------------
530
531 Improved portability of e2fsprogs to non-Unix systems (in particular, NT).
532
533 Added features to parse and print feature strings into the e2p library.  
534 (e2p_feature2string, e2p_string2feature, e2p_edit_feature).
535
536 ext2fs_mkdir() and ext2fs_new_dir_block() now creates directories
537 whose directory entries contain proper filetype information if the
538 filesystem supports it.
539
540 ext2fs_link() now uses the low 3 bits of its flags parameter to pass
541 the directory entry filetype information.  This is used to set the
542 directory entry filetype information if the filesystem supports it.
543
544 Fixed a bug in ext2fs_expand_dir() where the block count in a
545 directory's inode would not be properly incremented when the directory
546 was expanded to the point where an indirect block needed to be
547 allocated.
548
549
550 E2fsprogs 1.15 (July 18, 1999)
551 ==============================
552
553 Add configuration checks so that e2fsprogs will compile cleanly on
554 Linux 2.3 kernels that have renamed i_version to i_generation.
555
556 E2fsck now prints a progress/completion bar (and not just a simple
557 spinner) if the -C0 option is requested or if it receives a SIGUSR1
558 signal.  Fsck will automatically manage the (potentially muliple)
559 e2fsck processes to print completion bars if it is given a -C option,
560 with the right thing happening if multiple filesystems are being
561 checked in parallel.
562
563 Mke2fs now has better automatic hueristics to determine the filesystem
564 parameters to be used for a particular filesystem.  Added a new option
565 -T which allows the user to specify how the filesystem is to be used,
566 which helps mke2fs do a better job selecting the filesystem parameters.
567
568 Mke2fs now creates revision 1 filesystems by default, and with the
569 sparse superblock feature enabled.  The sparse superblock feature is
570 not understood by Linux 2.0 kernels, so they will only allow read-only
571 mounts of filesystems with this sparse superblocks.
572
573 Fix bug where if /dev/null couldn't be opened (should never happen),
574 e2fsck would hang in a tight loop.
575
576 Make e2fsck handle the case where /lost+found isn't a directory.
577
578 E2fsck now uses mallinfo if it exists to get accurate statistics about
579 its memory usage.
580
581 Fix bug in e2fsck where it wouldn't check to see if a disconnected
582 inode had any problems before connecting it to /lost+found.
583
584 Add check to e2fsck so it makes sure that total number of inodes in
585 the filesystem is a sane number.
586
587 Fix fencepost error when clearing an the end of the block bitmap which
588 caused the last block in the bitmap not to get cleared.
589
590 Cleaned up a number of messages in e2fsck:
591         * The message "Group's #'s copy of the group descriptor..."
592                 was fixed so that the correct number would be displayed.
593         * Added missing space in the "disk write-protected" error messsage
594         * Cleaned up the error message printed when a non-interactive
595                 e2fsck needs to abort a check because the filesystem
596                 appears to be mounted.
597
598 Added a new command-line utility, uuidgen, which will create and print
599 a UUID.
600
601 Make debugfs's icheck command more robust by checking to make sure an
602 inode has valid blocks before interarting over the inode's blocks.
603
604 UUID generation now uses a random-based scheme whenever possible to
605 prevent potential privacy problems.
606
607 Man pages for all of the UUID functions in the lirbary were added.
608
609 Fixed bug in fsck so it won't coredump if a filesystem not in
610 /etc/fstab is given to it.
611
612 Fsck now understands the UUID=xxxx and LABEL=yyyy forms in /etc/fstab
613 that most of the other mount utilities understands.
614
615 Mke2fs will make a filesystem even if it appears mounted if the force
616 option is given.
617
618 Dumpe2fs has new command-line options which allow a filesystem expert
619 to specify the superblock and blocksize when opening a filesystem.
620 This is mainly useful when examining the remains of a toasted
621 filesystem.
622
623 The badblocks program has been updated to display correctly on disks
624 with large block numbers.
625
626 The badblocks program no longer gives spurious errors when errors
627 occur on non-block boundaries, which is common if the blocksize is
628 larger than 1k.
629
630 Mke2fs will sync the disk device every MKE2FS_SYNC block groups if the
631 MKE2FS_SYNC environment variable is set.  This is to work around a VM
632 bug in the 2.0 kernel.  I've heard a report that a RAID user was able
633 to trigger it even using a 2.2 kernel, but hopefully it will not be
634 needed for most Linux 2.2 users.
635
636 Fixed miscellaneous documentation and man pages.
637
638 Programmer's notes:
639 -------------------
640
641 Cleaned up functions such as pass1_get_blocks, pass1_read_inode which
642 in e2fsck's pass1.c really should have been static.
643
644 The return value of the uuid_compare() function was changed to make it
645 match with the convetions used by strcmp, memcmp, and Paul Leach's
646 UUID sample document.
647
648 The "make depend" process has now been made more automated; it now
649 automatically word-wraps the dependencies, and only replaces source
650 Makefile.in if there has been a change in the dependencies.  Also, a
651 top-level "make depend" now recurses through all the subdirectories
652 automatically.
653
654 The Makefile in .../util has been changed so that subst is built using
655 the native C compiler during a cross-compilation, since the subst
656 program is only used during the build process.  Also add an explicit
657 rule to build util/subst by cd'ing to the correct directory and
658 running Makefile.
659
660 The man directories are defined in terms mandir, so that the configure
661 script can override the location of the manual pages.
662
663 The config files have been updated to recognize new machine types for
664 both the i386 and alpha families.
665
666 Fsck has been modified so that it will accurately create an
667 fsck_instance even when the noexecute flag is set.  This allows for
668 accurate debugging of the fsck pass structure.  Also, when the verbose
669 flag is given twice, fsck will print debugging information about when
670 fsck is waiting for jobs to finish.
671
672
673 E2fsprogs 1.14 (January 9, 1999)
674 ================================
675
676 Fix the fstab parsing code so that it can handle blank lines and
677 comment characters.  Also, missing pass numbers need to be treated as
678 zero.
679
680 Fixed a bug in e2fsck where under some circumstances (when e2fsck
681 needs to restart processing after fixing an egregious inconsistency)
682 it would try to access already freed memory.
683
684 E2fsck now prints non-printable characters in directory entries and
685 pathnames using '^' and 'M-' notation.
686
687 Fixed chattr so that it will ignore symbolic links when doing
688 recursive descent traversals.  For both chattr and lsattr, no longer
689 print the version string unless the -V option is given.
690
691 Allow the system administrator to directly specify the number of
692 inodes desired in the filesystem, for some special cases where this is
693 necessary.
694
695 Fix portability problems so that e2fsprogs can be compiled under Linux
696 1.2 systems and Solaris systems.
697
698 Update the config.guess file with a more recent version that will
699 identify newer Linux platforms.
700
701 Programmer's notes
702 ------------------
703
704 Ext2fs_read_inode and ext2fs_write_inode will now return an error if
705 an inode number of zero is passed to them.
706
707 E2fsprogs 1.13 (December 15, 1998)
708 ==================================
709
710 Fixed a bug in debugfs where an error messages weren't getting printed
711 when the ext2 library routines to read inodes returned errors in the
712 stat, cmri and rm commands.
713
714 Fixed a bug in mke2fs so that if a ridiculous inode ratio parameter is
715 provided, it won't create an inode table smaller than the minimum
716 number of inodes required for a proper ext2 filesystem.
717
718 Fsck now parses the /etc/fstab file directly (instead of using
719 getmntent()), so that it can distinguish between a missing pass number
720 field and pass number field of zero.  This caused problems for
721 diskless workstations where all of the filesystems in /etc/fstab have
722 an explicit pass number of zero, and fsck could not distinguish this
723 from a /etc/fstab file with missing pass numbers.
724
725 E2fsck will create a /lost+found directory if there isn't one in the
726 filesystem, since it's safer to create the lost+found directory before
727 it's needed.
728
729 Fixed e2fsck so that it would detect bogus immutable inodes which
730 happen to be sockets and FIFO files, and offer to clear them.
731
732 If a filesystem has multiple reasons why it needs to be checked, and
733 one of the reasons is that it is uncleanly mounted, e2fsck will print
734 that as the reason why the filesystem is being checked.
735
736 Cleaned up the output routines of mke2fs so that it doesn't overflow
737 an 80 column display when formating really big filesystems.
738
739 Added a sanity check to e2fsck to make sure that file descriptors 0,
740 1, 2 are open before opening the hard disk.  This avoids a problem
741 where a broken program might exec e2fsck with those file descriptors
742 closed, which would cause disastrous results if the kernel returns a
743 file descriptor for the block device which is also used by FILE *
744 stdout.
745
746 Fixed up the e2fsck progress reporting functions so that the values
747 reliably reach 100% at the completion of all of the e2fsck passes.
748
749 Fixed minor documentation bugs in man pages and usage messages.
750
751 Programmer's notes:
752 -------------------
753
754 Fixed a number of lint warnings in the ext2fs library and potential
755 portability problems from other OS's header files that might define
756 CPP macros for names like "max" and "min".
757
758 ext2fs_badblocks_list_add() has been made more efficient when it needs
759 to grow the bad blocks list.
760
761 Fixed a bug in e2fsck which caused it to dereference a freed pointer
762 just before exiting.
763
764 Fixed the substition process for generating the mk_cmds and compile_et
765 scripts so that they will work outside of the build tree.
766
767 Add sanity check to e2fsck so that if an internal routine
768 (ext2fs_get_dir_info) returns NULL, avoid dereferencing the pointer
769 and causing a core dump.  This should never happen, but...
770
771 E2fsprogs 1.12 (July 9, 1998)
772 ==================================
773
774 E2fsprogs now works with glibc (at least with the version shipped wtih
775 RedHat 5.0).  The ext2fs_llseek() function should now work even with
776 i386 ELF shared libraries and if llseek() is not present.  We also
777 explicitly do a configure test to see if (a) llseek is in libc, and
778 (b) if llseek is declared in the system header files.  (See standard
779 complaints about libc developers don't understand the concept of
780 compatibility with previous versions of libc.)
781
782 The ext2fs library now writes out the block group number in each of
783 the superblock copies.  This makes it easier to automatically
784 determine the starting block group of the filesystem when the block
785 group information is trashed.
786
787 Added support for the EXT2_FEATURE_INCOMPAT_FILETYPE feature,
788 which means that e2fsprogs will ignore the high 8 bits of the
789 directory entry's name_len field, so that it can be used for other
790 purposes.
791
792 Added support for the EXT2_FEATURE_RO_COMPAT_LARGE_FILE feature.
793 E2fsprogs will now support filesystems with 64-bit sized files.
794
795 Added support for the EXT2_FEATURE_COMPAT_DIR_PREALLOC feature.
796
797 Added new program "e2label", contributed by Andries Brouwer.  E2label
798 provides an easy-to-use interface to modify the filesystem label.
799
800 Fixed bug so that lsattr -v works instead of producing a core dump.
801
802 Fixed a minor bug in mke2fs so that all groups with bad superblock
803 backup blocks are printed (not just the first one).
804
805 Mke2fs will check the size of the device, and if the user specifies a
806 filesystem size larger than the apparent size of the device it will
807 print a warning message and ask if the user wants to proceed.
808
809 E2fsck has a new option -C, which sends completion information to the
810 specified file descriptor.  For the most part, this is intended for
811 programs to use, although -C 0 will print a spinning character to the
812 stdout device, which may be useful for users who want to see something
813 happening while e2fsck goes about its business.
814
815 Fixed a bug in e2fsck which could cause a core dump when it needs to
816 expand the /lost+found directory, and sometimes the bitmaps haven't
817 been merged in.  Also fixed a related bug where ext2fs_write_dir_block
818 was used to write out a non-directory block.  (Which would be bad on a
819 non-Intel platform with byte swapping going on.)
820
821 Fixed bug in e2fsck where it would print a "programming error" message
822 instead of correctly identifying where a bad block was in used when
823 the bad block was in a non-primary superblock or block group
824 descriptor.  Also fixed a related bug when sparse superblocks are in
825 use and there is a bad block where a superblock or block group
826 descriptor would have been in a group that doesn't include a
827 superblock.
828
829 Fixed a bug in e2fsck (really in libext2fs's dblist function) where if
830 the block group descriptor table is corrupt, it was possible to try to
831 allocate a huge array, fail, and then abort e2fsck.
832 ext2fs_get_num_dirs() now sanity checks the block group descriptor,
833 and subsitutes reasonable values if the descriptors are obviously bogus.
834
835 If e2fsck finds a device file which has the immutable flag set and the
836 i_blocks beyond the normal device number are non-zero, e2fsck will
837 offer to remove it, since it's probably caused by garbage in the inode
838 table.
839
840 When opening a filesystem, e2fsck specially checks for the EROFS error
841 code, and prints a specific error message to the user which is more
842 user friendly.
843
844 If the filesystem revision is too high, change the e2fsck to print
845 that this is either because e2fsck is out of date, or because the
846 superblock is corrupt.  
847
848 E2fsck now checks for directories that have duplicate '.' and '..'
849 entries, and fixes this corruption.
850
851 E2fsck no longer forces a sync of the filesystem (with attendant sleep
852 calls) at all times.  The ext2fs_flush() function now performs a sync
853 only if it needed to write data blocks to disk.
854
855 Fixed a minor bug in e2fsck's pass1b's file cloning function, where
856 certain errors would not be properly reported.
857
858 Updated and expanded a few points in the man pages which users
859 complained wheren't explicit enough.
860
861 Added special case byte-swapping code if compiling on the PowerPC, to
862 accomodate the strange big-endian variant of the ext2 filesystem that
863 was previously used on the PowerPC port.
864
865
866 Programmer's notes:
867 -------------------
868
869 Removed C++ keywords from the ext2fs libraries so that it could be
870 compiled with C++.
871
872 E2fsck's internal organization has now been massively reorganized so
873 that pass*.c don't have any printf statements.  Instead, all problems
874 are reported through the fix_problem() abstraction interface.  E2fsck
875 has also been revamped so that it can be called as a library from a
876 application.
877
878 Added new fileio primitives in libext2fs for reading and writing
879 files on an unmounted ext2 filesystem.  This interface is now used by
880 debugfs.
881
882 Added a new libext2fs function for mapping logical block numbers of
883 a file to a physical block number.
884
885 Added a new libext2fs function, ext2fs_alloc_block(), which allocates
886 a block, zeros it, and updates the filesystem accounting records
887 appropriately.
888
889 Added a new libext2fs function, ext2fs_set_bitmap_padding(), which
890 sets the padding of the bitmap to be all one's.  Used by e2fsck pass 5.
891
892 The libext2fs functions now use a set of memory allocation wrapper
893 functions: ext2fs_get_mem, ext2fs_free_mem, and ext2fs_resize_mem,
894 instead of malloc, free, and resize.  This makes it easier for us to
895 be ported to strange environments where malloc, et. al. aren't
896 necessarily available.
897
898 Change the libext2fs fucntion to return ext2-specific error codes
899 (EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND, for example) instead of using
900 and depending on the existence of system error codes (such as EEXIST
901 and ENOENT).
902
903 Renamed io.h to ext2_io.h to avoid collision with other OS's header
904 files.
905
906 Add protection against ext2_io.h and ext2fs.h being included multiple
907 times.
908
909 The types used for memory lengths, etc. have been made more portable.
910 In generla, the code has been made 16-bit safe.  Added Mark
911 Habersack's contributed DOS disk i/o routines.
912
913 Miscellaneous portability fixes, including not depending on char's
914 being signed.
915
916 The io_channel structure has a new element, app_data, which is
917 initialized by the ext2fs routines to contain a copy of the filesystem
918 handle.
919
920 ext2fs_check_directory()'s callback function may now return the error
921 EXT2_ET_CALLBACK_NOTHANDLED if it wishes ext2fs_check_directory() to
922 really do the checking, despite the presence of the callback function.
923
924
925 E2fsprosg 1.11 (June 17, 1997)
926 ==============================
927
928 Fixed e2fsck to detect (previously ignored) conflicts between the
929 superblock or block group descriptors and block bitmaps, inode
930 bitmaps, and inode tables.
931
932 Fixed bug in e2fsck so that when the message printed out when a block
933 or inode bitmap conflicts with other data, it has the correct group
934 number.
935
936 Fixed bug in e2fsck and mke2fs where the blocksize wasn't being passed
937 to badblocks.  This meant that not all of the filesystem was being
938 tested for bad blocks! 
939
940 Fixed an array boundary overrun case which cropped up in
941 ext2fs_badblocks_list_test when a user tried running "mke2fs -c 
942 -b 4096".
943
944 Adjusted the number of columns printed by mke2fs when displaying the
945 superblock backups to avoid running over 80 columns when making a
946 really big filesystem.
947
948 Fixed up the man pages for e2fsck, debugfs, badblocks, chattr,
949 dumpe2fs, fsck, mke2fs, and tune2fs (typos and other minor grammar
950 fixes), thanks to some suggestions from Bill Hawes (whawes@star.net).
951
952 Programmer's notes:
953 -------------------
954
955 Fixed install rule in lib/ss so that ss_err.h is actually getting
956 installed.
957
958 Fixed bug in ext2fs_copy_bitmap; the destination bitmap wasn't getting
959 bassed back to the caller.
960
961 Fixed bug in ext2fs_inode_scan_goto_blockgroup; it had not been
962 setting the current inode number (which meant this function wasn't
963 working at all).
964
965 Fixed bug in ext2fs_resize_generic_bitmap; it had not be zeroing all
966 blocks in the bitmap when increasing the size of the bitmap.
967
968 Changed the initial number of blocks allocated by ext2fs_init_dblist()
969 to be more realistic.
970
971 Added a new function ext2fs_allocate_group_table, which sets up the
972 group descriptor information (and allocates inode and block bitmaps,
973 and inode tables for a particular group).  The function was created by
974 factoring out code form ext2fs_allocate_tables().
975
976 Added a new function ext2fs_move_blocks which takes a bitmap of the
977 blocks to be moved, and moves them to another location on the
978 boardboard.
979
980 Make the unix_io channel's io_channel_flush implementation calls sync()
981 to to flush the kernel buffers to disk.
982
983 Added a new function ext2fs_dblist_count returns the number of
984 directory blocks in dblist.
985
986
987 E2fsprogs 1.10 (April 24, 1997)
988 ===============================
989
990 Mke2fs once again defaults to creating revision #0 filesystems, since
991 people were complaining about breaking compatibility with 1.2 kernels.
992 Warning messages were added to the mke2fs and tune2fs man pages that
993 the sparse superblock option isn't supported by most kernels yet (1.2
994 and 2.0 both don't support parse superblocks.)
995
996 Added new flag to mke2fs, -R <raid options>, which allows the user to
997 tell mke2fs about the RAID configuration of the filesystem.  Currently
998 the only supported raid option is "stride" which specifies the width
999 of the RAID stripe.
1000
1001 Fixed bug in e2fsck where pass1b would bomb out if there were any
1002 blocks marked bad in the inode table.
1003
1004 Fixed rare bug in mke2fs where if the user had a very unlucky number
1005 of blocks in a filesystem (probability less than .002) the resulting
1006 filesystem would be corrupt in the last block group.
1007
1008 Fixed bug where if e2fsck tried to allocate a block to fix a
1009 filesystem corruption problem and the filesystem had no free blocks,
1010 ext2fs_new_block() would loop forever.
1011
1012 The configure script now checks explicitly to see if "-static" works,
1013 since that can't be assumed to be true --- RedHat doesn't install
1014 libc-static by default.
1015
1016 Fixed bug in libext2's block iterator functions where under some
1017 cirmcustances, file with holes would cause the bcount parameter to the
1018 callback function to be incorrect.  This bug didn't affect any of
1019 e2fsprogs programs, but it was discovered by Paul Mackerras, the
1020 author of the PPC boot loader.
1021
1022 Removed use of static variables to store the inode cache in libext2fs.
1023 This caused problems if more than one filesystem was accessed via
1024 libext2fs (static variables in libraries are generally a bad idea).
1025 Again, this didn't affect e2fsprogs programs, but it was discovered by
1026 Paul Mackerras.
1027
1028 Fixed minor bugs and version code drift to assure that e2fsprogs 1.10
1029 will compile cleanly with 1.2.13 kernels (even with a.out shared
1030 libraries!)
1031
1032 Programmer's notes:
1033 -------------------
1034
1035 Added new functions to duplicate an ext2 filesystem handle, and its
1036 associated substructure.  New functions: ext2fs_dup_handle(),
1037 ext2fs_copy_dblist(), ext2fs_badblocks_copy(), ext2fs_copy_bitmap().
1038 Other structures, such as the io_channel and the inode_cache, now have
1039 a ref count so that they only get freed when they are no longer used
1040 by any filesystem handle.  (These functions were added as part of the
1041 development effort for an ext2 resizer).
1042
1043 E2fsprogs 1.09 (April 14, 1997)
1044 ===============================
1045
1046 Fixed bug in mke2fs (really in lib/ext2fs/initialize.c) which was
1047 accidentally introduced in the 1.08 release.  The overhead calculation
1048 was accidentally removed, which caused ext2fs_initialize() to not
1049 notice when the filesystem size needed to be adjusted down because
1050 there wasn't enough space in the last block group.
1051
1052 Fixed bug in version parsing library routine; it was always parsing
1053 the library version string, instead of using the passed-in string.
1054
1055 Clarified chattr man page.
1056
1057 E2fsprogs 1.08 (April 10, 1997)
1058 ===============================
1059
1060 E2fsck 1.07 was very slow when checking very large filesystems with a
1061 lot of files that had hard links (i.e., news spools).  This was fixed
1062 by seriously revamping the icount abstraction.  Added a formal test
1063 suite for the icount abstraction.
1064
1065 Debugfs now has a "-l" option to the "ls" command, which lists the
1066 inode number, permissions, owner, group, size, and name of the files
1067 in the directory.
1068
1069 Fix a bug in e2fsck where when a directory had its blocks moved to
1070 another location during the pass 1b processing, the directory block
1071 list wasn't updated, so pass 2 wouldn't check (and correct) the
1072 correct directory block.
1073
1074 E2fsck will now treat inodes which contain blocks which are claimed by
1075 the filesystem metadata by treating them as multiply claimed blocks.
1076 This way, the data in those blocks can be copied to a new block during
1077 the pass 1b--1d processing.
1078
1079 E2fsck will attempt to determine the correct superblock number and
1080 display it in the diagnostic and warning messages if possible.
1081
1082 Add support for a new (incompatible) feature, "sparse_super".  This
1083 feature reduces the number of blocks which contain copies of backup
1084 superblocks and block group descriptors.  (It is only an incompatible
1085 feature because of a bug in ext2_free_blocks.)  mke2fs and tune2fs now
1086 support a new -s option; e2fsck will recognize filesystems built with
1087 this feature turned on.
1088
1089 E2fsck now checks the library to make sure is the correct version,
1090 using new library functions.  (This helps to diagnose incorrectly
1091 installed e2fsprogs distributions.)
1092
1093 Dumpe2fs now prints more information; its now prints the the
1094 filesystem revision number, the filesystem sparse_super feature (if
1095 present), the block ranges for each block group, and the offset from
1096 the beginning of the block group.
1097
1098 Mke2fs now distributes the inode and block bitmap blok so that the
1099 won't be concentrated in one or two disks in RAID/striping setups.
1100 Also, if the user chooses a 2k or 4k block group, mke2fs will try to
1101 choose the largest blocks per group that be chosen.  (For 2k blocks,
1102 you can have up to 16384 blocks/group; for 4k blocks, you can have up
1103 to 32768 blocks/group.)  Previously mke2fs would not allow
1104 specification of more than 8192 blocks per group, even if you were
1105 using a 2k or 4k block group.
1106
1107 Programmer's notes:
1108 -------------------
1109
1110 Added a new function ext2fs_create_icount2() which takes a "hint"
1111 argument.  This hint argument presets the icount array with the list
1112 of inodes which actually need to be in the icount array.  This really
1113 helps to speed up e2fsck.
1114
1115 Added a new function ext2fs_icount_validate() which checks the rep
1116 invariant for the icount structure.  This is used mostly for testing.
1117
1118 The error mesasage given when a bad inode number is passed to
1119 test_generic_bitmap to reflect EXT2FS_TEST_ERROR (instead of
1120 EXT2FS_UNMARK_ERROR).
1121
1122 Added a new function ext2fs_set_dir_block which sets the block of a
1123 dblist entry, given the directory inode and blockcnt.
1124
1125 Added a new function ext2fs_get_library_version() which returns the
1126 current library version, and ext2fs_parse_version_string() which
1127 returns a version number based on a e2fsprogs version string.
1128
1129 The icount functions will return EINVAL if the passed in inode number
1130 is out of bounds.
1131
1132 E2fsprogs 1.07 (March 9, 1997)
1133 ==============================
1134
1135 E2fsck is now uses much less memory when checking really large
1136 filesystems (or rather, filesystems with a large number of inodes).
1137 Previously a filesystem with 1 million inodes required 4 megabytes of
1138 memory to store inode count statistics; that storage requirement has
1139 now been reduced to roughly half a megabyte.
1140
1141 E2fsck can now properly deal with bad blocks appearing inside the
1142 inode table.  Instead of trying to relocate the inode table (which
1143 often failed because there wasn't enough space), the inodes in the bad
1144 block are marked as in use.
1145
1146 E2fsck will automatically try to use the backup superblocks if the
1147 primary superblocks have a bad magic number or have missing meta-data
1148 blocks (or meta-data blocks which are out of range).
1149
1150 E2fsck's pass 3 has been made more efficient; most noticeable on
1151 filesystems with a very large number of directories.
1152
1153 Completely revamped e2fsck's system of printing problem reports.  It
1154 is now table driven, to make them more easily customizeable and
1155 extendable.  Error messages which can be printed out during preen mode
1156 are now one line long.
1157
1158 Fixed e2fsck's filesystem swapping code so that it won't try to swap
1159 fast symbolic links or deleted files.
1160
1161 Fixed e2fsck core dumping when fixing a filesystem which has no
1162 directories (not even a root directory).
1163
1164 Added a check to e2fsck to make sure that the length of every
1165 directory entry is a multiple of 4 (since the kernel complains if it
1166 isn't).
1167
1168 Added a check to e2fsck to make sure that a directory entry isn't a
1169 link to the root directory, since that isn't allowed.
1170
1171 Added a check to e2fsk to now make sure the '.' and '..' directory
1172 entries are null terminated, since the 2.0 kernel requires it.
1173
1174 Added check to write_bitmaps() to make sure the superblock doesn't get
1175 trashed if the inode or block bitmap is marked as being block zero.
1176
1177 Added checking of the new feature set fields in the superblock, to
1178 avoid dealing with new filesystem features that this package wasn't
1179 set up to handle.
1180
1181 Fixed a fencepost error in ext2fs_new_block() which would occasionally
1182 try to allocate a block beyond the end of a filesystem.
1183
1184 When the UUID library picks a random IEEE 802 address (because it
1185 can't find one from a network card), it sets the multicast bit, to
1186 avoid conflicting with a legitimate IEEE 802 address.
1187
1188 Mke2fs now sets the root directory's owner to be the real uid of the
1189 user running mke2fs.  If the real uid is non-zero, it also sets
1190 the group ownership of the root directory to be the real group-id of
1191 the user running mke2fs.
1192
1193 Mke2fs now has more intelligent error checking when it is given a
1194 non-existent device.
1195
1196 When badblocks is given the -vv option, it now updates the block that
1197 it is currently testing on every block.
1198
1199 Fixed a bug in fsck where it wouldn't modify the PATH envirnoment
1200 currently correctly if PATH wasn't already set.
1201
1202 Shared libraries now built with dependencies.  This allows the shared
1203 library files to be used with dlopen(); it also makes the transition
1204 to libc 6 easier, since ld.so can tell which libc a particular shared
1205 library expects to use.
1206
1207 Programmer's notes:
1208 -------------------
1209
1210 Added new abstraction (defined in dblist.c) for maintaining a list of
1211 blocks which belongs to directories.  This is used in e2fsck and other
1212 programs which need to iterate over all directories.
1213
1214 Added new functions which test to see if a contiguous range of blocks
1215 (or inodes) are available.  (ext2fs_*_bitmap_range).
1216
1217 Added new function (ext2_inode_has_valid_blocks) which returns true if
1218 an inode has valid blocks.  (moved from e2fsck code).
1219
1220 Added new function (ext2fs_allocate_tables) which allocates the
1221 meta-data blocks as part of initializing a filesystem.  (moved from
1222 mke2fs code).
1223
1224 Added a new I/O manager for testing purposes.  It will either allow a
1225 program to intercept I/O requests, or print debugging messages to
1226 trace the activity of a program using the I/O manager.
1227
1228 The badblocks_list functions now store the bad blocks in a sorted
1229 order, and use a binary search to speed up badblocks_list_test.
1230
1231 The inode scan function ext2fs_get_next_inode() may now return a soft
1232 error returns: MISSING_INODE_TABLE and BAD_BLOCK_IN_INODE_TABLE in
1233 those cases where part of an inode table is missing or there is a bad
1234 block in the inode table.  
1235
1236 Added a new function (ext2fs_block_iterate2) which adds new arguments to
1237 the callback function to return a pointer (block and offset) to the
1238 reference of the block.
1239
1240 Added new function (ext2fs_inode_scan_goto_blockgroup) which allows an
1241 application to jump to a particular block group while doing an inode
1242 scan.
1243
1244 The badblocks list functions were renamed from badblocks_* to
1245 ext2fs_badblocks_*.  Backwards compatibility functions are available
1246 for now, but programs should be modified to use the new interface.
1247
1248 Some of the library functions were reorganized into separate files to
1249 reduce the size of some programs which statically link against the
1250 ext2 library.
1251
1252 Put in some miscellaneous fixes for the Alpha platform.
1253
1254
1255 E2fsprogs 1.06 (October 7, 1996)
1256 ================================
1257
1258 Fixed serious bug in e2fsck: if the block descriptors are bad, don't
1259 smash the backup copies in ext2fs_close().  (The problem was that when
1260 e2fsck -p discovered the problem, while it was closing the filesystem
1261 and exiting, it was also blowing away the backup superblocks on the
1262 disk, which was less than friendly.)  We now make it the case that we
1263 only write out the backup superblock and the back block descriptors if
1264 the filesystem is completely free from problems.
1265
1266 Fixed a bug in block_interate in the lib/ext2fs library which caused
1267 e2fsck to fail on GNU Hurd-created filesystems.
1268
1269 Add support for Linux/FT's bootloader, which actually uses
1270 EXT2_BOOT_LOADER, and sets its mode bits which caused e2fsck to want
1271 to clear the inode.
1272
1273 Add support for the "A" (no atime update) attribute.  (Note: this
1274 attribute is not yet in production kernels.)
1275
1276 The test suite is not automatically run when doing a "make all" from
1277 the top level directory.  Users should manually run "make check" if
1278 they wish to run the test suite.
1279
1280 Upon a preenhalt(), make the printed message more explicit that
1281 running e2fsck "MANAULLY" means without the -p or -a options.
1282
1283 In e2fsck, if a disconnected inode is zero-length, offer to clear it
1284 instead of offering to connect it to lost+found.
1285
1286 In e2fsck, if a filesystem was just unmounted uncleanly, and needs
1287 e2fsck to be run over it, change e2fsck to explicitly display this
1288 fact.
1289
1290 For dumpe2fs and e2fsck, cause the -V option to print out which
1291 version of the ext2fs library is actually getting used.  (This will
1292 help detect mismatches of using a 1.06 utility with a 1.05 library,
1293 etc.)
1294
1295 Programmers' notes:
1296 -------------------
1297
1298 EXT2_SWAP_BYTES was changed to EXT2_FLAG_SWAP_BYTES, which better fits
1299 the naming convention.
1300
1301 In ext2fs_initialize(), make sure the description for the inode bitmap
1302 is correctly initialize.
1303
1304 Fixed minor type typo in ext2fs_allocate_generic_bitmap();
1305
1306 E2fsprogs 1.05 (September 7, 1996)
1307 ==================================
1308
1309 Add support for new fields in the ext2 superblock --- volume name,
1310 volume UUID, and last mounted field.  Dumpe2fs displays these fields,
1311 tune2fs and mke2fs allows you to set them.  E2fsck will automatically
1312 generate a UUID for those volumes that don't have them.  
1313
1314 Put in support for e2fsck to recognize HURD specific ext2 features ---
1315 most notably, the translator block.  The e2fsprogs tools will now use
1316 the creator_os field in the superblock to correctly handle different
1317 OS-specific variants of the ext2 filesystem.
1318
1319 E2fsck now fixes inodes which have a the deletion time set, but which
1320 have a non-zero i_link_count field by offering to clear the deletion
1321 time.  Previously e2fsck assumed that the inode was deleted (per 0.3c
1322 ext2 kernel behavior) and offered to unlink the file.
1323
1324 If e2fsck sets the clean bit, but nothing else, set the exit code
1325 FSCK_NONDESTRUCT.  After all, e2fsck did fix a filesystem error --- it
1326 set the filesystem valid bit when it was previously cleared.  :-) This
1327 was needed to make the HURD fsck driver happy.
1328
1329 If the  user  refuses to attach an  unattached  inode, e2fsck  will no
1330 longer set the inode's link count.  Otherwise, the  inode would end up
1331 getting marked as unused, which might cause loss of data later.
1332
1333 Make the message issued by e2fsck when the superblock is corrupt less
1334 confusing for users.  It now mentions that another reason for the
1335 "corrupt superblock" message might be that the partition might not be
1336 an ext2 filesystem at all (it might swap, msdos filesystem, ufs, etc.)
1337
1338 Make the libext2 library more robuest so that e2fsck won't coredump on
1339 an illegal superblock where the blocksize is zero.  (f_crashdisk is
1340 the test case).
1341
1342 By default, create filesystems where the default checkinterval is 6
1343 months (180 days).  Linux servers can be robust enough that 20 reboots
1344 can be a long, long time.
1345
1346 Added configure flag --enable-old-bitops, which forces the bitops to
1347 use the old (native) bitmask operations.  By default on the sparc
1348 platform, the standard ext2 bit ordering is now used.
1349
1350 Added a new feature to e2fsck to byte-swap filesystems; this can be
1351 used to convert old m68k filesystems to use the standard byte-order
1352 storage for the superblock, inodes, and directory blocks.  This
1353 function is invoked by using the '-s' option to e2fsck.
1354
1355 Debugfs's "dump" command has been enhanced so that it writes out the
1356 exact size of the file so that the nulls at the end of the file are
1357 eliminated.  The command also accept a new "-p" option which will
1358 attempt preserve to preserve the ownernship, permissions, and
1359 file modification/access times.
1360
1361 Debugfs has two new options, -f and -R.  The -R option allows the user
1362 to execute a single debugfs command from the command line.  The -f
1363 option allows the user to specify a "command file" containing debugfs
1364 commands which will get executed.
1365
1366 Dumpe2fs now pretty prints the check interval, instead of just
1367 printing the check interval as a number of seconds.
1368
1369 Fix bugs in debugfs: the params command when no filesystem is opened
1370 no longer causes a core dump.  It is now possible to unlink a file
1371 when a pathame containing a '/' is specified.
1372
1373 Tune2fs has a new -C option which sets the number of times the
1374 filesystem has been mounted.
1375
1376 Fix the chattr '-v' option so that it actually works.  Chattr was
1377 being buggy about the -v option parsing.
1378
1379 Programmers' notes:
1380 -------------------
1381
1382 The directory lib/uuid contains a set of library routines to generate
1383 DCE compatible UUIDs.  
1384
1385 Extended ext2fs_namei() to handle symbolic links.  Added new function
1386 ext2fs_nami_follow() which will follow last symbolic link in the case
1387 where the pathname points to a sym link.
1388
1389 The ext2fs_block_iterate function will now return the HURD translator
1390 block, if present.  The new flag BLOCK_FLAG_DATA_ONLY will cause the
1391 iterator to return data blocks only.  The ext2fs.h file now defines
1392 constants BLOCK_COUNT_IND, BLOCK_COUNT_DIND, BLOCK_COUNT_TIND, and
1393 BLOCK_COUNT_TRANSLATOR, which are the magic values passed in the block
1394 count field of the iterator callback function.
1395
1396 The test script driver now takes an optional second argument, which is
1397 the test case to be run.  This allows you to run a test case without
1398 needing to run the entire test suite.
1399
1400 On Linux ELF systems, install the .so files in the correct places
1401 (/usr/lib).  The .so files must be stored in the same directory as the
1402 .a files.
1403
1404 Fixed miscellaneous HURD compilation issues with header file being
1405 included in the right order.
1406
1407 Fixed debugfs so that it resets optind to zero, not one, since setting
1408 optind to zero is more correct.
1409
1410
1411 E2fsprogs 1.04 (May 16, 1996)
1412 =============================
1413
1414 First "official" (1.03 was a limited release only) to support building
1415 e2fsprogs under Linux 2.0 kernels (as well as late model 1.3 and 1.99
1416 kernels).
1417
1418 This package includes a RPM specs file, that it can be built using the
1419 RedHat Package Manager.
1420
1421 E2fsck now prints a hint that if there are lots of incorrectly located
1422 inode bitmaps, block bitmaps, and inode table blocks, the user might
1423 want to try using e2fsck -b 8193 first, to see if that fares any
1424 better.
1425
1426 For ext2 filesystem written with the hurd, debugfs will now print out
1427 the translator field when printing an inode structure.
1428
1429 Lots of miscellaneous linking/installation cleanups:
1430
1431   Libraries are now linked using a relative pathname, instead of
1432   relying on -L working correct.  It doesn't, in many cases, including
1433   current versions of GNU ld.  This guarantees that the build tree is
1434   linking with the right libraries, instead of the ones installed in
1435   /usr/lib.
1436
1437   Header files, man pages, and the et/ss shell scripts are now
1438   generated using a custom substitution script, instead of relying on
1439   the configure script.  This prevents needless recompilation of
1440   files; in addition, the custom substitution script is much faster.
1441
1442   e2fsck may now be linked dynamically, by using the
1443   --enable-dynamic-e2fsck flag to configure.  This is not recommended,
1444   since it increases e2fsck's dependence on other files, but some
1445   people need to save disk space, and other critical programs on their
1446   systems were being linked dynamically anyway.
1447
1448   Programs such as fsck which didn't need to be linked against
1449   libext2fs (or mke2fs which didn't need to be linked against libe2p)
1450   only link against libraries they actually need.  Otherwise, those
1451   programs would require the presense of libraries that otherwise
1452   could be removed from a rescuse diskette.
1453
1454   The ss include files are now installed correctly so they can
1455   actually be used by another package.
1456
1457   If the profiling libraries are built, they are now installed on a
1458   "make install-libs".
1459
1460
1461 E2fsprogs 1.03 (March 27, 1996)
1462 ===============================
1463
1464 Change the m68k bit numbering for bitmasks to match the bit numbering
1465 used by all other ext2 implementations.  (This change was requested by
1466 the m68k kernel development team.)
1467
1468 Support (in-development) filesystem format revision which supports
1469 (among other things) dynamically sized inodes.
1470
1471 Fixed a bug in the ext2 library so that an intelligent error is
1472 returned if mke2fs is run with a ridiculously small number of blocks
1473 for a partition.
1474
1475 Fixed a bug in the ext2 library which required that the device be
1476 openable in read/write mode in order to determine its size.  This
1477 caused e2fsck -n to require read/write access when it was not
1478 previously necessary.
1479
1480 Fixed a bug in e2fsck which casued it to occasionally fail the test
1481 suite depending on which version of the floating point library it was
1482 using.
1483
1484 Fixed a bug in e2fsck so that it now halts with a fatal error when
1485 certain superblock consistency checks fail.  Previously it continued
1486 running e2fsck, with some potential confusing/damaging consequences.
1487
1488 Added new flag to fsck which allows the root to be checked in parallel
1489 with other filesytems.  This is not the safest thing in the world to
1490 do, but some system administrators really wanted it.
1491
1492 Fixed -Wall flames in lib/ss.
1493
1494
1495 E2fsprogs 1.02 (January 16, 1996)
1496 =================================
1497
1498 Fix to allow e2fsprogs to be compiled on recent 1.3 (pl45+) kernels.
1499
1500 Change e2fsck to print statistics of how many non-contiguous files are
1501 on the system.  Note that a file which is larger than 8k blocks, it is
1502 guaranteed to be non-contiguous.
1503
1504 In mke2fs, print a warning message if a user tries to format a whole
1505 disk (/dev/hda versus /dev/hda1).  If a user really wants to format a
1506 whole disk, the -F (force) option forces mke2fs to format a whole disk
1507 as a filesytem.
1508
1509 Fix a bug in fsck where in some cases it might start checking
1510 partitions in the next pass before it finishes checking partitions in
1511 the current pass.  This still won't cause two partitions on the same
1512 disk will be checked, so it's rarely a problem in real life.
1513
1514 Patch lsattr so that it won't hang when checking a named pipe.
1515
1516 Minor compilation fixes:
1517         * Fix the order of libraries that were linked in debugfs.
1518         * Allow the sources to be compiled with -ansi turned on.