Whamcloud - gitweb
Fix e2fsck to set the filetype of '..' when connecting a dir, to lost+found
[tools/e2fsprogs.git] / e2fsck / ChangeLog
1 2007-03-31  Theodore Tso  <tytso@mit.edu>
2
3         * pass3.c (fix_dotdot_proc): Fix the filetype of the '..' entry to
4                 be EXT2_FT_DIR.  (Addresses Lustre BZ #11645)
5
6         * pass1.c (e2fsck_pass1_check_device_inode): Don't assume that a
7                 special device is bogus just because i_blocks is non-zero.
8                 The i_blocks field could get adjusted later, and if this
9                 happens it will confuse the e2fsck_process_bad_inode() in
10                 pass 2.  In practice true garbage inodes will have random
11                 non-zero values in i_blocks[4..15], so there's no point
12                 doing the check for an illegal i_blocks value.
13
14 2007-03-28  Theodore Tso  <tytso@mit.edu>
15
16         * pass1.c (e2fsck_pass1, check_ext_attr), 
17                 pass5.c (check_block_bitmaps, check_inode_bitmaps),
18                 pass4.c (e2fsck_pass4), swapfs.c (swap_inodes), 
19                 journal.c (e2fsck_get_journal), 
20                 unix.c (parse_extended_opts): Fix memory leaks
21
22 2007-03-21  Theodore Tso  <tytso@mit.edu>
23
24         * profile.c (profile_open_file): Fix memory leak if malloc() fails
25                 while setting up the profile data structure.
26
27 2007-03-19  Theodore Tso  <tytso@mit.edu>
28
29         * pass3.c (check_directory): Add error check in case
30                 e2fsck_get_dir_info() returns NULL.  Also fix another
31                 error check for e2fsck_get_dir_info() to display the
32                 correct inode number in case of this internal (should
33                 never happen) error.
34
35         * pass1b.c (clone_file): Fix a coverity-found bug; add error
36                 checking in case dict_lookup() returns NULL when looking up
37                 an block or inode record after cloning the EA block.
38
39         * profile.c (profile_init, get_dirlist): Fix bug where if a
40                 profile directory is completely empty, the profile library
41                 would segfault.
42
43 2006-12-22  Theodore Tso  <tytso@mit.edu>
44
45         * unix.c (PRS, main): Use the new {add,remove}_error_table comerr
46                 interfaces instead of initialize_*_error_table.
47
48 2006-11-14  Theodore Tso  <tytso@mit.edu>
49
50         * unix.c (PRS): Always allocate the replacement PATH environment
51                 passed to putenv() to avoid gcc -Wall warning.
52
53         * pass1.c, pass2.c, profile.c, super.c: Remove unused variables
54                 and fixed signed vs unsigned and const gcc -Wall warning.
55
56         * message.c (expand_inode_expression): Fix const gcc -Wall warning.
57
58         * journal.c (e2fsck_fix_ext3_journal_hint): Remove unusued
59                 variables retval and problem.
60
61 2006-11-11  Theodore Tso  <tytso@mit.edu>
62
63         * super.c (e2fsck_fix_dirhash_hint, check_super_block): If neither
64                 the signed or unsigned dirhash hint, set it based on
65                 default signed vs. unsigned character type in use by the
66                 platform.
67
68         * problem.c, problem.h (PR_0_DIRHASH_HINT): Add new problem code.
69
70         * pass2.c (check_dir_block), rehash.c (fill_dir_block): Check the
71                 superblock flags to determine whether to use the signed or
72                 unsigned version of the hash should be used.
73
74         * problem.c, problem.h (PR_2_BLOCKS_HI_ZERO): Add new problem code.
75
76         * pass1.c (e2fsck_pass1), pass2.c (e2fsck_process_bad_inode):
77                 Replace check for l_i_frag and l_i_fsize with one for
78                 i_blocks_hi.
79
80 2006-11-08  Theodore Tso  <tytso@mit.edu>
81
82         * badblocks.c (read_bad_blocks_file): Change the last_block
83                 argument passed to the badblocks program to be consistent
84                 with the change to badblocks.
85
86 2006-10-21  Theodore Tso  <tytso@mit.edu>
87
88         * pass2.c (parse_int_node): Don't core dump if there is a corrupt
89                 htree interior node.  If the block number is larger than
90                 the number of blocks in the directory, don't write past
91                 the end of malloc'ed memory.  (Addresses SourceForge Bug:
92                 #1512778)
93
94 2006-10-02  Theodore Tso  <tytso@mit.edu>
95
96         * e2fsck.conf.5.in: Minor correction to man page.
97                 (Addresses Debian bug #369761)
98
99 2006-10-01  Theodore Tso  <tytso@mit.edu>
100
101         * Makefile.in (DEPLIBBLKID): Use DEPLIBBLKID not LIBBLKID to
102                 define the dependencies used by the blkid library.
103
104 2006-08-30  Eric Sandeen <esandeen@redhat.com>
105
106         * pass1.c (handle_bad_fs_blocks): use blk_t, not int for first_block.
107
108 2006-08-30  Eric Sandeen <esandeen@redhat.com>
109
110         * unix.c (show_stats): use ext2_ino_t for inode containers.
111
112 2006-08-30  Eric Sandeen <esandeen@redhat.com>
113
114         * pass1.c (new_table_block, handle_fs_bad_blocks):
115         * super.c (check_super_block):
116                 Use new inlines to calculate group first & last blocks.
117
118 2006-08-30  Eric Sandeen <esandeen@redhat.com>
119
120         * e2fsck.h (e2fsck): Use unsigned types for filesystem counters.
121         * emptydir.c (add_empty_dirblock):
122         * iscan.c (main):
123         * unix.c (show_stats, check_if_skip): Fix printf formats.
124
125 2006-08-30  Eric Sandeen <esandeen@redhat.com>
126
127         * pass1.c (handle_fs_bad_blocks): Remove unused variables.
128
129 2006-08-30  Eric Sandeen <esandeen@redhat.com>
130
131         * pass1b.c (check_if_fs_block): Change block group loop to use 
132                 a common pattern of first_block/last_block, etc.
133         
134         * super.c (check_super_block): Avoid overflows when iterating over
135                 group descriptors on very large filesystems
136
137 2006-08-30  Theodore Tso  <tytso@mit.edu>
138
139         * pass5.c (check_inode_bitmaps, check_inode_end, check_block_end):
140         * pass4.c (e2fsck_pass4): Fix potential overflow problems when the
141                 number of blocks is close to 2**31.
142
143 2006-08-29  Theodore Tso  <tytso@mit.edu>
144
145         * super.c (release_inode_blocks): Fix silly spelling error.
146                 (Addresses SourceForge Bug: #1531372)
147
148 2006-05-29  Theodore Tso  <tytso@mit.edu>
149
150         * pass1b.c: Add missing semicolon when HAVE_INTPTR_T is not defined
151
152 2006-05-22  Theodore Tso  <tytso@mit.edu>
153
154         * e2fsck.8.in: Fixed spelling mistake.  (Addresses Debian Bug:
155                 #368392)
156
157 2006-05-14  Theodore Tso  <tytso@mit.edu>
158
159         * recovery.c (do_one_pass), journal.c (e2fsck_get_journal): Add
160                 missing brelse() calls to avoid memory leaks in error
161                 paths.  (Thanks to Michael C. Thompson for pointing these
162                 out; they were originally found using Coverity.)
163
164 2006-05-13  Theodore Tso  <tytso@mit.edu>
165
166         * badblocks.c (read_bad_blocks_file): Pass the private option -X
167                 to badblocks so that e2fsck -cc will work correctly.
168
169 2006-05-08  Theodore Tso  <tytso@mit.edu>
170
171         * pass5.c (check_block_bitmaps, check_inode_bitmaps): Add support
172                 for the lazy_bg feature; if the block group does not have
173                 an initialized block or inode bitmaps/table, emulate what
174                 the allocation bitmap would look like if no blocks or
175                 inodes have been allocated.
176
177 2006-03-27  Theodore Ts'o  <tytso@mit.edu>
178
179         * e2fsck.8.in: Add badblocks(8) to the See Also section.
180                 (Addresses Debian Bug: #347295)
181
182         * Makefile.in, e2fsck.conf.5.in: Add man page documenting the
183                 configuration file /etc/e2fsck.conf.
184
185 2006-03-22  Theodore Ts'o  <tytso@mit.edu>
186
187         * profile.c (profile_update_file, profile_parse_file, parse_line,
188                 parse_std_line): Integrate profile_std_line() into
189                 parse_line(), and profile_parse_file() into
190                 profile_update_file() to make the code tighter.
191
192 2006-03-18  Theodore Ts'o  <tytso@mit.edu>
193
194         * unix.c (show_stats): Use blk_t instead of int when referring to
195                 block numbers.
196
197         * emptydir.c, message.c, pass1b.c, pass2.c, recovery.c, unix.c:
198                 Change printf statements to use %u instead of %d when
199                 printing block numbers.
200
201         * unix.c (main): If the filesystem is not mounted, open the
202                 filesystem in exclusive mode (to prevent 2.6 kernels from
203                 mounting the filesystem while it is being checked).
204
205 2006-03-10  Theodore Ts'o  <tytso@mit.edu>
206
207         * e2fsck.h, journal.c (e2fsck_fix_ext3_journal_hint), 
208                 problem.c (PR_0_EXTERNAL_JOURNAL_HINT), 
209                 problem.h (PR_0_EXTERNAL_JOURNAL_HINT), super.c: Check
210                 to see if the superblock hint for the external journal
211                 needs to be updated, and if so, offer to update it.
212                 (Addresses Debian Bug: #355644)
213
214 2006-01-29  Theodore Ts'o  <tytso@mit.edu>
215
216         * unix.c (check_if_skip): When skipping a check due to being on
217                 battery, print an explanatory message to this effect.  Add
218                 an e2fsck configuration option defer_check_on_battery
219                 which defaults to true.  If the configuration option is
220                 turned off, then e2fsck will not attempt to defer
221                 filesystem checks when the system is running on battery.
222                 (Addresses Debain Bug: #350306)
223
224 2006-01-06  Theodore Ts'o  <tytso@mit.edu>
225
226         * profile.c (parse_std_line, dump_profile): Add support for
227                 quoted strings in tag and section names.  Changed
228                 top-level section name parsing to ignore leading and
229                 trailing whitespace.
230
231 2006-01-05  Theodore Ts'o  <tytso@mit.edu>
232
233         * profile.c (profile_init): If a directory is passed to
234                 profile_init, then read all files which match [0-9a-zA-Z]*
235                 in sort order.  This allows handling of /etc/foo/conf.d
236                 style directories.
237
238 2006-01-04  Theodore Ts'o  <tytso@mit.edu>
239
240         * profile.c: Eliminate the prf_data_t data structure and fold it
241                 back into prof_file_t.  Eschew needless complexity!
242
243         * profile.c: Change syntax accepted by the profile parser.  The
244                 value of profile relations must not contain spaces unless
245                 it is quoted; otherwise the parser will throw an error.
246                 Comments are allowed anywhere and can be started with
247                 either a ';' or a '#' character.  The only place where
248                 comments will not be intepreted as beginning a comment is
249                 in a quoted string.
250
251         * profile.c (profile_parse_file, profile_set_syntax_err_cb): Add
252                 support for a syntax error callback to allow better error
253                 reporting to the user.
254
255         * e2fsck(PRS): Set a profile syntax error callback so we can
256                 report errors in /etc/e2fsck.conf.
257
258 2006-01-02  Theodore Ts'o  <tytso@mit.edu>
259
260         * profile.c, profile_helpers.c, profile_helpers.h: Boil down and
261                 simplify profile.c, and move extra functionality that's
262                 not needed into profile_helpers.c
263
264 2006-01-01  Theodore Ts'o  <tytso@mit.edu>
265
266         * profile.c: Fix #include of com_err.h so that it isn't required
267                 that the com_err development environment be installed.
268                 (Addresses Debian Bug: #345519)
269
270 2005-12-31  Theodore Ts'o  <tytso@mit.edu>
271
272         * problem.c (fix_problem), problemP.h: Add the ability for the
273                 e2fsck configuration file to override the behaviour of
274                 e2fsck when a particular filesystem problem is
275                 encountered.  This allows reconnecting an inode to
276                 lost+found to not stop the boot sequence, if a system
277                 administrator really badly wants this behaviour for some
278                 specialized reason, for example.
279
280         * unix.c (main): If the e2fsck configuration file sets the
281                 allow_cancellation option to be true, then if the
282                 filesystem does not have any known problems, and was known
283                 to be cleanly unmounted, then let e2fsck exit with a
284                 status code of 0 instead of 32 (FSCK_CANCELED) so that the
285                 bootup scripts will continue without stopping the boot.
286                 (Addresses Debian Bug: #150295)
287
288 2005-12-30  Theodore Ts'o  <tytso@mit.edu>
289
290         * e2fsck.c (e2fsck_free_context), unix.c (PRS), e2fsck.h: Use
291                 the profile library to read in the /etc/e2fsck.conf file
292                 at startup.     
293
294         * profile.c, profile.h, prof_err.et: Add the profile library code
295                 to e2fsck.  The profile library was originally written by
296                 Theodore Ts'o in 1995 for use in the MIT Kerberos v5
297                 library.  It has been modified/enhanced/bug-fixed over
298                 time by other members of the MIT Kerberos team.  This
299                 version was originally taken from the Kerberos v5
300                 distribution, version 1.4.2, and radically simplified for
301                 use in e2fsprogs.  (Support for locking for multi-threaded
302                 operations, being able to modify and update the
303                 configuration file programmatically, and Mac/Windows
304                 portability have been removed.  It has been folded into a
305                 single C source file to make it easier to fold into an
306                 application program.)
307
308         * argv_parse.c, argv_parse.h: Added auxiliary programs used only
309                 for building the profile test program.
310
311 2005-12-18  Theodore Ts'o  <tytso@mit.edu>
312
313         * problem.c (PR_0_FUTURE_SB_LAST_MOUNT,
314                 PR_0_FUTURE_SB_LAST_WRITE): Make these problems things
315                 which can be fixd by preen, since Debian's boot sequence
316                 bogusly doesn't set the time correctly until potentially
317                 very late in the bootup process, and this can cause false
318                 positives that will cause users' systems to fail to
319                 booting.  (Addresses Debian Bugs #343662 and #343645)
320
321 2005-12-09  Theodore Ts'o  <tytso@mit.edu>
322
323         * e2fsck.8.in: Clarify that e2fsck -c does a read-only scan of the
324                 device.
325
326         * unix.c (PRS): Fix typo in error message; thanks to Solar
327                 Designer for pointing out the missing preposition.
328                 (check_mount): Don't let the user run e2fsck -ccn on the
329                 root partition, without warning that he or she might
330                 be doing something Really Stupid.
331
332         * e2fsck.8.in: Clarify description of differences between the -p,
333                 -n, and -y options.
334
335 2005-09-24  Theodore Ts'o  <tytso@mit.edu>
336
337         * super.c (check_super_block), problem.c, problem.h: Detect if the
338                 superblock's last mount field or last write field is in
339                 the future, and offer to fix if so.  (Addresses Debian Bug
340                 #327580)
341
342 2005-07-25  Theodore Ts'o  <tytso@mit.edu>
343
344         * unix.c (main): Fix a use-after-free bug of the e2fsck context
345                 structure at the very end of the e2fsck run.
346
347         * pass1.c (pass1_write_inode): Fix false positive from valgrind;
348                 don't do a needless structure copy via an assignment when
349                 it is a no-op.
350
351 2005-07-04  Theodore Ts'o  <tytso@mit.edu>
352
353         * problem.c: Remove period from the Pass 1C header, to be
354                 consistent with the other Pass headers.
355
356         * pass2.c (e2fsck_process_bad_inode): Fixed bug which could cause
357                 e2fsck to core dump if a disconnected inode contained an
358                 extended attribute.  This was actually caused by two bugs.
359                 The first bug is that if the inode has been fully fixed
360                 up, the code will attempt to remove the inode from the
361                 inode_bad_map without checking to see if this bitmap is
362                 present.  Since it is cleared at the end of pass 2, if
363                 e2fsck_process_bad_inode is called in pass 4 (as it is for
364                 disconnected inodes), this would result in a core dump.
365                 This bug was mostly hidden by a second bug, which caused
366                 e2fsck_process_bad_inode() to consider all inodes without
367                 an extended attribute to be not fixed.  (Addresses Debian
368                 Bug: #316736)
369
370 2006-06-30  Theodore Ts'o  <tytso@mit.edu>
371
372         * Release of E2fsprogs 1.38
373
374 2005-06-20  Theodore Ts'o  <tytso@mit.edu>
375
376         * unix.c (usage, parse_extended_opts): Clean up messages printed
377                 by e2fsck for grammar and consistency.
378
379 2005-06-19  Theodore Ts'o  <tytso@mit.edu>
380
381         * e2fsck.8.in: Make it clear that the -c, -l, and -L options are
382                 never safe to use on a mounted filesystem, and in general,
383                 running e2fsck on mounted filesystems is a bad idea.
384
385 2005-06-16  Theodore Ts'o  <tytso@mit.edu>
386
387         * message.c: Add @m (multiply-claimed) and @n (invalid)
388                 expansions.
389
390         * problem.c: Clean up the problem messages displayed by e2fsck,
391                 mostly based on suggestions from Benno Schulenberg.
392
393 2005-06-05  Theodore Ts'o  <tytso@mit.edu>
394
395         * e2fsck.8.in: Add a request to the REPORTING BUGS section of the
396                 man page to make sure that e2fsck's messages are printed
397                 in English, and to send a raw e2image filesystem dump if
398                 possible.
399
400 2005-05-05  Theodore Ts'o  <tytso@mit.edu>
401
402         * badblocks.c (check_bb_inode_blocks): Clean up warning printf.
403                 Thanks to Benno Schulenberg for the patch.  (Addresses
404                 Sourceforge Bug: #1189803)
405
406 2005-04-16  Theodore Ts'o  <tytso@mit.edu>
407
408         * e2fsck.8.in: Fix spelling mistakes in man pages.  (Addresses
409                 Debian Bugs: #304593)
410
411 2005-04-14  Theodore Ts'o  <tytso@mit.edu>
412
413         * pass1b.c (pass1d): Don't offer to clone or delete the resize
414                 inode; it's not allowed!
415
416         * e2fsck.c, e2fsck.h, journal.c, pass1.c, pass1b.c, pass2.c,
417                 pass3.c, pass4.c, super.c, unix.c: Use a centrally stored
418                 current time for "now" which can be overridden using the
419                 E2FSCK_TIME environment variable, for better
420                 reproducibility for regression tests.
421
422 2005-04-06  Theodore Ts'o  <tytso@mit.edu>
423
424         * pass1.c (e2fsck_pass1): If the superblock last mount time (not
425                 just the last write time) looks insane, then assume that
426                 we can't do the LOW_DTIME checks.
427
428 2005-03-21  Theodore Ts'o  <tytso@mit.edu>
429
430         * Release of E2fsprogs 1.37
431
432 2005-03-21  Theodore Ts'o  <tytso@mit.edu>
433
434         * message.c, pass1.c, problem.c, problem.h, util.c: Integrate code
435                 from Alex Thomas at Clusterfs to check extended attributes
436                 stored in inodes.
437
438         * message.c (expand_inode_expression): Add support for %IS in
439                 problem descriptions.  Note that this only works if the
440                 problem context has a pointer to a large inode!
441
442         * problem.h, problem.c (PR_1_EXTRA_ISIZE, PR_1_ATTR_NAME_LEN,
443                 PR_1_ATTR_VALUE_OFFSET, PR_1_ATTR_VALUE_BLOCK,
444                 PR_1_ATTR_VALUE_SIZE, PR_1_ATTR_HASH): Add new problem
445                 codes.
446
447         * util.c (e2fsck_write_inode_full): New function.
448
449         * pass1.c (check_ea_in_inode, check_inode_extra_space): New
450                 function which tests the validity of extended attributes
451                 stored in a large inode.
452                 (e2fsck_pass1): Call ext2fs_get_next_inode_full() instead
453                 of get_next_inode(), and use an allocated inode which is
454                 big enough to store extra portion of large inodes.
455
456 2005-03-20  Theodore Ts'o  <tytso@mit.edu>
457
458         * super.c (check_super_block): Add sanity checks for the
459                 superblock's inode_size field.
460
461         * pass3.c (check_root, e2fsck_get_lost_and_found): Call
462                 ext2fs_write_new_inode() instead of ext2fs_write_inode().
463
464         * pass1.c (check_blocks): Move counting the extended attribute
465                 block earlier so that we don't have to worry about
466                 num_blocks wrapping for files which are too big.
467
468 2006-02-05  Theodore Ts'o  <tytso@mit.edu>
469
470         * Release of E2fsprogs 1.36
471
472 2005-02-04  Theodore Ts'o  <tytso@mit.edu>
473
474         * pass2.c (e2fsck_pass2), problem.c (PR_2_HTREE_FCLR), problem.h
475                 (PR_2_HTREE_FCLR): Remove support for
476                 --enable-clear-htree; this was only needed during the
477                 early development of the htree patch.
478
479 2005-01-28  Theodore Ts'o  <tytso@mit.edu>
480
481         * pass2.c (e2fsck_process_bad_inode): Fix a corner case involving
482                 big-endian systems, long symlinks and i_file_acl set when
483                 it shouldn't be.  Without this bugfix, f_clear_xattr will
484                 fail on big-endian machines.
485
486         * super.c (check_resize_inode): Deal with the case where the
487                 resize inode can't be read; don't try to recreate the
488                 resize inode unless the resize feature is actually
489                 enabled.
490
491 2005-01-27  Theodore Ts'o  <tytso@mit.edu>
492
493         * super.c (check_resize_inode): If the resize inode has a zero
494                 i_links_count or isn't a regular file, consider the resize
495                 inode as invalid, and offer to recreate it.
496
497         * pass2.c (e2fsck_process_bad_inode): Offer to clear i_file_acl
498                 before checking to see if an invalid inode should be
499                 removed, since otherwise the fast symlink detection code
500                 can get confused.  Also clear the inode's entry in
501                 inode_bad_map if the inode has been completely fixed.
502                 (Addresses Red Hat Bugzilla #146284)
503
504 2005-01-25  Theodore Ts'o  <tytso@mit.edu>
505
506         * unix.c (main, check_if_skip): Set the valid flag earlier, and if
507                 it is cleared by the superblock tests, then assume that
508                 the filesystem contains errors and must be checked.
509
510         * super.c (check_super_block): Check the individual block group
511                 inode and block free counts, as well as the filesystem
512                 inode and block free counts.  If any of the block/inode
513                 free counts is too large, force a full filesystem check.
514                 (Addresses Debian Bug: #291571)
515
516 2005-01-19  Theodore Ts'o  <tytso@mit.edu>
517
518         * unix.c (e2fsck_simple_progress): Use fixed integer math
519                 to check to see if we're at 0 or 100%
520                 (is_on_batt): Clean up gcc -Wall warning
521                 (main): Remove dead code
522
523 2005-01-13  Matthias Andree  <matthias.andree@gmx.de>
524
525         * unix.c: Do not call closedir if the handle is zero, to avoid
526                 crashes when the /proc/acpi/ac_adapter directory is
527                 missing, for instance on non-ACPI or non-Linux systems.
528
529 2005-01-09  Theodore Ts'o  <tytso@mit.edu>
530
531         * pass1b.c: As part of converting configure.in from using the
532                 "broken by design" 2.13 version of AC_CHECK_TYPE to
533                 AC_CHECK_TYPES, if intptr_t isn't defined, manually
534                 typedef it to long.  (Addresses Debian Bug #289133)
535
536 2005-01-06  Theodore Ts'o  <tytso@mit.edu>
537
538         * super.c (check_resize_inode): Use ext2fs_{read,write}_ind_block
539                 so that byte swapping is handled on big-endian systems.
540                 (check_super_block): Allow the number of reserved blocks
541                 to be 50% of the number of blocks available, in order to
542                 be consistent to what is allowed by tune2fs.
543
544 2004-12-24  Theodore Ts'o  <tytso@mit.edu>
545
546         * pass1.c (e2fsck_pass1): At the end of the pass 1 processing, if
547                 we have been signalled to do so, recreate the resize inode.
548
549         * super.c (check_resize_inode): New function which checks to make
550                 sure the resize inode is valid.  It is called by
551                 check_super_block().  If it is invalid, it will signal to
552                 pass1.c that the resize inode needs to recreate.
553
554         * e2fsck.h (E2F_FLAG_RESIZE_INODE): New flag
555
556         * problem.c, problem.h (PR_0_RESIZE_INODE_INVALID,
557                 PR_1_RESIZE_INODE_CREATE): Add new problem codes.
558
559 2004-12-23  Theodore Ts'o  <tytso@mit.edu>
560
561         * swapfs.c (swap_inodes): Since swap_inodes bypasses the inode
562                 cache for speed reasons, we must flush it to avoid cache
563                 coherency problems.
564
565 2004-12-16  Theodore Ts'o  <tytso@mit.edu>
566
567         * super.c (check_super_block): If the resize_inode feature is not
568                 set, check to make sure that s_reserved_gdt_blocks is
569                 zero, and that the resize inode is clear.
570
571         * problem.h (PR_0_NONZERO_RESERVED_GDT_BLOCKS,
572                 PR_0_CLEAR_RESIZE_INODE): Add new problem codes.
573
574 2004-12-15  Theodore Ts'o  <tytso@mit.edu>
575
576         * pass1.c (process_block): Applied resize inode patch.  Mark the
577                 DIND block of the resize inode as being in use.
578         
579 2004-12-14  Theodore Ts'o  <tytso@mit.edu>
580
581         * Makefile.in: Move strip command to install-strip target.
582                 Use Linux-kernel-style makefile output for "make install"
583
584         * Makefile.in (installdirs): Use $(MKINSTALLDIRS) macro.
585                 Remove sync in the "all" target.
586
587 2004-11-30  Theodore Ts'o  <tytso@mit.edu>
588
589         * message.c (expand_inode_expression): If the TZ environment
590                 variable is set to GMT, use gmtime() instead of
591                 localtime() or ctime() to force the use of GMT.  This is
592                 because the dietlibc doesn't honor the TZ environment
593                 variable.
594         
595         * e2fsck.h: Add io_options to e2fsck_struct
596
597         * unix.c: If there is a question mark in the device name, separate
598                 out the options to the IO layer, and pass it on to
599                 ext2fs_open2().
600
601         * Makefile.in: Use Linux-kernel-style makefile output to make it
602                 easier to see errors/warnings.
603
604 2004-10-04  Richard Mortimer  <richm@oldelvet.org.uk>
605
606         * journal.c (e2fsck_check_ext3_journal): Attempt recovery of the
607                 filesystem if the journal contains illegal block numbers.
608
609 2004-07-26  Theodore Ts'o  <tytso@mit.edu>
610
611         * pass1.c (process_block): Change the limit of directory size from
612                 32 MB to 2GB.
613
614 2004-05-11  Theodore Ts'o  <tytso@mit.edu>
615
616         * journal.c (sync_blockdev): Flush I/O caches to preserve ordering
617                 constraints required by the journal recovery code.  Thanks
618                 to Junfeng Yang from the Stanford Metacompilation group
619                 for pointing this out.
620
621         * jfs_user.h: Define sync_blockdev() as an emulated function,
622                 instead just being a no-op.
623
624 2004-05-04  Theodore Ts'o  <tytso@mit.edu>
625
626         * unix.c (check_if_skip): If the checkinterval is zero, then
627                 disregard it when calculating when the next check will
628                 take place.
629
630 2004-04-12  Theodore Ts'o  <tytso@mit.edu>
631
632         * unix.c (is_on_batt): Be more flexible about the name of the ACPI
633                 device that corresponds to the AC adapter.  (Addresses
634                 Debian bug #242136)
635
636 2004-04-03  Theodore Ts'o  <tytso@mit.edu>
637
638         * Makefile.in: Update the modtime even if subst doesn't need to
639                 update the e2fsck man page, to avoid always re-running
640                 subst, especially since there are no dependencies on the
641                 man page.
642
643 2004-02-28  Theodore Ts'o  <tytso@mit.edu>
644
645         * Release of E2fsprogs 1.35
646
647 2004-02-24  Theodore Ts'o  <tytso@mit.edu>
648
649         * unix.c (main, PRS), e2fsck.8.in: Add a new -k option which keeps
650                 the existing badblocks list when using the -c option.
651                 (Addresses Debian bug #229103)
652
653 2004-02-23  Theodore Ts'o  <tytso@mit.edu>
654
655         * Makefile.in (PROFILED_LIBS, PROFILED_DEPLIBS): Fix reference to
656                 libblkid so that the build will work with --enable-profile
657                 (Addresses Sourceforge bug #811408)
658
659 2004-02-14  Theodore Ts'o  <tytso@mit.edu>
660
661         * e2fsck.c (e2fsck_run): Clear the SETJMP_OK flag when returning
662                 so we don't double longjump into an invalid stack frame.
663                 (Thanks to Matthias Andree for providing this fix.)
664
665 2004-01-31  Theodore Ts'o  <tytso@mit.edu>
666
667         * problem.c (fix_problem): Don't call print_e2fsck_message if the
668                 message is empty; otherwise, the NLS substitution will
669                 print the .po header, which is Just Wrong.
670
671 2004-01-30  Theodore Ts'o  <tytso@mit.edu>
672
673         * pass2.c (deallocate_inode_block): Check to make sure the block
674                 number is invalid before deallocating it, to avoid core
675                 dumping e2fsck.
676
677 2003-12-12  Theodore Ts'o  <tytso@mit.edu>
678
679         * pass3.c (check_directory): When reconnecting a directory, we may
680                 need to create a lost+found directory.  This may
681                 invalidate our pointer to the directory information, so we
682                 must look it up again after calling
683                 e2fsck_reconnect_file().  (Addresses Debian bug #219640).
684
685 2003-12-10  Theodore Ts'o  <tytso@mit.edu>
686
687         * e2fsck.h (E2F_FLAG_RESTARTED): Assign a unique flag bitfield to
688                 E2F_FLAG_RESTARTED.  This fixes a bug where if the user
689                 specifies an alternate superblock, and the journal needs
690                 to be replayed, e2fsck would erroneously assume that
691                 journal had been run already without clearing the
692                 NEEDS_RECOVERY flag, and bomb out with an error.
693
694 2003-12-07  Theodore Ts'o  <tytso@mit.edu>
695
696         * badblocks.c, dict.c, ea_refcount.c, ehandler.c, journal.c,
697                 pass1.c, pass1b.c, pass2.c, pass3.c, pass5.c, problem.c,
698                 rehash.c, super.c, swapfs.c, unix.c, util.c, e2fsck.h: Fix
699                 gcc -Wall nitpicks.
700
701         * recovery.c, jfs_user.h: Sync recovery.c with latest 2.5 kernel
702                 version.
703
704 2003-12-02  Theodore Ts'o  <tytso@mit.edu>
705
706         * unix.c (main): When testing a disk using e2fsck -c, use the list
707                 of new bad blocks to replace the current list of bad
708                 blocks.  This way "e2fsck -c" can be used to recover from
709                 a corrupted bad block inode.
710
711         * badblocks.c (test_disk): Remove the test_disk() file; e2fsck
712                 will just call read_bad_blocks_file() directly with the
713                 file parameter set to NULL.
714
715 2003-09-14  Theodore Ts'o  <tytso@mit.edu>
716
717         * unix.c (is_on_batt, check_if_skip): If running on battery, then
718                 give an extra grace period before actually forcing a
719                 check.  That way the laptop will be biased to waiting
720                 until we are on AC power before doing the filesystem
721                 check.  (Addresses Debian bug #205177)
722
723 2003-09-13  Theodore Ts'o  <tytso@mit.edu>
724
725         * unix.c (check_if_skip): If the number of mounts until the next
726                 forced filesystem check is 5 or less, mention this to the
727                 user.  (Addresses Debian bug #157194)
728
729         * pass1.c (e2fsck_pass1), problem.h (PR_1_BB_FS_BLOCK), 
730           problem.c (PR_1_BB_FS_BLOCK, PR_1_BBINODE_BAD_METABLOCK_PROMPT): 
731                 Fix up the handling of corrupted indirect blocks in the 
732                 bad block.  We now correctly handle the case where there
733                 is an overlap between a block group descriptor or
734                 a superblock and a bad block indirect block.  In the case
735                 where the indirect block is corrupted, we now suggest
736                 "e2fsck -c".
737         
738 2003-09-12  Theodore Ts'o  <tytso@mit.edu>
739
740         * unix.c (PRS): Check the returned name from blkid_get_devname and
741                 print an error if the requested LABEL/UUID does not exist.
742         
743 2003-09-03  Theodore Ts'o  <tytso@mit.edu>
744
745         * pass1.c (mark_table_blocks): Use the new function
746                 ext2fs_reserve_super_and_bgd to calculate the blocks to be
747                 reserved.
748
749 2003-08-24  Theodore Ts'o  <tytso@mit.edu>
750
751         * util.c (get_backup_sb): Check to make sure the context is passed
752                 in non-NULL before trying to dereference it.  Otherwise we
753                 might core dump when called to expand %S in a problem
754                 description.
755
756         * e2fsck.8.in: Adjust description line so that apropos
757                 "ext2" or "ext3" will find the man page.  (Addresses
758                 Debian Bug #206845)
759
760 2003-08-21  Theodore Ts'o  <tytso@mit.edu>
761
762         * journal.c (e2fsck_move_ext3_journal): When moving the journal or
763                 backing up the journal inode, make sure it gets written to
764                 all the superblocks.
765
766 2003-08-20  Theodore Ts'o  <tytso@mit.edu>
767
768         * journal.c (e2fsck_move_ext3_journal): If the superblock's backup
769                 journal information is not set, copy the journal inode
770                 information to the superblock.
771                 (e2fsck_get_journal): If the journal inode is corrupted,
772                 synthesize one from the backup information in the
773                 superblock.
774
775         * problem.c, problem.h (PR_0_BACKUP_JNL): Add new problem code
776                 which is used when we make a backup of the journal inode.
777
778 2003-08-19  Theodore Ts'o  <tytso@mit.edu>
779
780         * e2fsck.h, unix.c (PRS, e2fsck_clear_progbar, 
781                 e2fsck_simple_progress): Don't print the ^A and ^B
782                 characters which bracket the progress bar when the e2fsck
783                 program is talking directly to a tty, but only when it is
784                 being piped to another program.  (Addresses Debian bug
785                 #204137)
786         * unix.c: Move some initialized variables to the BSS segment to 
787                 shrink the size of the e2fsck executable.
788
789 2003-08-01  Philipp Thomas <pthomas@suse.de>
790
791         * Include inttypes.h if present.  New macros INT_TO_VOIDPTR and
792                 VOIDPTR_TO_INT.  Use them throughout for int<->void *
793                 casts to fix 64-bit warnings.
794
795         * dirinfo.c, dx_dirinfo.c, e2fsck.c, ea_refcount.c, journal.c,
796                 message.c, pass1.c, pass1b.c, pass2.c, pass3.c, pass4.c,
797                 pass5.c, super.c, swapfs.c: ext2fs_getmem(),
798                 ext2fs_free_mem(), and ext2fs_resize_mem() all now take a
799                 'void *' instead of a 'void **' in order to avoid pointer
800                 aliasing problems with GCC 3.x.
801
802 2003-07-25  Theodore Ts'o  <tytso@mit.edu>
803
804         * Release of E2fsprogs 1.34
805
806 2003-07-06  Theodore Ts'o  <tytso@mit.edu>
807
808         * pass2.c: Fix gcc -Wall nitpicks (missing #include <string.h>)
809
810         * dict.c, dict.h: Fix gcc -Wall nitpicks (indented cpp directives)
811
812 2003-06-8  Theodore Ts'o  <tytso@mit.edu>
813
814         * problem.c: Fix spelling error.
815
816 2003-05-17  Theodore Ts'o  <tytso@mit.edu>
817
818         * unix.c (show_stats), e2fsck.h: Use ngettext (abbreivated with
819                 the macro P_(str1, str2, n)) to simplify the statistics
820                 reporting.
821
822 2003-05-05  Theodore Ts'o  <tytso@mit.edu>
823
824         * unix.c (main): If --enable-testio-debug is set, then use the
825                 test_io manager so we can watch what e2fsck is doing.
826
827 2003-05-03  Theodore Ts'o  <tytso@mit.edu>
828
829         * unix.c (show_stats): Remove uneeded use of _() around string
830                 under #ifndef NLS
831
832         * problem.c: Mark two strings (PR_1_RELOC_TO and
833                 PR_2_NON_UNIQUE_FILE) as not being printf format strings.
834                 Fix typo (doubled 'is') in PR_2_FILE_ACL_BAD.
835
836         * Makefile.in: Add $(LIBINTL) to the link line so we can support
837                 using the internal gettext library.
838
839         * e2fsck.h: Add #ifndef protection around LOCALEDIR definition.
840
841 2003-04-27  Theodore Ts'o  <tytso@mit.edu>
842
843         * message.c (expand_at_expression): Fixed NLS support for message
844                 abbreviations. 
845
846 2003-04-21  Theodore Ts'o  <tytso@mit.edu>
847
848         * Release of E2fsprogs 1.33
849
850 2003-04-19  Theodore Ts'o  <tytso@mit.edu>
851
852         * rehash.c: Fix lint warnings by including string.h and ctype.h
853
854         * pass2.c (dict_de_cmp): Fix lint warnings by using const pointers.
855
856         * unix.c (e2fsck_simple_progress), e2fsck.h: Fix lint warnings by
857                 using const pointers.  Remove unused variables.
858         
859 2003-04-17  Theodore Ts'o  <tytso@mit.edu>
860
861         * rehash.c (name_cmp): Sort the deleted inodes to the end of the
862                 list, for portability to systems that whose qsort does not
863                 perform a stable sort.
864
865 2003-04-16  Theodore Ts'o  <tytso@mit.edu>
866
867         * unix.c: Bracket progress bar output with control-A and control-B
868                 characters.  These characters are used as in-band
869                 signalling to allow a logging program to filter out the
870                 progress bar.
871                 (PRS): Use setvbuf instead of setbuf to force stdout and
872                 stderr to be non-buffered when the stdout/stderr are a pipe.
873                 This fixes a cosmetic problem when using e2fsck under
874                 logsave. 
875         
876 2003-04-12  Theodore Ts'o  <tytso@mit.edu>
877
878         * unix.c: Add #ifdef around #include <sys/ioctl.h>
879
880 2003-04-05  Theodore Ts'o  <tytso@mit.edu>
881
882         * super.c (check_super_block): Update the global free block and
883                 inode counters from the block group specific counters
884                 quietly.  This is needed for an experimental patch which
885                 eliminates locking the entire filesystem when allocating
886                 blocks or inodes; if the filesystem is not unmounted
887                 cleanly, the global counts may not be accurate.
888
889 2003-03-17  Theodore Ts'o  <tytso@mit.edu>
890
891         * util.c: Explicitly declare e2fsck_global_ctx as extern for the
892                 benefit of the Apple Darwin port.
893
894 2003-03-15  Theodore Ts'o  <tytso@mit.edu>
895
896         * rehash.c (e2fsck_rehash_dir): If user specified the -n option,
897                 skip trying to write out directory.
898                 (e2fsck_rehash_directories): Fix the percentage
899                 calculation in the progress bar.
900
901 2003-03-14  Theodore Ts'o  <tytso@mit.edu>
902
903         * problem.c, problem.h (PR_2_REPORT_DUP_DIRENT): Add new problem
904                 code. 
905
906         * pass2.c (check_dir_block): Check for duplicate filenames within
907                 a single directory block (because this is the easy case;
908                 we don't currently check for duplicates that span
909                 directory blocks, for now.  Eventually for htree
910                 directories we can do this by searching for all directory
911                 blocks that have a hash overflow, and then searching the
912                 adjacent blocks to find all other potential duplicates.)
913
914         * iscan.c, scantest.c, unix.c: And #ifdef protection around
915                 #include of malloc.h
916
917         * rehash.c (duplicate_search_and_fix): Now search for duplicates
918                 filenames, and either prompt to remove a complete
919                 duplicate entry, or to rename a duplicate filename.
920                 (e2fsck_rehash_dir): Use a progress bar to report
921                 progress, and don't print all of the directory inodes as
922                 they are optimized.
923
924         * problem.c, problem.h (PR_2_DUPLICATE_DIRENT,
925                 PR_2_NON_UNIQUE_FILE):  New problem codes.
926         
927         * unix.c (e2fsck_simple_progress), e2fsck.h: New function which
928                 can be called to provide specialized progress bars that
929                 are not related to the top-level pass-based completion
930                 percentage.
931
932         * pass3.c (e2fsck_adjust_inode_count), e2fsck.h: Export previously
933                 static function.
934
935 2003-03-06    <tytso@mit.edu>
936
937         * e2fsck.8.in: Fix minor nit in the -C option.  (Addresses Debian
938                 bug #173612)
939
940 2003-03-01  Theodore Ts'o  <tytso@mit.edu>
941
942         * Makefile.in, journal.c, unix.c: Use blkid functions to find the
943                 journal from the UUID, and to interpret the device
944                 specification.
945
946         * e2fsck.c: Free the blkid_cache when releasing the e2fsck context
947                 structure.
948
949         * e2fsck.h: If strnlen is not present, define it as a macro which
950                 calls e2fsck_strlen().  Add prototype for string_copy().
951                 Add blkid_cache to e2fsck context, and make
952                 filesystem_name, device_name, and journal_name be
953                 non-const variables.
954         
955         * pass1.c, pass2.c: Remove static strnlen function
956
957         * util.c (string_copy, e2fsck_strnlen): New functions
958
959 2003-01-29  Theodore Ts'o  <tytso@mit.edu>
960
961         * unix.c (usage): Make descripton -c be a bit more explicit
962
963 2003-01-22  Theodore Ts'o  <tytso@mit.edu>
964
965         * pass1.c (check_blocks): Use the EXT2_I_SIZE macro.
966
967 2003-01-02  Theodore Ts'o  <tytso@mit.edu>
968
969         * unix.c (main): Detect if there is an attempt to run the journal
970                 twice, and abort with an error if this is the case.
971                 (Address IBM Bugzilla bug #1226)
972
973 2002-12-18  Theodore Ts'o  <tytso@mit.edu>
974
975         * pass2.c (strnlen): Provide strnlen if libc doesn't. 
976
977 2003-11-19  Theodore Ts'o  <tytso@mit.edu>
978
979         * unix.c (PRS): Print an error if more than one of the -p/-a, -n
980                 or -y options are specified.
981
982 2002-11-12  Theodore Ts'o  <tytso@mit.edu>
983
984         * problem.c: Make HTREE problems PR_PREEN_OK, so that we don't
985                 abort an e2fsck after the filesystem has been mounted
986                 using the 2.4 ext2 codebase.
987
988 2002-11-09  Theodore Ts'o  <tytso@mit.edu>
989
990         * Release of E2fsprogs 1.32
991
992 2002-11-08  Theodore Ts'o  <tytso@mit.edu>
993
994         * Release of E2fsprogs 1.31
995
996 2002-11-08    <tytso@snap.thunk.org>
997
998         * unix.c (main): Fix a bug where e2fsck could erroneously mark a
999                 filesystem as being valid if it was being checked and it
1000                 is interrupted with a ^C.  (Bug introduced in e2fsprogs
1001                 1.28.)
1002
1003         * unix.c (PRS), journal.c: Set the default level of journal
1004                 debugging to be 0, and allow the user to set the level of
1005                 journal debugging by using the E2FSCK_JBD_DEBUG
1006                 environment variable.
1007
1008         * pass1.c (new_table_block), super.c (check_super_block), swapfs.c
1009                 (swap_filesys): Clear EXT2_FLAG_MASTER_SB_ONLY to make
1010                 sure the backup superblocks and group descriptors are
1011                 updated when we make an important change to the
1012                 superblocks and/or group descriptors.  (i.e., generating a
1013                 UUID, allocating filesystem metadata, or byte-swapping the
1014                 filesystem.)
1015
1016 2002-11-07  Theodore Ts'o  <tytso@mit.edu>
1017
1018         * e2fsck.h, unix.c (main, check_mount): Fix e2fsck so that it
1019                 returns the appropriate exit code, so that the boot
1020                 scripts will be told that they need to automatically
1021                 reboot.
1022
1023 2002-10-31  Theodore Ts'o  <tytso@mit.edu>
1024
1025         * Release of E2fsprogs 1.30
1026
1027 2002-10-31  Theodore Ts'o  <tytso@mit.edu>
1028
1029         * unix.c (usage), e2fsck.8.in: Add the -D option to the usage and
1030                 command synopsis.  (Addresses Debian bug #167108)
1031
1032         * pass1.c (e2fsck_pass1): Check the superblock write time to see
1033                 whether or not we can safely do the LOW_DTIME checks.
1034                 (Addresses Sourceforge bug #620980)
1035
1036 2002-10-30  Theodore Ts'o  <tytso@mit.edu>
1037
1038         * Makefile.in (install): Search all compression extensions when
1039                 deleting old man pages.
1040
1041         * pass1.c (mark_table_blocks): Fix bug in meta_bg support; only
1042                 mark blocks legacy group descriptor blocks up to 
1043                 s_first_meta_bg.
1044
1045 2002-10-20  Theodore Ts'o  <tytso@valinux.com>
1046
1047         * pass1.c (mark_table_blocks): Add support for the meta_blockgroup
1048                 filesystem format.
1049
1050 2002-10-13  Theodore Ts'o  <tytso@mit.edu>
1051
1052         * pass3.c (e2fsck_get_lost_and_found): Pass in mode 700 to
1053                 ext2fs_new_inode().
1054
1055         * unix.c (show_stats): Fix format bug if NLS is in use.
1056
1057         * journal.c, pass1.c, revoke.c, util.c: Fix gcc -Wall nits.
1058
1059 2002-10-08  Theodore Ts'o  <tytso@mit.edu>
1060
1061         * pass3.c (e2fsck_get_lost_and_found): Create the lost+found
1062                 directory with mode 0700.
1063
1064 2002-10-02  Theodore Y. Ts'o  <tytso@mit.edu>
1065         
1066         * pass2.c (parse_int_node, check_dir_block): Add byte-swap
1067                 functions around the htree code, so that it works on
1068                 big-endian machines.
1069
1070         * swapfs.c (swap_filesys): For PPC machines, byte-swap the bitmap,
1071                 since PPC big-endian filesystems were historically wierd.
1072                 This is just for the regression test, since no one
1073                 actually uses them anymore...
1074
1075 2002-09-30  Theodore Ts'o  <tytso@mit.edu>
1076
1077         * problem.c, problem.h (PR_2_HTREE_BAD_LIMIT,
1078                 PR_2_HTREE_BAD_COUNT, PR_2_HTREE_HASH_ORDER, 
1079                 PR_2_HTREE_BAD_DEPTH): Add new problem codes.
1080
1081         * pass2.c (salvage_directory, check_dir_block): Avoid counting
1082                 directory entries twice during a directory salvage.  Make
1083                 the salvaging algorithm smarter about directory entry size
1084                 overruns.
1085                 (parse_int_node): Add check to make sure the limit and
1086                 count fields in the node headers are sane.  Also check
1087                 to make sure the hash table in ascending order.
1088                 (pass2, htree_depth): For all leaf nodes, determine their
1089                 depth in the tree, and make sure it matches with the depth
1090                 in the htree root information.
1091
1092 2002-09-29  Theodore Ts'o  <tytso@mit.edu>
1093
1094         * pass2.c (check_dir_block): Do a more paranoid check when trying
1095                 to determine whether or not a directory entry is a
1096                 completely empty leaf block or leaf node.  Otherwise
1097                 e2fsck might get confused into thinking that a valid dxdir
1098                 was corrupted.
1099
1100         * rehash.c (e2fsck_rehash_dir): Apply patch from Christopher Li
1101                 which avoids creating an empty directory entry at the end
1102                 of the directory block.  This screws up earlier versions
1103                 of the indexed directory patch.
1104         
1105 2002-09-28  Theodore Ts'o  <tytso@mit.edu>
1106
1107         * rehash.c (write_directory): Clear the index flag if by
1108                 reoptimizing the directory, we bring it back into a
1109                 non-indexed state.
1110                 (e2fsck_rehash_dir): Allow directories that contain two
1111                 blocks to be indexed.  Otherwise when they grow, they
1112                 never will be indexed by the kernel.
1113
1114         * unix.c (main): Only update the master superblock; there's no
1115                 point updating the backup superblocks, and it speeds up
1116                 fsck slightly.
1117
1118         * pass2.c (salvage_directory): New function called by
1119                 check_dir_block() which is much more sophisticated about
1120                 how it salvages corrupted filesystems.
1121
1122 2001-09-24  Theodore Tso  <tytso@mit.edu>
1123
1124         * Release of E2fsprogs 1.29
1125
1126 2002-09-06  Theodore Ts'o  <tytso@mit.edu>
1127
1128         * rehash.c (copy_dir_entries): Fix bug which caused corrupted
1129                 directories if there are 4 or 8 bytes left over in a
1130                 directory page when optimizing/reindexing a directory.
1131
1132 2001-08-31  Theodore Tso  <tytso@thunk.org>
1133
1134         * Release of E2fsprogs 1.28
1135
1136 2002-08-31  Theodore Ts'o  <tytso@mit.edu>
1137
1138         * ehandler.c (e2fsck_handle_read_error): If the user asks to
1139                 ignore the error, offer to try forcing a write of the
1140                 block to the disk; sometimes this will cause the drive to
1141                 remap the bad block.
1142
1143 2002-08-31  Theodore Ts'o  <tytso@valinux.com>
1144
1145         * pass2.c (e2fsck_pass2): If this is a HTREE directory, sort the
1146                 dblist so that the first block of all of the directories
1147                 is handled first so we can read the hash version
1148                 information.
1149                 (check_dir_block): Examine the root node for correctness,
1150                 and offer to clear it if it is not correct.  Also copy the
1151                 hash version to the dx_dir structure, so that the proper
1152                 hash function can be used for other blocks in the
1153                 directory.
1154
1155         * problem.c, problem.h (PR_2_HTREE_BAD_ROOT): Add new problem code.
1156
1157 2002-08-21  Theodore Ts'o  <tytso@mit.edu>
1158
1159         * problem.c: Fix PR_1_RELOC_BLOCK_ALLOCATE message to explain that
1160                 it is necessary to find contiguous blocks in a particular
1161                 block group.
1162
1163 2002-08-17  Theodore Ts'o  <tytso@mit.edu>
1164
1165         * e2fsck.8.in: Add clarifying text describing how e2fsck works
1166                 with ext3 filesytems.  (Addresses Debian bug #145044).
1167
1168         * pass1.c (handle_htree): Add support for EXT2_HASH_TEA
1169
1170         * e2fsck.h, e2fsck.c (e2fsck_allocate_context): Add new field to
1171                 the e2fsck context, ext_attr_ver, which specifies the EA
1172                 format version.
1173
1174         * unix.c (usage, parse_extended_opts, PRS), e2fsck.8.in: Add new
1175                 option -E, which allows the users to specify extended
1176                 options.  Added ea_ver extended option.
1177
1178         * pass1.c (e2fsck_pass1_check_device_inode): Add ext2_filsys
1179                 argument to this function, so we can account for the
1180                 presence of extended attribute blocks attached to device
1181                 inodes.
1182                 (e2fsck_pass1_check_symlink, e2fsck_pass1): Take into
1183                 account the fact that symlinks can also have extended
1184                 attribute blocks.
1185                 (check_ext_attr): Don't be flexible about the EA format
1186                 version.  Check against the version number in
1187                 ctx->ext_attr_ver. 
1188                 (check_blocks): Check all inodes, so that we account for
1189                 extended attribute blocks belonging to special files.
1190                 Clean up i_size checks.
1191
1192         * pass1b.c (pass1b): Check all inodes, so that we account for
1193                 extended attribute blocks belonging to special files.
1194                 (delete_file_block): Use ext2fs_alloc_block_stats() to
1195                 update the filesystem statistics.
1196                 (delete_file): Attempt to decrement the extended
1197                 attribute refcount, and free the EA block if the count
1198                 hits zero.
1199                 (clone_file): Fixed bugs in EA handling.  Don't call
1200                 block_iterate on inodes that don't have a valid i_block[]
1201                 array.  Reread the base inode since it may have been
1202                 changed by ext2fs_block_iterate.  When updating inodes as
1203                 part of cloning an EA block, write out the correct inode
1204                 structure.
1205
1206         * pass2.c (deallocate_inode_block, deallocate_inode): Use standard
1207                 ext2fs_alloc_*_stats functions to update the filesystem 
1208                 statistics.
1209                 (deallocate_inode): Attempt to decrement the extended
1210                 attribute refcount, and free the EA block if the count
1211                 hits zero. 
1212                 (e2fsck_process_bad_inode): Add extra argument to calls 
1213                 to e2fsck_pass1_check_device_inode ().
1214
1215         * pass3.c (e2fsck_get_lost_and_found): Use standard
1216                 ext2fs_alloc_*_stats functions to update the filesystem.
1217                 statistics when creating /lost+found.
1218                 (adjust_inode_count): Remove debugging code that can never
1219                 be triggered.
1220
1221         * pass4.c (disconnect_inode): Add explanation about why we only
1222                 clear inodes that have no data blocks and no EA blocks.
1223                 Use ext2fs_inode_alloc_stats2 function to update the
1224                 filesystem statistics when clearing a zero-length inode.
1225
1226         * problem.c, problem.h (PR_1B_ADJ_EA_REFCOUNT,
1227                 PR_2_ADJ_EA_REFCOUNT): Add new problem codes.
1228
1229         * super.c (release_inode_block), (release_orphan_inodes): Use the
1230                 standard ext2fs_alloc_*_stats functions to update the
1231                 filesystem statistics.
1232                 (release_inode_blocks): Attempt to decrement the extended
1233                 attribute refcount, and free the EA block if the count
1234                 hits zero.
1235
1236 2002-08-01  Theodore Ts'o  <tytso@mit.edu>
1237
1238         * dict.c, dict.h: New file from kazlib 1.20 which implements a
1239                 red-black tree
1240         
1241         * pass1b.c: Massive changes to take advantage of dict.c.  This
1242                 removes several O(n**2) algorithms from the rare case
1243                 where there are a large number of blocks claimed by
1244                 multiple inodes.
1245
1246 2002-07-24  Theodore Ts'o  <tytso@mit.edu>
1247
1248         * e2fsck.8.in, e2fsck.h, pass3.c (e2fsck_pass3), unix.c, rehash.c:
1249                 Add new option -D, which requests e2fsck to optimize all
1250                 directories.  Rehash.c will also compress and sort
1251                 non-indexed directories.
1252
1253         * problem.c, problem.h: Rename PR_3A_REHASH_* to PR_3A_OPTIMIZE_*
1254
1255         * unix.c (PRS): Make sure the signal_cancel is registered without
1256                 SA_RESTART.
1257
1258         * rehash.c (e2fsck_rehash_dir, copy_dir_entries, calculate_tree):
1259                 Restructured code in e2fsck_rehash_dir into two new
1260                 subroutines to make the code more understandable/maintainable.
1261                 (set_root_node): Fixed bug which caused the root node to
1262                 be invalid on non-FILETYPE filesystems due to an
1263                 unitialized variable.
1264                 (calculate_tree): Fix bug where pointers which might get
1265                 invalidated if realloc() moves outdir->buf around.
1266                 (e2fsck_rehash_dir): Fix memory leak bug.
1267
1268         * pass3.c (e2fsck_get_lost_and_found), e2fsck.h, e2fsck.c:
1269                 Exported as a public interface a function for finding the
1270                 lost and found directory.  Cache the location of the lost
1271                 and found directory in the e2fsck context structure.
1272
1273         * util.c (ask_yn, read_a_char): Note when the user has typed ^C,
1274                 and abort processing by longjmp'ing to ctx->abort_loc.
1275
1276 2002-07-23  Theodore Ts'o  <tytso@mit.edu>
1277
1278         * pass1.c (e2fsck_pass1): If e2fsck is run with -n, don't create
1279                 the dirs_to_hash list, since we don't want to reindex
1280                 directories if the filesystem is opened read-only.
1281
1282 2002-07-21  Theodore Ts'o  <tytso@mit.edu>
1283
1284         * e2fsck.8.in: Document new exit code FSCK_CANCELED
1285
1286         * unix.c (PRS, signal_cancel): Capture SIGINT and SIGTERM signals
1287                 and set a flag in the e2fsck context indicating that
1288                 cancellation has been requested, so that e2fsck will exit
1289                 only at safe points.
1290                 (main): Change the exit handling so that if a cancellation
1291                 is requested, return FSCK_CANCELED (a new exit code 32).
1292                 e2fsck can now return more than one exit code as part of a
1293                 bitmask (as had been documented in the man page).
1294
1295         * pass2.c (e2fsck_pass2, check_dir_block), pass3.c (e2fsck_pass3),
1296                 pass4.c (e2fsck_pass4): Check to see if a cancellation was
1297                 requested, and abort processing if necessary.
1298
1299 2002-07-19  Theodore Ts'o  <tytso@mit.edu>
1300
1301         * rehash.c, Makefile.in: New file which rewrites directories using
1302                 the htree format.
1303         
1304         * problem.c (fix_problem), problemP.h (PR_PREEN_NOHDR): Add option
1305                 which suppresses the header printed when in preen mode.
1306
1307         * pass3.c (e2fsck_pass3): If there are entries on the dirs_to_hash
1308                 list, call e2fsck_rehash_directories to reindex those
1309                 directories.
1310                 (e2fsck_expand_directory): Generalize the old
1311                 expand_dirctory() function so it can expand a directory to
1312                 a guaranteed minimum size. 
1313
1314         * e2fsck.h (struct e2fsck_struct): Add the dirs_to_hash list.  Add
1315                 new function prototypes for rehash.c and for
1316                 e2fsck_expand_directory().
1317         
1318         * e2fsck.c (e2fsck_reset_context): Free the dirs_to_hash list.
1319
1320         * pass1.c (e2fsck_pass1): Initialize the dirs_to_hash list if the
1321                 htree feature is present in the filesystem.
1322                 (check_blocks): If a non-htree directory has more than 2
1323                 blocks, put it on the dirs_to_hash list.
1324
1325         * pass2.c (clear_htree): Add corrupt htree directories to the
1326                 dirs_to_hash list.
1327
1328         * problem.h, problem.c (PR_3A_PASS_HEADER, PR_3A_REHASH_ITER, 
1329                 PR_3A_REHASH_DIR_ERR, PR_3A_REHASH_DIR_HEADER,
1330                 PR_3A_REHASH_DIR, PR_3A_REHASH_DIR_END): Add new problem codes
1331
1332         * pass2.c (parse_int_node), problem.c (PR_2_HTREE_BADBLK): Fix
1333                 problem display.
1334         
1335 2002-07-15  Theodore Ts'o  <tytso@mit.edu>
1336
1337         * pass2.c (e2fsck_pass2): Use dx_dir->numblocks instead of
1338                 dx_dir->ino to indicate that a bad inode was cleared.
1339
1340 2002-06-26  Theodore Ts'o  <tytso@mit.edu>
1341
1342         * pass1.c (check_blocks): Move htree handling to handle_htree().
1343                 Factor out calls to ext2fs_write_inode so that it happens
1344                 if dirty_inode is non-zero.
1345                 (handle_htree): Add checks for invalid htree root, invalid
1346                 hash version, invalid hash version, and htree depth too deep.
1347
1348         * problem.h, problem.c (PR_1_HTREE_NODIR, PR_1_HTREE_BADROOT,
1349                 PR_1_HTREE_HASHV, PR_1_HTREE_INCOMPAT, PR_1_HTREE_DEPTH): 
1350                 Add new problem codes.
1351
1352         * pass2.c (parse_int_node): Fix silly typo.
1353                 (check_dir_block): Change to use new ext2fs_dirhash()
1354                 function prototype.
1355                 (pass2): Fixed two minor bugs discovered by the test case:
1356                 Don't stop checking dxdir's after clearing a bad inode.  
1357                 If there is a bad max hash, make sure the bad_dir flag
1358                 is set to make sure we try to clear inode.
1359
1360 2002-06-25  Theodore Ts'o  <tytso@mit.edu>
1361
1362         * e2fsck.c (e2fsck_reset_context): Free the dx_dirinfo structure.
1363
1364         * message.c: Add new abbrevations @h and @p, "HTREE directory
1365                 inode" and "problem in".
1366
1367         * pass1.c (check_blocks): If the inode has the INDEX_FL flag,
1368                 register the block into the indexed directory data
1369                 structures.  Or if the filesystem doesn't have the
1370                 DIR_INDEX flag, offer to clear the INDEX_FL.
1371
1372         * pass2.c (e2fsck_pass2, parse_int_node): Add support check htree
1373                 directories (we don't check all possible corruptions yet).
1374
1375         * problem.h, problem.h (PR_1_HTREE_SET, PR_2_HTREE_NOTREF, 
1376                 PR_2_HTREE_DUPREF, PR_2_HTREE_MIN_HASH, PR_2_HTREE_MAX_HASH,
1377                 PR_2_HTREE_CLEAR, PR_2_HTREE_FCLR, PR_2_HTREE_BADBLK): Add
1378                 new problem codes.
1379
1380         * unix.c (main): If ENABLE_HTREE is not defined, complain if the
1381                 filesystem has the dir_index feature.
1382
1383         * Makefile.in, e2fsck.h, dx_dirinfo.c: New file (and group of
1384                 functions) which keeps track of blocks in HTREE directory
1385                 blocks.
1386
1387 2002-05-22  Andreas Dilger <adilger@clusterfs.com>
1388
1389         * super.c (check_superblock): Check that the number of inodes and
1390                 blocks in a group is less than 2^16, so that the free inode
1391                 and block counts for a group fit into the group descriptor
1392                 table fields.  Any more than that would need a COMPAT flag.
1393
1394 2002-05-22  Theodore Ts'o  <tytso@mit.edu>
1395
1396         * pass1.c (check_ext_attr): Update to support the V2 Bestbits EA
1397                 format.  We automatically determine from the first EA
1398                 block we visit whether we are using the V1 or V2 format.
1399
1400 2002-05-21  Theodore Ts'o  <tytso@mit.edu>
1401
1402         * pass1.c (process_block): If an inode has too many blocks or
1403                 is too big, then offer to truncate the inode.
1404                 (check_blocks): Don't bother checking the size to see if
1405                 it's too big, since that's just a symptom, not the disease
1406                 (which we're now appropriately checking in process_block).
1407
1408         * problem.c, problem.h: Add new problem codes PR_1_INODE_TOOBIG,
1409                 PR_1_TOOBIG_DIR, PR_1_TOOBIG_REG, PR_1_TOOBIG_SYMLINK, and
1410                 add the latch code PR_LATCH_TOOBIG.
1411
1412 2002-05-20  Theodore Ts'o  <tytso@mit.edu>
1413
1414         * e2fsck.h, pass1.c (e2fsck_pass1_check_symlink), pass2.c
1415                 (e2fsck_process_bad_inode): Add an extra
1416                 argument so a scratch buffer can be passed into the
1417                 function.
1418
1419         * pass1.c (e2fsck_pass1_check_device_inode,
1420                 e2fsck_pass1_check_symlink): If the EXT2_INDEX_FL flag is
1421                 set, then the device/FIFO is invalid.
1422                 (check_immutable): Don't check for EXT2_INDEX_FL; we take
1423                 care of that elsewhere now.
1424                 (e2fsck_pass1): Check to see if the symlink is valid
1425                 before we offer to clear any immutable bits.  This matches
1426                 the order in which we check other special files.
1427
1428         * pass2.c (e2fsck_pass2): Allocate a bigger scratch buffer so we
1429                 can pass part of it to e2fsck_process_bad_inode.
1430
1431         * pass4.c (e2fsck_pass4): If we need to call
1432                 e2fsck_process_bad_inode(), allocate the necessary scratch
1433                 buffer.
1434
1435         * problem.h, problem.c: Change PR_2_SYMLINK_SIZE to be
1436                 PR_2_INVALID_SYMLINK, and change the text
1437                 accordingly.  Revert the text change for PR_1_SET_IMMUTABLE
1438                 since we no longer check for EXT2_INDEX_FL in
1439                 check_immutable().
1440
1441 2002-05-18  Andreas Dilger <adilger@clusterfs.com>
1442
1443         * pass1.c (e2fsck_pass1_check_symlink): Remove checks of
1444                 immutable/append-only checks, since this is handled by
1445                 check_immutable.  For non-fast symlinks, read in the
1446                 data block and check the length to make sure it
1447                 matches with the inode size.
1448                 (check_immutable): Generalize to also check for the 
1449                 EXT2_INDEX_FL flag. 
1450                 (check_blocks): For non-regular files, signal a bad inode 
1451                 size if i_size_high is non-zero.
1452
1453         * pass2.c: Only count large files if they are regular files
1454                 (not just if they aren't directories).
1455
1456         * problem.c, problem.h: Change comment for PR_2_SYMLINK_SIZE
1457                 to indicate that it can be triggered by any symlink,
1458                 not fast symlink.  Change text for PR_1_SET_IMMUTABLE
1459                 to indicate that it the EXT2_INDEX_FL was set.
1460
1461 2002-05-17  Theodore Ts'o  <tytso@mit.edu>
1462
1463         * pass1.c (e2fsck_pass1): When calculating max_sizes, omit capping
1464                 this value by the calculated value of max_sect_sizes.
1465                 The inode may be a sparse inode, and the limit of
1466                 max_sect_sizes assumed a non-sparse inode and a limit
1467                 based on a 32-bit i_blocks field measured in 512 sectors.
1468
1469         * super.c (check_super_block): Fix check for s_log_block_size so
1470                 that takes into account fact that there is an offset of
1471                 EXT2_MIN_BLOCK_LOG_SIZE.
1472
1473         * pass1.c: Allocate max_sizes array to be big enough to support
1474                 the larger block sizes.
1475
1476 2002-05-16  Andreas Dilger <adilger@clusterfs.com>
1477
1478         * unix.c (main), util.c (get_backup_sb): Use EXT2_MAX_BLOCK_SIZE
1479                 instead of using a hardcoded value of 4096.
1480
1481         * super.c (check_super_block): Change checks for s_log_block_size
1482                 s_log_frag_size so they support the larger block sizes.
1483
1484         * pass1.c (e2fsck_pass1): Calculate max_sizes array for block
1485                 sizes up to EXT2_MAX_BLOCK_SIZE (to support block sizes
1486                 greater than 4k).
1487
1488 2002-03-08  Theodore Tso  <tytso@mit.edu>
1489
1490         * Release of E2fsprogs 1.27
1491
1492 2002-03-07  Theodore Tso  <tytso@mit.edu>
1493
1494         * journal.c, pass5.c, revoke.c: Fix gcc -Wall complaints
1495
1496 2002-03-07  Theodore Tso  <tytso@mit.edu>
1497
1498         * unix.c (main): Don't close the filesystem before calling
1499                 fatal_error(); this just causes a needless warning about a
1500                 bad I/O manager magic number.
1501
1502         * journal.c (e2fsck_check_ext3_journal): Offer to clear the inode
1503                 in case the journal is too small, or the inode number in
1504                 the superblock doesn't appear to be random.
1505
1506 2002-03-06  Theodore Tso  <tytso@mit.edu>
1507
1508         * problem.h, problem.c: PR_5_BLOCK_RANGE_UNUSED,
1509                 PR_5_BLOCK_RANGE_USED, PR_5_INODE_RANGE_UNUSED,
1510                 PR_5_INODE_RANGE_USED: Add new problem codes.
1511
1512         * pass5.c (check_block_bitmaps, check_inode_bitmaps): Collapse
1513                 reporting of adjacent blocks and inodes into a range.
1514
1515 2002-03-04  Philipp Thomas  <pthomas@suse.de>
1516
1517         * unix.c (main): Newer libintl needs LC_CTYPE to be set in
1518                 addition to LC_MESSAGES.
1519
1520 2002-02-24  Theodore Tso  <tytso@mit.edu>
1521
1522         * Makefile.in (install): Install hard links for man pages for
1523                 fsck.ext2 and fsck.ext3.  Remove any compressed man
1524                 pages before installing the man pages.
1525
1526 2002-02-22  Theodore Tso  <tytso@mit.edu>
1527
1528         * journal.c: Improve code maintainability and reduce code size by 
1529                 moving common code paths in e2fsck_journal_init_dev() and
1530                 e2fsck_journal_init_inode() into e2fsck_get_journal().
1531                 Also fixed a memory leak in recover_ext3_journal().
1532
1533         * super.c (release_orphan_inodes): Fix memory leak.
1534
1535 2002-02-03  Theodore Tso  <tytso@thunk.org>
1536
1537         * Release of E2fsprogs 1.26
1538
1539 2001-12-24  Theodore Tso  <tytso@mit.edu>
1540
1541         * unix.c (PRS): Don't allow the -c and -l/-L options to be
1542                 specified at the same time.
1543
1544         * e2fsck.h (E2F_OPT_WRITECHECK), unix.c (PRS), 
1545                 badblocks.c (read_bad_blocks_file): If two -c options are
1546                 specified, then perform a non-destructive read/write scan
1547                 of the disk.
1548
1549         * e2fsck.8.in: Document the double -c option; also encourage users
1550                 to use -c instead of the -l/-L options since it's too hard
1551                 for users to get things like the blocksize parameter correct.
1552
1553 2001-12-23  Theodore Tso  <tytso@mit.edu>
1554
1555         * util.c (get_backup_sb): This function now searches for the
1556                 backup superblock by iterating over possible blocksizes
1557                 instead of defaulting a guess of 8193 if the superblock
1558                 isn't available.
1559
1560         * message.c (expand_percent_expression), unix.c (main): Pass in
1561                 new parameters to get_backup_sb.  Also, in unix.c, use the
1562                 blocksize paramter in the e2fsck context structure instead
1563                 of using a static variable, since get_backup_sb wants to
1564                 be able to set the blocksize paramter.
1565
1566         * e2fsck.h: Update function prototype for get_backup_sb; also add
1567                 the blocksize parameter to the e2fsck context structure.
1568
1569         * Makefile.in, jfs_user.h: Move linux/jbd.h to
1570                 ext2fs/kernel-jbd.h, to avoid using the system header
1571                 file version of hbd.h when using diet glibc (since it
1572                 forcibly adds /usr/include to the beginning of the
1573                 include search path.)
1574
1575 2001-12-21  Theodore Tso  <tytso@mit.edu>
1576
1577         * problem.c (fix_problem): Use ctx->filesystem_name if the
1578                 ctx->device_name is NULL.
1579
1580         * journal.c (e2fsck_check_ext3_journal): Give the opportunity to
1581                 run the journal even if recovery flag is cleared.  If
1582                 we're using a backup superblock, run the journal by
1583                 default.
1584
1585         * e2fsck.h (E2F_OPT_FORCE), unix.c (PRS, check_if_skip): Use a
1586                 bitfield in the e2fsck context flags word to indicate
1587                 whether or not a check should be forced.  This allows the
1588                 journal code to set the option if necessary to force a
1589                 filesystem check.
1590
1591         * problem.h, problem.c: Remove PR_0_JOURNAL_RESET_JOURNAL, and add
1592                 PR_0_JOURNAL_RUN and PR_0_JOURNAL_RUN_DEFAULT.  Update
1593                 problem decription texts.
1594
1595 2001-12-16  Theodore Tso  <tytso@mit.edu>
1596
1597         * e2fsck.h (ext2fs_get_refcount_size), unix.c (check_mount, PRS), 
1598                 pass1.c (adjust_extattr_refcount), 
1599                 ea_refcount.c (ea_refcount_create): Fix gcc -Wall nits.
1600         
1601         * recovery.c, revoke.c: Update to versions from 2.4.17-pre8.
1602
1603         * journal.c, jfs_user.h: Update support code for new version of
1604                 recover.c and revoke.c.  Fix support for filesystems with
1605                 external journals.
1606
1607 2001-11-30 Gabriel Paubert <paubert@iram.es>
1608
1609         * journal.c (e2fsck_journal_load): Fix an endianness bug.
1610
1611 2001-11-26  Theodore Tso  <tytso@mit.edu>
1612
1613         * super.c (check_super_block): Make sure that if the inode table
1614                 or allocation bitmap is zero, that it is marked as
1615                 invalid, so that in pass #1, a new bitmap/inode table gets
1616                 properly allocated.  (Addresses Debian Bug #116975)
1617
1618 2001-11-24  Theodore Tso  <tytso@mit.edu>
1619
1620         * e2fsck.8.in: Fix minor typo in man page and clarify device
1621                 specification.
1622
1623 2001-10-07  Theodore Tso  <tytso@mit.edu>
1624
1625         * journal.c (clear_v2_journal_fields, e2fsck_journal_load): If the
1626                 V2 fields are set on a V1 journal superblock, or an
1627                 internal V2 journal has s_nr_users is non-zero, clear the
1628                 entire journal superblock beyond the V1 superblock.  This
1629                 fixes botched V1->V2 updates.
1630
1631         * problem.c, problem.h (PR_0_CLEAR_V2_JOURNAL): Add new problem code.
1632
1633 2001-09-20  Theodore Tso  <tytso@mit.edu>
1634
1635         * e2fsck.h, journal.c (e2fsck_move_ext3_journal): Add new function
1636                 which will automatically relocate the ext3 journal from a
1637                 visible file to an invisible journal file if the
1638                 filesystem has been opened read/write.
1639
1640         * super.c (check_super_block): Add call to e2fsck_move_ext3_journal
1641
1642         * problem.c, problem.h (PR_0_MOVE_JOURNAL, PR_0_ERR_MOVE_JOURNAL):
1643                 Add new problem codes.
1644
1645 2001-09-20  Theodore Tso  <tytso@thunk.org>
1646
1647         * Release of E2fsprogs 1.25
1648
1649 2001-09-19  Theodore Tso  <tytso@mit.edu>
1650
1651         * unix.c (main): If a superblock is specified explicitly by the
1652                 user, don't try to automatically fall back to an
1653                 alternate superblock.
1654
1655 2001-09-02  Theodore Tso  <tytso@thunk.org>
1656
1657         * Release of E2fsprogs 1.24a
1658
1659 2001-08-30  Theodore Tso  <tytso@thunk.org>
1660
1661         * Release of E2fsprogs 1.24
1662
1663 2001-08-30  Theodore Tso  <tytso@valinux.com>
1664
1665         * pass1.c (e2fsck_pass1): For EXT2_RESIZE_INO, allow its i_mode to
1666                 either be zero or a regular file (for compatibility with
1667                 Andreas's on-line resizing programs).
1668
1669 2001-08-27  Theodore Tso  <tytso@valinux.com>
1670
1671         * unix.c (main): Remove EXT2FS_VERSION from the version display,
1672                 since it only confuses people.
1673
1674         * pass1.c (strnlen): Provide strnlen if libc doesn't.
1675
1676 2001-08-15  Theodore Tso  <tytso@valinux.com>
1677
1678         * Release of E2fsprogs 1.23
1679
1680 2001-08-13  Theodore Tso  <tytso@valinux.com>
1681
1682         * super.c (release_orphan_inodes): If the filesystem contains
1683                 errors, don't run the orphan * list, since the orphan list
1684                 can't be trusted.
1685
1686         * pass1.c (check_size): Fix logic in check_size; the previous code
1687                 only offered to clear the inode size fields if both size
1688                 and i_size_high were zero.
1689                 (e2fsck_pass1_check_device_inode): If i_blocks is
1690                 non-zero, then assume that the device/socket/fifo inode
1691                 is bogus.
1692
1693 2001-08-09  Theodore Tso  <tytso@valinux.com>
1694
1695         * pass1.c, pass2.c, problem.c, problem.h: Fix bug introduced by
1696                 Andreas's symlink code; check_blocks() was unconditionally
1697                 testing inode_bad_map without checking to see if it
1698                 existed first.  Fixed problem a different way; we now no
1699                 longer check inode_bad_map at all, since the file might
1700                 not get deleted in pass 2 anyway.  We move the large file
1701                 feature reconciliation code to to e2fsck_pass2(), and in
1702                 deallocate_inode() in pass2.c, we decrement the large
1703                 files counter if we're about to delete a large file.
1704
1705         * unix.c (show_stats): Print the number of large files in verbose
1706                 mode.
1707
1708 2001-08-07  Theodore Tso  <tytso@valinux.com>
1709
1710         * journal.c (recover_ext3_journal): If s_errno is set in the
1711                 journal superblock, set the EXT2_ERROR_FS flag in the
1712                 filesystem superblock after the journal is run.
1713
1714 2001-08-04  Andreas Dilger  <root@lynx.adilger.int>
1715
1716         * message.c:  Change comments for %D and %d expansion in e2fsck
1717                 problem codes.  It was not consistent which was for dirent
1718                 expansion, and which was for directory number expansion.
1719
1720         * problem.c (PR_2_FINAL_RECLEN, PR_2_BAD_FILETYPE): Fix problem
1721                 codes which got caught by the confusion between %D and %d.
1722
1723 2001-08-04  Theodore Tso  <tytso@valinux.com>
1724
1725         * problem.c (PR_2_SYMLINK_SIZE): Change description to make it
1726                 more clear (and remove %s expansion).  Also add missing
1727                 periods to the end of a number of problem descriptions.
1728
1729         * pass2.c (e2fsck_process_bad_inode): Remove unneeded problem
1730                 context string set now that the problem description for
1731                 PR_2_SYMLINK_SIZE has been changed.
1732
1733         * pass1.c (e2fsck_pass1_check_symlink): Consolidate some checks,
1734                 and check the validity of the symlink block here (so that
1735                 we detect this case here instead of later).  Also use
1736                 sizeof(inode->i_block) instead EXT2_LINK_DIR.
1737
1738 2001-07-30  Theodore Tso  <tytso@valinux.com>
1739
1740         * unix.c (check_mount): Remove the code which tested for the root
1741                 filesystem being mounted read-only, and depend on the
1742                 results flags from ext2fs_check_if_mounted.
1743
1744 2001-07-29  Theodore Tso  <tytso@valinux.com>
1745
1746         * unix.c (check_if_skip): Free the e2fsck context structure on a
1747                 normal clean filesystem exit, to make it easier to find
1748                 real memory leaks.
1749                 (PRS): Only update the path to include /sbin at the
1750                 beginning if the -c option is given, again to make it
1751                 easier to find memory leaks.
1752                 (main): Move the final print_resource_track call after the
1753                 filesystem and the context are freed.
1754
1755         * journal.c (e2fsck_journal_init_dev): Avoid memory leak if we
1756                 need to search for the journal device.
1757                 (e2fsck_journal_release): Free the journal IO channel when
1758                 we release the journal handle, to avoid a memory leak.
1759
1760         * e2fsck.c (e2fsck_reset_context): Fix bug; only close the io
1761                 channel if it is *different* from the filesystem io
1762                 channel.
1763
1764 2001-07-27  Theodore Tso  <tytso@valinux.com>
1765
1766         * problem.c (PR_1_SET_IMMUTABLE): Clarify problem message.
1767
1768         * pass1.c (e2fsck_pass1): Check for symlinks that have the
1769                 immutable flag set (and offer to clear them).
1770
1771 2001-07-26  Theodore Tso  <tytso@valinux.com>
1772
1773         * pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of
1774                 pass 1.
1775
1776 2001-07-25  Theodore Tso  <tytso@valinux.com>
1777
1778         * pass1.c (check_ext_attr): Skip zero-length EA entries.
1779
1780         * problem.c: PR_1_EA_ALLOC_COLLISION shouldn't abort, but should
1781                 prompt to clear the EA block.
1782
1783 2001-07-22  Theodore Tso  <tytso@valinux.com>
1784
1785         * journal.c (ll_rw_block): Use ctx->journal_io instead of the
1786                 filesystem's io_channel.
1787                 (e2fsck_journal_init_dev): New function which supports 
1788                 initialization of the external journal.
1789                 (e2fsck_get_journal): Remove code which flagged an error
1790                 if the superblock reported the use of an external journal.
1791                 (ext3_journal_via_mount): Remove unsued, #ifdefed out function.
1792
1793         * problem.c, problem.h: Removed error codes no longer used
1794                 (PR_0_JOURNAL_UNSUPP_DEV, PR_0_JOURNAL_BAD_DEV,
1795                 PR_0_JOURNAL_UNSUPP_UUID) and replace them with new error
1796                 codes related with failures in loading the external
1797                 journal (PR_0_JOURNAL_UNSUPP_MULTIFS,
1798                 PR_0_CANT_FIND_JOURNAL, PR_0_EXT_JOURNAL_BAD_SUPER).
1799                 Also changed the text assocated with PR_0_JOURNAL_BAD_UUID
1800                 to reflect the case where the external journal isn't
1801                 correct for this filesystem.
1802
1803         * unix.c (PRS), e2fsck.8.in: Add new option -j which allows
1804                 the user to specify the pathname to find the external journal.
1805
1806         * e2fsck.c (e2fsck_reset_context): Close journal_io if it isn't
1807                 the same as the filesystem io_channel.
1808
1809         * e2fsck.h: Add new fields (journal_io and journal_name) in the
1810                 context structure to support external journals.
1811
1812 2001-07-20  Theodore Tso  <tytso@valinux.com>
1813
1814         * unix.c (main): Add an explicit warning when the filesystem is
1815                 left not completely fixed when e2fsck exits.  (Addresses
1816                 Debian bug #104502.)
1817
1818 2001-07-19  Theodore Tso  <tytso@valinux.com>
1819
1820         * pass1.c (check_ext_attr): The entire EA block is now checked to
1821                 make sure that parts of the EA block aren't being used for
1822                 multiple purposes.
1823
1824         * Makefile.in e2fsck.h, region.c: New file which is used to detect
1825                 collisions in extended attribute block.
1826
1827         * problem.h, problem.c (PR_1_EA_MULTI_BLOCK, PR_1_EA_ALLOC_REGION,
1828                 PR_1_EA_ALLOC_COLLISION, PR_1_EA_BAD_NAME,
1829                 PR_1_EA_BAD_VALUE): Add new problem codes.
1830
1831 2001-07-10  Theodore Tso  <tytso@valinux.com>
1832
1833         * journal.c (e2fsck_run_ext3_journal): Only call ext3_flush() if
1834                 the superblock is dirty.
1835
1836 2001-07-07  Theodore Tso  <tytso@valinux.com>
1837
1838         * pass1b.c (pass1b, process_pass1b_block): Change the num_bad
1839                 field calculation so that it only counts EA block entries
1840                 as a single multiply claimed block (since once we clone
1841                 the EA blocks for one inode, we fix the problem for all of
1842                 the other inodes).  Also, I moved the num_bad calculation
1843                 from process_pass1b_block to the end of pass1b.  This
1844                 fixes a *significant* performance bug in pass1b which hit
1845                 people who had to had a lot of multiply claimed blocks.
1846                 (Can you say O(n**3) boys and girls?  I knew you could...
1847                 Fortunately, this case didn't happen that much in actual
1848                 practice.)
1849
1850         * pass1.c (e2fsck_pass1): Defer inodes which have an extended
1851                 attribute block for later processing to avoid extra seeks
1852                 across the disk.
1853                 (process_inode_cmp): If there is no indirect block, sort
1854                 by the extended attribute (i_file_acl) block.
1855
1856         * pass1b.c (clone_file_block): Fix bugs when cloning extended
1857                 attribute blocks.  Moved free of block_buf to after the
1858                 code which clones the extattr block, and fixed logic for
1859                 changing pointers to the extended attribute field in the
1860                 inodes which were affected.
1861                 (decrement_badcount): New function which is used whenever
1862                 we need to decrement the number of files which claim a
1863                 particular bad block.  Fixed bug where delete_file wasn't
1864                 checking check_if_fs_block() before clearing the entry in
1865                 block_dup_map.  This could cause a block which was claimed
1866                 by multiple files as well as the filesystem metadata to
1867                 not be completely fixed.
1868
1869         * pass1.c (adjust_extattr_refcount): Add new function which
1870                 adjusts the reference counts of extended attribute blocks
1871                 if needed, both up and down.
1872                 (e2fsck_pass1): If the refcount or refcount_extra
1873                 structure are present, call adjust_extattr_refcount(),
1874                 and free it afterwards.
1875
1876         * problem.h, problem.c (PR_1_EXTATTR_READ_ABORT, 
1877                 PR_1_EXTATTR_REFCOUNT, PR_1_EXTATTR_WRITE): Add new
1878                 problem codes.
1879
1880 2001-07-02  Theodore Tso  <tytso@valinux.com>
1881
1882         * pass1.c (e2fsck_pass1, check_ext_attr, check_blocks): Add
1883                 initial support for scanning extended attribute blocks.
1884
1885         * e2fsck.c (e2fsck_reset_context): free extended attribute
1886                 refcount structure.
1887
1888         * e2fsck.h: Add new fields for accounting for the extended
1889                 attribute blocks.
1890
1891         * Makefile.in, ea_refcount.c, e2fsck.h: Add new file which
1892                 implements a reference count abstraction.
1893
1894         * problem.c, problem.h: Add new problem codes PR_1_ALLOCATE_REFCOUNT,
1895                 PR_1_READ_EA_BLOCK, PR_1_BAD_EA_BLOCK, PR_2_FILE_ACL_BAD
1896
1897         * message.c: Add "@a" as an abbreviation for "extended attribute"
1898
1899         * pass1b.c (clone_file): Add code which handles cloning an
1900                 extended attribute block.
1901
1902         * pass1b.c (delete_file): 
1903         * pass2.c (deallocate_inode): If the inode contains an extended
1904                 attribute block in the file_acl field, clear it and
1905                 deallocate the block.
1906
1907 2001-06-28  Theodore Tso  <tytso@valinux.com>
1908
1909         * pass2.c (e2fsck_process_bad_inode): Deal with inodes which are
1910                 marked bad because of an invalid file_acl (either because
1911                 EXT2_FEATURE_COMPAT_EXT_ATTR is not set, or because the
1912                 block number in file_acl is bad.
1913
1914 2001-06-29  Theodore Tso  <tytso@valinux.com>
1915
1916         * unix.c (show_stats): Use long long to calculate the percentage
1917                 of the number of blocks in use in the filesystem.
1918
1919 2001-06-23  Theodore Tso  <tytso@valinux.com>
1920
1921         * Release of E2fsprogs 1.22
1922
1923 2001-06-22  Theodore Tso  <tytso@valinux.com>
1924
1925         * flushb.c: Use platform independent method of defining the
1926                 BLKFLSBUF ioctl.  Also include sys/mount.h since on newer
1927                 platforms BLKFLSBUF is defined there.
1928
1929 2001-06-19  Theodore Tso  <tytso@valinux.com>
1930
1931         * super.c (release_inode_blocks): Don't try to release the blocks
1932                 if the orphaned inode is a device file, symlink, or some
1933                 other kind of special file that doesn't have a block list.
1934
1935 2001-06-15  Theodore Tso  <tytso@valinux.com>
1936
1937         * Release of E2fsprogs 1.21
1938
1939 2001-06-13  Theodore Tso  <tytso@valinux.com>
1940
1941         * unix.c (check_if_skip): Adapted patch from Andreas Dilger which
1942                 prints the number of mounts or days elapsed since the last
1943                 check when e2fsck is forced to check an otherwise clean
1944                 filesystem.
1945
1946 2001-06-12  Theodore Tso  <tytso@valinux.com>
1947
1948         * badblocks.c: Stop using the compatibility badblocks function,
1949                 and use the ext2fs_badblocks_* functions instead.
1950
1951 2001-06-11  Theodore Tso  <tytso@valinux.com>
1952
1953         * unix.c (PRS): Fix bug introduced in 1.20 which broke the -F
1954                 flag.
1955
1956         * Makefile.in: Add message.c and swapfs.c to the list of source
1957                 files to build the make depend.
1958
1959         * swapfs.c, unix.c: Only support the -s and -S options to e2fsck
1960                 if ENABLE_SWAPFS is defined.
1961
1962 2001-06-08  Theodore Tso  <tytso@valinux.com>
1963
1964         * recover.c, revoke.c: Synchronize with ext3 0.7a
1965
1966 2001-06-02  Theodore Tso  <tytso@valinux.com>
1967
1968         * recovery.c (scan_revoke_records): Fix bug in recovery code;
1969                 missing byte order conversion.
1970
1971         * pass1.c (mark_inode_bad): Replace alloc_bad_map with a function
1972                 which sets the bit in the bad inode bitmap.
1973                 (e2fsck_pass1): Check for fast symlinks with an invalid
1974                 size, and set the bad inode map in that case.
1975                 (check_size): Check i_size_high for special files and
1976                 prompt to clear it along with i_size if non-zero.
1977
1978         * pass2.c (e2fsck_process_bad_inode): Check for fast symlinks with
1979                 an invalid size and prompt the user if the inode should be
1980                 cleared.
1981
1982         * problem.h, problem.c (PR_2_SYMLINK_SIZE): Added new problem code.
1983
1984 2001-06-01  Theodore Tso  <tytso@valinux.com>
1985
1986         * problem.c, problem.h: Change PR_0_JOURNAL_UNSUPP_INCOMPAT and
1987                 PR_0_JOURNAL_UNSUPP_ROCOMPAT so they aren't fatal errors,
1988                 but prompt to see if the user should abort.  Removed the
1989                 PR_0_JOURNAL_RESET_COMPAT problem code.
1990
1991         * journal.c (e2fsck_journal_load): If there are incompatible
1992                 journal flags, just return an error code.
1993                 (e2fsck_check_ext3_journal): If e2fsck_journal_load
1994                 returns an error code indicating that there are
1995                 incompatible journal flag, check to see if we should
1996                 abort, and then offer to clear the journal.
1997                 (Addresses Debian bug #98527.)
1998
1999         * Makefile.in: Move include/asm/types.h.in to
2000                 lib/ext2fs/ext2_types.h.in.
2001
2002 2001-06-01  Theodore Tso  <tytso@valinux.com>
2003
2004         * pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode, 
2005                 pass1_check_directory): Add a safety check to make sure
2006                 ctx->stashed_inode is non-zero.
2007
2008         * pass1b.c (pass1b): Use e2fsck_use_inode_shortcuts() to disable
2009                 the inode shortcut processing, instead of manually
2010                 clearing only half of the function pointers that needed to
2011                 be NULL'ed out.  This caused nasty bugs if the last inode
2012                 in the filesystem needed dup block processing.
2013                 
2014         * pass1b.c (clone_file_block): When cloning a directory's metadata
2015                 block, don't try to update the directory block list
2016                 database, since indirect blocks aren't stored in the
2017                 database and the resulting error will abort the file clone
2018                 operation.
2019
2020 2001-05-25  Theodore Tso  <tytso@valinux.com>
2021
2022         * Release of E2fsprogs 1.20
2023
2024 2001-05-25  Theodore Tso  <tytso@valinux.com>
2025
2026         * journal.c (e2fsck_journal_reset_super): Remove extraneous line
2027
2028 2001-05-23  Theodore Tso  <tytso@valinux.com>
2029
2030         * journal.c (e2fsck_journal_reset_super): Fix bug; the reset
2031                 journal wasn't getting written out to disk since the dirty
2032                 bit wasn't being set on the buffer.
2033                 (e2fsck_journal_load): Don't print an error message if the
2034                 journal version number is wrong; just return a error code
2035                 reflecting this fact.  If the block type in the journal
2036                 superblcok is obviously not a version number, report the
2037                 journal is corrupted.
2038                 (e2fsck_check_ext3_journal): On an unsupported journal
2039                 version, prompt to abort by default, but then offer a
2040                 chance to clear the journal as corrupt.
2041
2042         * problem.c, problem.h (PR_0_JOURNAL_UNSUPP_VERSION): Added new
2043                 problem code.
2044
2045 2001-05-14  Theodore Tso  <tytso@valinux.com>
2046
2047         * pass1.c: Treat inodes with a low dtime (that were from a
2048                 corrupted orphan list) specially.
2049
2050         * problem.c, problem.h: Add new problem codes PR_1_LOW_DTIME and
2051                 PR_1_ORPHAN_LIST_REFUGEES, and a new latch group,
2052                 PR_LATCH_LOW_DTIME.
2053
2054         * problemP.h: Expand the size of the problem flag to be an int
2055                 instead of a short.  Expand space in the flag word which
2056                 is reserved for problem latch flags from 3 bits to 8 bits.
2057
2058         * e2fsck.h, scantest.c: Change location of ext2_fs.h to be
2059                 ext2fs/ext2_fs.h
2060
2061         * super.c (check_super_block): Be more strict on checking
2062                 s_r_blocks_count superblock field.
2063
2064 2001-05-13  Theodore Tso  <tytso@valinux.com>
2065
2066         * problem.c, problem.h (PR_0_JOURNAL_UNSUPP_ROCOMPAT, 
2067                 PR_0_JOURNAL_UNSUPP_INCOMPAT, PR_0_JOURNAL_RESET_COMPAT):
2068                 New problem codes.      
2069
2070         * journal.c (e2fsck_journal_load): Use a problem code to
2071                 report unsupported feature flags.  There is code to
2072                 clear unsupported flags, but since this is dangerous,
2073                 it's not allowed in the problem code table.
2074         
2075 2001-05-11  Andreas Dilger  <adilger@turbolinux.com>
2076
2077         * journal.c (e2fsck_journal_reset_super): initialize the journal
2078                 sequence number to a random value to avoid recovering
2079                 bad transactions from a corrupt journal.
2080
2081 2001-05-13  Theodore Tso  <tytso@valinux.com>
2082
2083         * journal.c: Code cleanup; initialize journal_enable_debug using
2084                 an initializer.
2085
2086 2001-05-12  Theodore Tso  <tytso@valinux.com>
2087
2088         * unix.c (PRS): Skip validation of -C's file descriptor if it is
2089                 zero, since that is special case.
2090
2091 2001-05-09  Theodore Tso  <tytso@valinux.com>
2092
2093         * super.c (release_orphan_inodes): Add gettext quoting around
2094                 "Truncating" and "Clearing" for i18n.
2095
2096 2001-05-05  Theodore Tso  <tytso@valinux.com>
2097
2098         * util.c (fatal_error): Use the correct magic number when checking
2099                 the magic number for the io_channel data structure.  Also
2100                 remove extraneous call to io_channel_flush() that was left
2101                 over from an editing session.
2102
2103         * pass2.c (check_dir_block): Ignore EXT2_ET_DIR_CORRUPTED errors
2104                 from ext2fs_read_dir_block().
2105
2106 2001-05-01  Theodore Tso  <tytso@valinux.com>
2107
2108         * unix.c (PRS): Validate the completion information file
2109                 descriptor so that the completion bar won't get
2110                 accidentally written onto the disk.
2111
2112         * e2fsck.8.in: Add explanation that you can use mke2fs -n -b
2113                 blocksize to printout alternate superblock locations.
2114
2115 2001-04-26  Theodore Tso  <tytso@valinux.com>
2116
2117         * unix.c (check_if_skip): If the max_mount_count is zero, treat it
2118                 as having no count set.
2119
2120 2001-04-16  Theodore Tso  <tytso@valinux.com>
2121
2122         * super.c (check_super_block): Fix bad calculation of
2123                 inodes_per_block, and tighten min/max checks to be a bit
2124                 more paranoid.  Thanks to Andreas Dilger for pointing out
2125                 this bug.
2126
2127 2001-03-29  Theodore Tso  <tytso@valinux.com>
2128
2129         * journal.c (mark_buffer_uptodate): Add emulation of kernel
2130                 function mark_buffer_uptodate.
2131
2132         * recovery.c, revoke.c: Synchronize with 0.6b ext3 files.
2133
2134 2001-02-12  Theodore Tso  <tytso@valinux.com>
2135
2136         * journal.c (e2fsck_run_ext3_journal): Force a flush of the
2137                 filesystem and io_channel before replaying the journal.
2138
2139 2001-01-17  Theodore Ts'o  <tytso@valinux.com>
2140
2141         * pass1.c (check_blocks): Fix large file checking code so that
2142                 files > 2GB are considered large files, and restrict
2143                 directories from being > 2GB.
2144
2145 2001-01-12  Theodore Ts'o  <tytso@valinux.com>
2146
2147         * journal.c (e2fsck_journal_fix_unsupported_super): Remove unused
2148                 function.  Add FIXME notes to e2fsck_get_journal(), from
2149                 Andreas Dilger.
2150
2151         * pass1.c (e2fsck_pass1): Cap the maximum legal size of a file by
2152                 the limit caused by the fact that i_blocks is in 512 byte
2153                 units, and that the Linux buffer cache also fundamentally
2154                 assumes 512 byte sectors.  
2155                 Make sure that the journal inode is a regular file, and
2156                 when clearing an unused journal inode, make sure the
2157                 icount db is updated.
2158         
2159         * problem.c, problem.h (PR_1_JOURNAL_BAD_MODE): Add new problem code.
2160
2161         * problem.c: For PR_1_RESERVED_BAD_MODE, print a description of
2162                 the reserved inode.  In PR_0_JOURNAL_HAS_JOURNAL, prompt
2163                 to clear the journal, rather than deleting it (which is
2164                 more accurate).  (From Andreas Dilger.)
2165
2166         * journal.c: Make sure all functions which return an error code
2167                 use the errcode_t return type, and not "int"
2168                 (e2fsck_journal_release): Add new parameter, "drop",
2169                 which is used when we just want to deallocate the journal
2170                 without trying to write out any changes.
2171                 (mark_buffer_clean): New function
2172                 (e2fsck_check_ext3_journal): If we fail loading the
2173                 journal, make sure we free all memory associated with it.
2174                 (recover_ext3_journal): If we fail to load the journal or
2175                 initialize the revoke data structures, make sure we free all
2176                 memory associated with the journal.
2177
2178         * message.c (special_inode_name): Add more special inode names
2179                 (From Andreas Dilger)
2180
2181         * util.c (fatal_error): Check to make sure the io_manager data
2182                 structure is sane before trying to flush the io_channel.
2183                 (From Andreas Dilger)
2184
2185         * mtrace.h, super.c, pass2.c: Minor whitespace cleanups, from
2186                 Andreas Dilger.
2187
2188         * journal.c (e2fsck_journal_fix_bad_inode): Set pctx->ino to the
2189                 bad journal number.
2190
2191         * problem.c (PR_0_JOURNAL_BAD_INODE): Use pctx->ino instead of
2192                 pctx->num when printing the bad journal inode number.
2193
2194 2001-01-11    <tytso@snap.thunk.org>
2195
2196         * pass1.c (process_block): Remove dead code which was never
2197                 getting executed.
2198
2199         * iscan.c, unix.c, e2fsck.h: Don't use NOARGS, and use
2200                 ext2fs_sync_device() instead of using BLKFLSBUF.
2201
2202         * flushb.c: Don't use NOARGS anymore; everything is STDC these days.
2203         
2204         * dirinfo.c, e2fsck.h, emptydir.c, iscan.c, jfs_user.h, journal.c,
2205                 message.c, pass1.c, pass1b.c, pass2.c, pass3.c, pass4.c,
2206                 pass5.c, problem.h, scantest.c, super.c, swapfs.c: Change
2207                 ino_t to ext2_ino_t.
2208
2209 2001-01-09    <tytso@snap.thunk.org>
2210
2211         * problem.c: Fix another broken @F vs @f problem.
2212
2213 2001-01-06    <tytso@snap.thunk.org>
2214
2215         * journal.c, pass1.c, pass1b.c, pass3.c, recovery.c, revoke.c,
2216                 super.c, unix.c, util.c: Fix random gcc -Wall complaints.
2217
2218         * jfs_user.h: Use more sophisticated inline handling to allow
2219                 building with --enable-gcc-wall
2220
2221 2001-01-03    <tytso@snap.thunk.org>
2222
2223         * pass1.c (e2fsck_pass1): Moved journal inode handling out to its
2224                 own block; if the journal inode is not in use, and it
2225                 contains data, offer to clear it.
2226
2227         * problem.h, problem.c (PR1_JOURNAL_INODE_NOT_CLEAR): Add new
2228                 problem code.
2229
2230         * problem.c: Modified problem table to use a new abbreviations.
2231
2232         * message.c: Add @j abbreviation for journal, and @v abbreviation
2233                 for device.
2234
2235         * jfs_user.h: Moved contents of jfs_e2fsck.h into jfs_user.h.
2236
2237         * journal.c (e2fsck_check_ext3_journal): Force a fsck if we remove
2238                 the journal stored on a reserved inode.  Also force a fsck
2239                 if the journal appears to exist while !NEEDS_RECOVERY, and
2240                 we forcibly reset the journal.
2241
2242 2001-01-01    <tytso@snap.thunk.org>
2243
2244         * journal.c, pass1.c, super.c, unix.c: Replace use of struct
2245                 ext2fs_sb with struct ext2_super_block.
2246
2247         * pass1.c (check_blocks): Remove use of EXT2_HAS_*_FEATURE macros.
2248
2249 2000-12-31    <tytso@snap.thunk.org>
2250
2251         * jfs_compat.h: Remove uneeded header file.
2252
2253 2000-12-30    <tytso@snap.thunk.org>
2254
2255         * malloc.h, mtrace.c: Renamed malloc.h to mtrace.h to avoid
2256                 conflicts with the system header file.
2257
2258         * problem.h: Fixed numbering of pass1 error messages; an extra 0
2259                 had slipped into some of the numbers.  (Pointed out by
2260                 Andreas Dilger)
2261
2262         * journal.c (e2fsck_journal_fix_corrupt_super): Clean up
2263                 unnecessary automatic variable.  Add explanatory comment
2264                 about the kernel emulation routines.  (Suggested by
2265                 Andreas Dilger)
2266
2267 2000-12-13  Theodore Ts'o  <tytso@valinux.com>
2268
2269         * journal.c (e2fsck_check_ext3_journal): Check to make sure the
2270                 journal fields are consistent if any of the superblock
2271                 fields are set.  (Backs out erroneous change made by sct,
2272                 pointed out by Andreas.)
2273
2274         * unix.c (main): Clarify coments (no code changes)
2275
2276         * super.c (release_orphan_inodes): Fix spelling typo in error message.
2277
2278         * pass1.c (e2fsck_pass1): Offer to update the filesystem revision
2279                 level if we need to set large files flag.  Patch from
2280                 Andreas Dilger.
2281
2282         * super.c (check_super_block): If we have any of the compatibility
2283                  flags set, we need to have a revision 1 filesystem.  Most
2284                  kernels will not check the flags on a rev 0 filesystem
2285                  and we may have corruption issues because of the
2286                  incompatible changes to the filesystem.  Patch from Andreas
2287                  Dilger.
2288
2289         * problem.c, problem.h (PR_0_FS_REV_LEVEL, PR_1_FS_REV_LEVEL): Add
2290                 new problem codes.
2291
2292 2000-12-09    <tytso@snap.thunk.org>
2293
2294         * flushb.c: Fix flushb so that it does something other than waste
2295                 disk space when built on systems with modern header files
2296                 and add a non-subtle Copyright Licensing restriction so
2297                 Yann will remove it from the Debian Distribution.  (Now
2298                 violates the Debian Free Software Guidelines, on purpose.)
2299
2300         * journal.c (e2fsck_check_ext3_journal): If JFS_DEBUG is defined
2301                 at the top level, set the JFS debuging level to 2.
2302
2303         * jfs_e2fsck.h, jfs_user.h: Replaces jfs_compat.h.  The jfs.h file
2304                 has been moved to the include/linux directory.
2305
2306         * journal.c, revoke.c, recovery.c: Updated files from Stephen to
2307                 support the V2 superblock and revoke processing.  The
2308                 journal.c and revoke.c files are copies from the ext3
2309                 kernel source.
2310
2311         * Makefile.in: Added revoke.c to the list of source/object files.
2312
2313 2000-11-16  Theodore Ts'o  <tytso@valinux.com>
2314
2315         * pass1b.c: Change routines to use PR_1B_BLOCK_ITERATE when
2316                 reporting problems rather than using com_err directly.
2317
2318         * problem.c, problem.h (PR_1B_BLOCK_ITERATE): Add new problem code.
2319
2320         * message.c (expand_percent_expression): Add safety check.  If
2321                 ctx->str is NULL, print "NULL" instead of dereferencing
2322                 the null pointer.
2323
2324         * pass1b.c, pass2.c, pass3.c: Change calls to ext2fs_block_iterate
2325                 to ext2fs_block_iterate2, to support 64-bit filesizes and
2326                 to speed things up slightly by avoiding the use of the
2327                 ext2fs_block_iterate's compatibility shim layer.
2328
2329 2000-10-30    <tytso@snap.thunk.org>
2330
2331         * util.c (get_backup_sb): Calculate backup superblock correctly
2332                 when the blocksize is > 1k.
2333
2334 2000-10-26    <tytso@snap.thunk.org>
2335
2336         * jfs.h, jfs_compat.h, journal.c: Updated to include the
2337                 definition of the new journal superblock format; still
2338                 only supports V1 superblocks for now.  (From sct)
2339
2340 2000-10-24    <tytso@snap.thunk.org>
2341
2342         * super.c (release_inode_block, release_inode_blocks,
2343                 release_orphan_inodes): Add code to deal with truncating
2344                 inodes which are still in use (but which are on the orphan
2345                 list because they need truncation).
2346
2347         * problem.c, problem.h: Rename PR_0_CLEAR_ORPHAN_INODE to
2348                 PR_0_ORPHAN_CLEAR_INODE, and remove
2349                 PR_0_ORPHAN_INODE_INUSE.
2350         
2351         * journal.c (e2fsck_run_ext3_journal): Add i18n support, and print
2352                 a message when the journal is being recovered.
2353
2354         * pass1.c (e2fsck_pass1): Don't check the i_mode field for the
2355                 journal inode, if it is in use.
2356
2357 2000-09-12    <tytso@valinux.com>
2358
2359         * extend.c: 
2360         * flushb.c: Add include of nls-enable.h which is necessary so that
2361                 they can compile correctly.
2362
2363 2000-08-22    <tytso@valinux.com>
2364
2365         * unix.c (main): If we're doing a read-only check, skip the
2366                 journal playback, but don't abort the e2fsck run.
2367
2368         * super.c (release_orphan_inodes): Fix typo; should do bounds
2369                 checking on next_ino instead of ino.
2370
2371         * jfs_compat.h (J_ASSERT): 
2372         * journal.c (e2fsck_run_ext3_journal): 
2373         * pass3.c (adjust_inode_count): Use fatal_error() instead of exit().
2374
2375         * unix.c: Use fatal_error() instead of exit() whenever possible.
2376                 Also fix the fsck exit codes so that we use FSCK_USAGE
2377                 when it is appropriate.  Rename global_signal_ctx to
2378                 e2fsck_global_ctx and let it be exported globally.
2379
2380         * util.c (fatal_error): Try to flush the I/O manager before
2381                 forcing an exit.
2382
2383 2000-08-20    <tytso@valinux.com>
2384
2385         * journal.c (e2fsck_journal_load): Fix **nasty** bug which caused
2386                 e2fsck_check_ext3_journal to smash the journal because
2387                 journal->j_transaction_sequence wasn't getting
2388                 initialized.
2389
2390         * journal.c: (recover_ext3_journal, e2fsck_run_ext3_journal): Move
2391                 call to e2fsck_clear_recover from recover_ext3_journal to
2392                 after the filesystem has been closed and reopened.
2393                 Otherwise, the superblock in the filesystem handle will
2394                 probably be stale, and will overwrite the newer version of
2395                 the superblock written by the log recovery.
2396
2397         * message.c (expand_inode_expression): Add support for %Iu and %Ig
2398
2399         * problem.h (PR_0_CLEAR_ORPHAN_INODE): Add new problem code.
2400
2401         * super.c (release_orphan_inodes, release_inode_block,
2402                 release_inode_blocks): Update the block group descriptor
2403                 counts when freeing the orphan inode.  Use
2404                 PR_0_CLEAR_ORPHAN_INODE to report when we clear an orphan.
2405
2406         * journal.c (e2fsck_run_ext3_journal): Fix a bug where we
2407                 attempted to reopen the filesystem using the device name
2408                 instead of the filesystem name.
2409
2410 2000-08-18    <tytso@valinux.com>
2411
2412         * Makefile.in: Update the make dependencies
2413         
2414         * problem.c, problem.h: Add the problem codes: 
2415                 PR_0_ORPHAN_ILLEGAL_BLOCK_NUM, 
2416                 PR_0_ORPHAN_ALREADY_CLEARED_BLOCK, 
2417                 PR_0_ORPHAN_ILLEGAL_HEAD_INODE, 
2418                 PR_0_ORPHAN_ILLEGAL_INODE, PR_0_ORPHAN_INODE_INUSE
2419
2420         * super.c (release_inode_blocks, release_orphan_inodes,
2421                 check_super_block): Add support for clearing orphaned
2422                 inodes from the unmounted filesystem.
2423
2424         * journal.c (e2fsck_recover_ext3_journal): Remove the last orphan
2425                 check; this is now handled in check_super_block ---
2426                 non-journaled filesystems can use the orphan list in the
2427                 future.  Also, move the the re-opening of the filesystem
2428                 to e2fsck_run_ext3_journal().
2429
2430 2000-07-12  Andreas Dilger <adilger@turbolinux.com>
2431
2432         * journal.c: implement loading of ext3 journal for recovery code
2433
2434         * problem.c (fix_problem): return answer from PR_AFTER_CODE to caller.
2435                 Add journal problems.
2436
2437         * recovery.c (journal_recover): user-space ext3 journal recovery code
2438
2439         * unix.c (main) : check journal and do recovery in separate steps
2440
2441 2000-08-07    <tytso@snap.thunk.org>
2442
2443         * unix.c (calc_percent): Make sure that we don't take a floating
2444                 exception if the max value is zero.  (should normally
2445                 never happen, but...)
2446
2447 2000-07-13    <tytso@valinux.com>
2448
2449         * Release of E2fsprogs 1.19
2450
2451 2000-07-06  Theodore Ts'o  <tytso@valinux.com>
2452
2453         * unix.c (check_if_skip): Modify algorithm for checking
2454                 s_max_mnt_count to match with the kernel.  (If
2455                 s_max_mnt_count is negative, ignore the mnt_count check.)
2456
2457         * unix.c (e2fsck_update_progress): Adjust the width of the
2458                 progress bar dynamically, based on the filesystem name
2459                 that we need to display.
2460
2461         * unix.c (main): If the ext3 needs_recovery flag is set, call
2462                 e2fsck_run_ext3_journal() and then restart the e2fsck run.
2463
2464         * journal.c (e2fsck_run_ext3_journal): New file which contains
2465                 logic to recover the ext3 journal.  This version relies on
2466                 the kernel being able to mount the filesystem in order to
2467                 run the journal.
2468
2469 2000-07-05  Theodore Ts'o  <tytso@valinux.com>
2470
2471         * unix.c (e2fsck_update_progress): Only save and check the last
2472                 percentage after multiplying it by 10, nor 1000, since we
2473                 only need to save values to a tenth of a percent (and the
2474                 percentage is already from 0 .. 100%, not 0 .. 1).
2475                 Also, re-arrange the logic so that we do the time
2476                 check only after doing the percentage check, and we
2477                 only advance the spinner if we're about to display it.
2478
2479 2000-07-04  Theodore Ts'o  <tytso@valinux.com>
2480
2481         * pass1.c (e2fsck_pass1): Check to see if the ext3 s_last_orphan
2482                 field is set; if so, clear it, so that ext3 mounting code
2483                 won't get confused by the fact that we've cleared out the
2484                 orphaned inodes.
2485
2486 2000-06-10  Theodore Ts'o  <tytso@valinux.com>
2487
2488         * pass5.c (check_block_bitmaps, check_inode_bitmaps): Add error
2489                 checking for a "should never happen case".
2490
2491         * problem.c, problem.h (PR_5_COPY_IBITMAP_ERROR,
2492                 PR_5_COPY_BBITMAP_ERROR): Add new error codes.
2493
2494 2000-05-27  Theodore Ts'o  <tytso@valinux.com>
2495
2496         * pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
2497                 (cw@foof.org) which checks to see if special devices have
2498                 a non-zero size, and deals with it.
2499
2500         * problem.c, problem.h (PR1_SET_NONZSIZE): Add new problem code.
2501
2502 2000-05-18  Theodore Ts'o  <tytso@valinux.com>
2503
2504         * Makefile.in (install): Create a symbolic link for fsck.ext3 as
2505                 well.
2506
2507 2000-05-08  Theodore Ts'o  <tytso@valinux.com>
2508
2509         * problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem
2510                 code. 
2511
2512         * super.c (check_super_block): If the OS type in the superblock is
2513                 the Hurd, check to see if the filetype feature is set, and
2514                 offer to clear it if so.   This needs to be done since the
2515                 Hurd doesn't properly support the filetype feature.
2516                 (And since the hurd allows the transmogrification of files
2517                 to special files and vice versa --- for no good reason
2518                 that I can understand --- it can't support the filetype
2519                 feature for the forseeable future, either.)
2520
2521 2000-04-03  Theodore Ts'o  <tytso@valinux.com>
2522
2523         * unix.c: For platforms that don't define optarg.h, manually
2524                 define optarg and optind.
2525
2526 2000-03-20  Theodore Ts'o  <tytso@valinux.com>
2527
2528         * pass1.c (check_immutable, e2fsck_pass1_check_device_inode):
2529                 Check for the append-only as well as the immutable flag.
2530
2531         * problem.c (PR_1_SET_IMMUTABLE): Adjust message to include
2532                 append-only flag.   Fix comment for compression flag.
2533         
2534 2000-02-12    <tytso@snap.thunk.org>
2535
2536         * unix.c (e2fsck_update_progress): Limit the number of updates to
2537                 the progress bars to 8 times a second.  This allows a 9600
2538                 baud console link to keep up.
2539
2540 2000-02-11    <tytso@snap.thunk.org>
2541
2542         * unix.c (main): If compression is enabled on the filesystem,
2543                 print a warning message (for now).
2544
2545         * message.c: Add new compression shortcut: @c == compress
2546
2547         * problem.c, problem.h (PR_1_COMPR_SET): Add new error code.
2548
2549         * pass1.c (check_blocks): If the inode has EXT2_COMPRBLK_FL flag
2550                 set, check to see if the filesystem supports compression.
2551                 If it does pass this information down to process_block()
2552                 so it can treat the compressed block flag words
2553                 correctly.  If not, offer to clear the flag, since it
2554                 shouldn't be set.  
2555                 (process_block): If an inode has the compressed inode flag
2556                 set, allow EXT2FS_COMPRESSED_BLKADDR.
2557
2558         * pass1b.c (process_pass1b_block, delete_file_block,
2559                 clone_file_block):
2560         * pass2.c (deallocate_inode_block): Use HOLE_BLKADDR to check to
2561                 see if the block can be skipped.
2562
2563 2000-02-08    <tytso@snap.thunk.org>
2564
2565         * util.c: Make resource tracking message more concise.
2566
2567         * e2fsck.h:
2568         * pass1.c (mark_table_blocks, e2fsck_pass1): Remove
2569                 ctx->block_illegal_map, since it's not needed by pass1,
2570                 and pass1b has been modified to calculate it manually if
2571                 needed.   This reduces the memory footprint needed by e2fsck.
2572
2573         * pass1b.c (check_if_fs_block): New static function which returns
2574                 whether or not a block overlaps with filesystem metadata.
2575                 This replaces consulting the block_illegal_map bitmap.
2576
2577         * Makefile.in: Call sync after finishing building all in this
2578                 directory. 
2579         
2580         * unix.c (PRS): sync the filesystem before trying to use
2581                 BLKFLSBUF, to minimize the chance of causing dirty blocks
2582                 to get dropped.
2583
2584         * e2fsck.h: Manually define BLKFLSBUF if not defined, and we're on
2585                 a Linux/i386 system.
2586         
2587         * pass3.c (check_directory): Only do the loop detection algorithm
2588                 if we've searched over 2048 parent directories and haven't
2589                 found the end yet.  This means that in the common case, we
2590                 don't allocate or clear the inode_loop_detection bitmap,
2591                 which for large systems, merely clearing the bitmap for
2592                 each directory was turning out to be quite expensive.
2593                 Thanks to Jani Jaakkola (jjaakkol@cs.helsinki.fi) for
2594                 identifying this problem.
2595
2596 2000-02-06  Theodore Ts'o  <tytso@valinux.com>
2597
2598         * badblocks.c, e2fsck.h, ehandler.c, emptydir.c, extend.c,
2599                 flushb.c, iscan.c, message.c, pass1.c, pass1b.c, pass3.c
2600                 pass4.c, pass5.c, problem.c, scantest.c, swapfs.c, 
2601                 unix.c, util.c: Add Internationalization support as 
2602                 suggested by Marco d'Itri <md@linux.it>.
2603
2604 2000-02-02  Theodore Ts'o  <tytso@valinux.com>
2605
2606         * e2fsck.h, flushb.c, scantest.c: Remove uneeded include of
2607                 linux/fs.h 
2608
2609 2000-01-18  Theodore Ts'o  <tytso@valinux.com>
2610
2611         * Makefile.in: Since LIBUUID can sometimes include "-lsocket"
2612                 we need a separate DEPLIBUUID that can be used in
2613                 Makefile's dependency rules.
2614
2615 1999-11-23    <tytso@valinux.com>
2616
2617         * e2fsck.8.in: Update language about where to find a backup
2618                 superblock.
2619
2620 1999-11-19    <tytso@valinux.com>
2621
2622         * pass1.c (process_inodes): Add shortcut handling; if
2623                 process_inodes_count is zero, return right away, to avoid
2624                 calling qsort with a non-positive count.
2625
2626         * message.c (safe_print): Fix to properly display ^A, ^B, etc. and
2627                 to print Delete as ^?
2628
2629         * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
2630                 the source directory.
2631
2632 1999-11-10    <tytso@valinux.com>
2633
2634         * Release of E2fsprogs 1.18
2635
2636 1999-11-10    <tytso@valinux.com>
2637
2638         * problem.c (fix_problem): Support a new flag, PR_PREEN_NO which
2639                 means the answer is assumed to be no in preen mode.  This
2640                 is now used in the PR_1_SET_IMMUTABLE code, so that in
2641                 preen mode we ignore these inodes and just print a warning
2642                 message. 
2643
2644 1999-11-09    <tytso@valinux.com>
2645
2646         * pass1.c (e2fsck_pass1): If the filesystem does not support
2647                 imagic inodes, if an inode has the imagic flag set, offer
2648                 to clear the imagic flag.  If a valid device/fifo/socket
2649                 has the immutable flag set, call the new helper function
2650                 check_immutable() to offerto clear the immutable flag.
2651
2652         * pass2.c (check_filetype): Use the new ext2_file_type() helper
2653                 function instead of calculating the file_type information
2654                 manually.
2655
2656         * pass3.c (e2fsck_reconnect_file): When adding a link to
2657                 lost+found, calculate the filetype information so that
2658                 ext2fs_link() can use the information if applicable.
2659                 (get_lost_and_found): Create the /lost+found directory
2660                 with the correct filetype information if applicable.
2661
2662         * util.c (ext2_file_type), e2fsck.h: New function which returns
2663                 the directory entry file type information given the
2664                 inode's mode bits.
2665
2666         * problem.c, problem.h: Added new problem codes PR_1_SET_IMAGIC
2667                 and PR_1_SET_IMMUTABLE.
2668
2669 1999-11-07    <tytso@valinux.com>
2670
2671         * pass4.c (e2fsck_pass4): Clear inode_imagic_map after freeing it,
2672                 to prevent it from getting freed twice.
2673
2674 1999-11-06    <tytso@valinux.com>
2675
2676         * unix.c (main): Close the filesystem before freeing the context,
2677                 so that in the event of a free()-related segmentation
2678                 violation, the filesystem is properly closed and written
2679                 out.
2680
2681 1999-10-27    <tytso@valinux.com>
2682
2683         * e2fsck.c (e2fsck_reset_context): When freeing
2684                 ctx->inode_reg_map, we weren't zero'ing
2685                 ctx->inode_reg_map, which could cause a segfault later on
2686                 in the e2fsck run.
2687
2688 1999-10-26    <tytso@valinux.com>
2689
2690         * problem.h (PR_2_SPLIT_DOT): Fix excess zero in problem code (now
2691                 matches the standard convention).
2692
2693 1999-10-26    <tytso@valinux.com>
2694
2695         * Release of E2fsprogs 1.17
2696
2697 1999-10-26    <tytso@valinux.com>
2698
2699         * message.c (safe_print): Make safe_print take an char instead of
2700                 an unsigned char to fix gcc warnings.
2701
2702 1999-10-25    <tytso@valinux.com>
2703
2704         * util.c: For NT portability, don't redefine getchar(), since
2705                 stdio defines that.  Instead we introduce a new
2706                 abstract macro read_a_char() which is #defined to the
2707                 right function as necessary.
2708
2709         * problem.c, problem.h (PR_2_NULL_NAME): Add new problem code.
2710
2711         * pass2.c (check_dir_block): Require that the length of the
2712                 directory entry be at least 12 bytes.  Check to see if the
2713                 filename is zero-length, and flag that as an error.
2714
2715 1999-10-22    <tytso@valinux.com>
2716
2717         * Release of E2fsprogs 1.16
2718
2719 1999-10-22    <tytso@valinux.com>
2720
2721         * pass2.c (check_filetype): If the filetype filesystem feature is
2722                 not set, and a directory entry has a dirent feature, offer
2723                 to clear it (since 2.0 kernels will do complain will
2724                 interpret it as a very large name length field).
2725
2726         * problem.c (PR_2_CLEAR_FILETYPE): Add new problem code.
2727
2728 1999-10-21    <tytso@valinux.com>
2729
2730         * e2fsck.8.in: Update man page to use a more standard format (bold
2731                 option flags and italicized variables), as suggested by
2732                 Andreas Dilger (adilger@enel.ucalgary.ca)
2733
2734         * pass4.c (e2fsck_pass4): If an inode is set in the
2735                 inode_imagic_map bitmap, don't check to see if it is
2736                 disconnected from the inode tree (because it almost
2737                 certainly will be).  Free inode_imagic_map at the end of
2738                 pass 4.
2739
2740         * pass2.c (check_dir_block, check_filetype): If the FILETYPE
2741                 feature is set, check the directory entry's filetype
2742                 information field, and fix/set it if necessary.
2743                 (e2fsck_pass2): Free the inode_reg_map bitmap at the end
2744                 of pass 2.
2745
2746         * pass1.c (e2fsck_pass1, alloc_imagic_map): Allocate and fill in
2747                 information for inode_reg_map and inode_imagic_map, which
2748                 indicates which inodes are regular files and AFS inodes,
2749                 respectively.
2750                 Since only the master superblock is written during a
2751                 restart, force that superblock to be used after a restart;
2752                 otherwise changes to the block group descriptors end up
2753                 getting ignored.
2754
2755         * problem.c, problemP.h: If e2fsck is run -n, make def_yn variable
2756                 be 0 for "no".  Add support for a new flag, PR_NO_NOMSG,
2757                 which supresses the problem message if e2fsck is run with
2758                 the -n option.
2759
2760         * problem.c, problem.h (PR_2_SET_FILETYPE, PR_2_BAD_FILETYPE): Add
2761                 new problem codes.
2762
2763         * message.c (expand_dirent_expression): Add support for %dt which
2764                 prints the dirent type information.
2765
2766         * e2fsck.c (e2fsck_reset_context): Free new bitmaps (inode_reg_map
2767                 and inode_imagic_map).
2768
2769         * e2fsck.h (e2fsck_t): Add new inode_reg_map and inode_magic_map
2770                 to the context structure.
2771         
2772 1999-09-24    <tytso@valinux.com>
2773
2774         * unix.c (PRS), util.c (ask_yn): Add #ifdef's to make
2775                 e2fsprogs easier to port to non-Unix platforms.
2776
2777 1999-09-07    <tytso@valinux.com>
2778
2779         * pass3.c (adjust_inode_count): Fix bug where we didn't keep the
2780                 internal and external inode counts in sync when we
2781                 decremented an inode whose link count was already zero.
2782                 Now we skip incrementing or decrementing both link counts
2783                 if we would cause an overflow condition.
2784                 (expand_dir, expand_dir_proc): Change where we update the
2785                 inode block count and size files so that the block count
2786                 field is updated correctly when we create an indirect block.
2787
2788 1999-08-05    <tytso@valinux.com>
2789
2790         * super.c (check_super_block): Check to see whether the
2791                 inodes_per_group value in the superblock is insanely too
2792                 high.
2793
2794 1999-08-02    <tytso@valinux.com>
2795
2796         * pass1b.c (clone_file_block): Don't clear the dup_map flag if
2797                 the block also shares data with the fs metadata when
2798                 the count drops to 1, since the block should still be
2799                 cloned, as fs metadata isn't included in the count.
2800
2801 1999-07-18  Theodore Ts'o  <tytso@valinux.com>
2802
2803         * Release of E2fsprogs 1.15
2804
2805 1999-07-19    <tytso@valinux.com>
2806
2807         * unix.c (usage): Add minimalist emergency help to the usage
2808                 message. 
2809
2810 1999-07-18    <tytso@valinux.com>
2811
2812         * unix.c: Add support for calculating a progress bar if the -C0
2813                 option is given.   The function e2fsck_clear_progbar()
2814                 clears the progress bar and must be called before any
2815                 message is issued.  SIGUSR1 will enable the progress bar,
2816                 and SIGUSR2 will disable the progress bar.  This is used
2817                 by fsck to handle parallel filesystem checks.  Also, set
2818                 the device_name from the filesystem label if it is
2819                 available. 
2820
2821         * e2fsck.h: Add new flags E2F_FLAG_PROG_BAR and
2822                 E2F_FLAG_PROG_SUPRESS.  Add new field in the e2fsck
2823                 structure which contains the last tenth of a percent
2824                 printed for the user.
2825
2826         * message.c (print_e2fsck_message): Add call to
2827                 e2fsck_clear_progbar(). 
2828
2829         * pass1.c (e2fsck_pass1):
2830         * pass2.c (e2fsck_pass2):
2831         * pass3.c (e2fsck_pass3):
2832         * pass4.c (e2fsck_pass4):
2833         * pass5.c (e2fsck_pass5): Add call to e2fsck_clear_progbar when
2834                 printing the resource tracking information.
2835
2836         * pass5.c (check_block_bitmaps, check_inode_bitmaps): If there is
2837                 an error in the bitmaps, suppress printing the progress
2838                 bar using the suppression flag for the remainder of the
2839                 check, in order to clean up the display.
2840
2841 1999-06-30    <tytso@valinux.com>
2842
2843         * unix.c (check_mount): Clean up the abort message displayed when
2844                 the filesystem is mounted and either stdout or stdin isn't
2845                 a tty.
2846
2847 1999-06-25    <tytso@valinux.com>
2848
2849         * e2fsck.h:
2850         * pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode, 
2851                 pass1_check_directory, e2fsck_use_inode_shortcuts): Make
2852                 pass1_* be private static functions, and create new
2853                 function e2fsck_use_inode_shortcuts which sets and clears
2854                 the inode shortcut functions in the fs structure.
2855
2856         * e2fsck.h:     
2857         * pass2.c (e2fsck_process_bad_inode): Make process_bad_inode() an
2858                 exported function.
2859
2860         * pass4.c (e2fsck_pass4): Call e2fsck_process_bad_inode to check
2861                 if a disconnected inode has any problems before
2862                 connecting it to /lost+found.  Bug and suggested fix by 
2863                 Pavel Machek <pavel@bug.ucw.cz>
2864
2865 1999-06-21    <tytso@valinux.com>
2866
2867         * unix.c (main): Add missing space in the disk write-protected
2868                 message. 
2869
2870 1999-05-22    <tytso@rsts-11.mit.edu>
2871
2872         * problem.c, problem.h (PR_0_INODE_COUNT_WRONG): Add new problem
2873                 code. 
2874         
2875         * super.c (check_super_block): Add check to make sure the total
2876                 number of inodes is sane, since this can be calculated
2877                 from the number of groups times the number of inodes per
2878                 group.   Offer to correct it if it is incorrect.
2879
2880 1999-03-19    <tytso@rsts-11.mit.edu>
2881
2882         * pass5.c (check_block_end): Fix fencepost condition where when
2883                 clearing the block padding we were missing the last position
2884                 in the bitmap.
2885
2886 1999-05-17    <tytso@rsts-11.mit.edu>
2887
2888         * unix.c (reserve_stdio_fds): Add safety check in case
2889                 reserve_stdio_fds couldn't open /dev/null.
2890
2891 1999-03-14  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2892
2893         * util.c (print_resource_track): Use mallinfo if present to get
2894                 more accurate malloc statistics.
2895
2896         * pass3.c (get_lost_and_found): Check to see if lost+found is a
2897                 plain file; if so, offer to unlink it.
2898
2899         * problem.c, problem.h (PR_3_LPF_NOTDIR): Add new problem code.
2900
2901 1999-03-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2902
2903         * problem.c: Fix problem message for PR_1_BAD_GROUP_DESCRIPTORS so
2904                 that the block group number is printed.  Add new prompt,
2905                 PROMPT_UNLINK.
2906
2907 1999-01-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2908
2909         * Release of E2fsprogs 1.14
2910
2911 1999-01-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2912
2913         * message.c (safe_print): New function which prints strings,
2914                 converting non-printable characters using the '^' and
2915                 M-notation.  This function is now used to print directory
2916                 name entries and pathnames.
2917
2918 Mon Jan  4 02:28:59 1999  Theodore Y. Ts'o  <tytso@mit.edu>
2919
2920         * unix.c (main): Reset the context before calling ext2fs_close(),
2921                 to avoid referencing already freed memory.
2922
2923 1998-12-15  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2924
2925         * Release of E2fsprogs 1.13
2926
2927 1998-12-03  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2928
2929         * Makefile.in: Updated dependencies.
2930
2931 1998-11-27  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2932
2933         * pass3.c (get_lost_and_found): If the filesystem is not opened
2934                 read-only, then force /lost+found to be created if it is
2935                 not present.
2936
2937         * problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen
2938                 operation. 
2939
2940 1998-10-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2941
2942         * unix.c (main): Move ext2fs_close() after e2fsck_free_context()
2943                 since e2fsck_free_context may reference data in ctx->fs.
2944
2945         * e2fsck.c (e2fsck_reset_context): Make sure ctx->fs is non-NULL
2946                 before checking ctx->fs->dblist.
2947
2948 1998-10-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2949
2950         * pass1.c (e2fsck_pass1): Use the device check subroutine on
2951                 FIFO's and Socket's, so that we catch bogus immutable inodes.
2952
2953         * pass2.c (process_bad_inode): Process bad socket and fifo's.
2954
2955         * problem.h, problem.c: Define new problem codes PR_2_BAD_FIFO and
2956                 PR_2_BAD_SOCKET.
2957
2958 1998-09-02  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2959
2960         * problem.c: Add PR_3_NO_DIRINFO error code.
2961
2962         * super.c (check_super_value): Rename min and max to min_val and
2963                 max_val to avoid possible cpp macro conflicts.
2964
2965         * pass4.c (e2fsck_pass4): Rename max to maxgroup, to avoid
2966                 possible cpp macro conflicts.
2967         
2968         * pass3.c (e2fsck_pass3): Rename max to maxdirs, to avoid possible
2969                 cpp macro conflicts.
2970                 (check_directory): Fix logic to avoid possible core dump
2971                 in the case of ext2fs_get_dir_info returning NULL.  (By
2972                 the time we get here, it should never happen, but...).
2973                 Also simply/streamline the control flow of the function.
2974
2975 1998-08-17  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2976
2977         * unix.c (check_if_skip): Move the "not cleanly mounted" check
2978                 ahead of the maximal mount and too long since checked tests.
2979                 (reserve_stdio_fds): Make sure 0,1,2 file descriptors are
2980                 open, so that we don't open the filesystem using the same
2981                 file descriptor as stdout or stderr.
2982
2983 1998-08-01  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2984
2985         * pass2.c (e2fsck_pass2): Fix the progress accounting so that we
2986                 get to 100%.
2987
2988         * pass3.c (e2fsck_pass3): Change progress accounting to be
2989                 consistent with the other e2fsck passes.                
2990
2991         * e2fsck.c (e2fsck_run): At the end of each pass, call the
2992                 progress function with the pass number set to zero. 
2993
2994         * unix.c (e2fsck_update_progress): If the pass number is zero,
2995                 ignore the call, since that indicates that we just want to
2996                 deallocate any progress structures.
2997
2998 1998-07-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2999
3000         * Release of E2fsprogs 1.12
3001
3002 1998-07-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3003
3004         * unix.c (main): Fix typo in checking the incompat feature set; it
3005                 should be checked against EXT2_LIB_FEATURE_INCOMPAT_SUPP.
3006
3007 1998-07-07  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3008
3009         * badblocks.c (test_disk): Don't clear the existing bad blocks
3010                 list when using e2fsck -c, since it may cause blocks with
3011                 marginal errors to be dropped from the bad blocks list.
3012
3013 Mon Jul  6 10:32:11 1998  Theodre Ts'o  <tytso@lurch.mit.edu>
3014
3015         * pass1.c (e2fsck_pass1): Use ext2fs_sb structure for
3016                 compatibility with older kernels.
3017
3018 1998-06-25  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3019
3020         * unix.c (e2fsck_update_progress): Remove unused variables.
3021
3022 1998-06-10  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3023
3024         * pass1.c, problem.h: Change blkcnt_t to be e2_blkcnt_t to avoid
3025                 collision with LFS API.
3026
3027         * pass1.c (e2fsck_pass1): Fix bug so that ext2_max_sizes is
3028                 properly initialized.  
3029                 (e2fsck_pass1): Don't allow the the boot loader inode to
3030                 be a directory (clear the inode mode field if so).
3031
3032 1998-05-07  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3033
3034         * unix.c (PRS): Added new option -C, which causes e2fsck to print
3035                 progress updates so that callers can keep track of the
3036                 completion progress of e2fsck.  Designed for use by
3037                 progress, except for -C 0, which prints a spinning report
3038                 which may be useful for some users.
3039
3040         * pass5.c (e2fsck_pass5): Use a finer-grained progress reporting
3041                 scheme (useful for larger filesystems).
3042
3043         * e2fsck.h: Add progress_fd and progress_pos, for use by the Unix
3044                 progress reporting functions.
3045
3046 1998-04-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3047
3048         * pass1.c (process_inode_cmp): Use EXT2_QSORT_TYPE to define the
3049                 appropriate return type for comparison functions for qsort.
3050
3051         * e2fsck.h: Add #ifdef protection for unistd.h
3052
3053         * super.c: Remove header files already included by e2fsck.h
3054
3055 1998-04-26  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3056
3057         * dirinfo.c (e2fsck_add_dir_info): Update function to pass the old
3058                   size of the memory to be resized to ext2fs_resize_mem().
3059
3060 1998-03-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3061
3062         * Makefile.in: Change to use new installation directory variables
3063                 convention.  Fix uninstall rules to take $(DESTDIR) into
3064                 account.  Remove cat8dir from the installdirs target,
3065                 since modern man package don't necessarily put the cat
3066                 directory in /usr/man/cat?.
3067
3068 1998-03-29  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3069
3070         * super.c, e2fsck.h: Always declare e2fsck_get_device_size() as an
3071                 extern in e2fsck.h to prevent -Wall warnings.
3072
3073         * pass4.c (e2fsck_pass4): Remove unused variable 'j'.
3074
3075 1998-03-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3076
3077         * super.c (check_super_block): Fix broken superblock sanity check
3078                 when calculating blocks_per_group if s_log_frag_size !=
3079                 s_log_block_size.  Since we don't support fragments, this
3080                 isn't a bug deal, but it's good to get it fixed.
3081
3082 1998-03-23  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3083
3084         * unix.c: Fix bug in check of feature set, to make sure we can
3085                 really fix this filesystem.
3086
3087         * problem.h: Make blkcount type to be of type blkcnt_t.  Make the
3088                 num field be a 64 bit type.  Add the problem code
3089                 PR_1_FEATURE_LARGE_FILES
3090
3091         * problem.c: Add table entry for the problem code
3092                 PR_1_FEATURE_LARGE_FILES.
3093
3094         * pass1.c (e2fsck_pass1): A non-zero i_dir_acl field is only
3095                 a problem for directory inodes.  (Since it is also
3096                 i_size_high now.)   If there are no large_files, then
3097                 clear the LARGE_FLAG feature flag.  If there are
3098                 large_files, but the LARGE_FLAG feature flag is not set,
3099                 complain and offer to fix it.
3100                 (check_blocks): Add support to deal with non-directory
3101                 inodes that have i_size_high set (i.e., large_files).
3102                 Don't give an error if a directory has preallocated
3103                 blocks, to support the DIR_PREALLOC feature.
3104                 (process_block, process_bad_block): The blockcnt variable
3105                 is a type of blkcnt_t, for conversion to the new
3106                 block_iterate2.
3107
3108         * pass2.c (process_bad_inode): A non-zero i_dir_acl field is only
3109                 a problem for directory inodes.  (Since it is also
3110                 i_size_high now.)
3111
3112         * message.c (expand_inode_expression): Print a 64-bits of the
3113                 inode size for non-directory inodes.  (Directory inodes
3114                 can only use a 32-bit directory acl size, since
3115                 i_size_high is shared with i_dir_acl.)  Add sanity check
3116                 so that trying to print out the directory acl on a
3117                 non-directory inode will print zero.
3118                 (expand_percent_expression): %B and %N, which print 
3119                 pctx->blkcount and pctx->num, can now be 64 bit
3120                 variables.  Print them using the "%lld" format if
3121                 EXT2_NO_64_TYPE is not defined.
3122
3123         * e2fsck.h: Add the large_flagsfield to the e2fsck context.
3124
3125         * e2fsck.c (e2fsck_reset_context): Clear the large_flags
3126                 field.
3127
3128 Sun Mar  8 23:08:08 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3129
3130         * pass3.c (fix_dotdot_proc): 
3131         * pass2.c (check_dot, check_dotdot, check_name, check_dir_block): 
3132         * message.c (expand_dirent_expression): Mask off the high eight
3133                 bits of the directory entry's name_len field, so that it
3134                 can be used for other purposes.
3135
3136 Fri Feb 27 00:01:39 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3137
3138         * e2fsck.c (e2fsck_run): Since E2F_FLAG_SIGNAL_MASK doesn't
3139                 include EXT2_FLAG_RESTART anymore, we need to adjust this
3140                 routine so that it *does* return in the case of it seeing
3141                 EXT2_FLAG_RESTART.
3142
3143         * pass1.c (e2fsck_pass1): ext2_get_next_inode() may call the group
3144                 done callback function, which may set context abort
3145                 flags.  So we need to test the context abort flags after
3146                 we call ext2_get_next_inode().
3147                 (process_inodes): If we abort due out of process_inodes,
3148                 do a clean exit by breaking out of the for loop instead of
3149                 just returning.
3150
3151         * e2fsck.h (E2F_FLAG_SIGNAL_MASK): EXT2_FLAG_RESTART shouldn't be
3152                 considered a SIGNAL mask (i.e., requiring an immediate
3153                 abort of processing to restart).  FLAG_RESTART just means
3154                 that we want to restart once pass 1 is complete.
3155
3156 Tue Feb 24 15:19:40 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3157
3158         * Change the progress function to return an integer; if returns 1,
3159                 then the progress function is expected to have set the
3160                 e2fsck context flag signalling a user abort, and the
3161                 caller should also initiate a user abort.
3162
3163 Tue Feb 17 19:03:44 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3164
3165         * pass5.c (check_block_bitmaps, check_inode_bitmaps): Don't call
3166                 end_problem_latch() unless there was actually a problem
3167                 latched.  Simplifies semantics of the latch processing.
3168
3169 Mon Feb 16 17:31:44 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3170
3171         * e2fsck.h: Add new field, priv_data to the e2fsck context
3172                 structure.  It should be used by callers of the e2fsck
3173                 functions only, and not by anything in e2fsck itself.
3174
3175 Mon Feb 7 17:31:04 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3176
3177         * super.c: Instead of call ext2fs_get_device_size(), define and call
3178                 e2fsck_get_device_size().  (This function may be stubbed
3179                 out in special versions of e2fsck.)
3180
3181         * pass3.c, pass4.c: Remove extra calls to the progress function
3182                 that weren't needed.
3183
3184         * mke2fs.8.in: Update man page to note that the format of the bad
3185                 block file is the same as the one generated by badblocks. 
3186
3187 Sun Feb  1 07:57:14 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3188
3189         * dirinfo.c, e2fsck.c: Don't include com_err.h; it isn't needed.
3190
3191         * e2fsck.h: Include <time.h> since it is needed
3192
3193         * super.c: If EXT2_SKIP_UUID is defined, then skip the UUID
3194                 processing. 
3195
3196 Tue Jan 20 15:37:01 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3197
3198         * unix.c (main): In the case where the filesystem revision is too
3199                 high, print the message about the superblock possibly
3200                 being corrupt.
3201
3202         * e2fsck.8.in: Add expanded comments about how the -b option
3203                 works. 
3204
3205 Sat Jan 17 13:02:16 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3206
3207         * e2fsck.h: If EXT2_FLAT_INCLUDES is defined, then assume all of
3208                 the ext2-specific header files are in a flat directory.
3209
3210         * dirinfo.c, ehandler.c, pass1.c, pass1b.c, pass2.c, pass5.c,
3211                 super.c, swapfs.c, unix.c: Explicitly cast all assignments
3212                 from void * to be compatible with C++.
3213
3214 Tue Jan  6 11:30:24 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3215
3216         * unix.c (sync_disk): Remove sync_disk and calls to that function,
3217                 since ext2fs_close() now takes care of this.
3218
3219 Mon Dec 29 14:45:42 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3220
3221         * pass1.c, pass1b.c, pass2.c, pass3.c, swapfs, badblocks.c,
3222                 ehandler.c, unix.c: Change use of private to be priv_data,
3223                 to avoid C++ reserved name clash.
3224
3225 Fri Nov 28 09:30:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3226
3227         * dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead
3228                 of e2fsck_get_num_dirs, which has been removed.
3229
3230 Tue Nov 25 15:54:35 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3231
3232         * Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want
3233                 to compile and install flushb.
3234
3235 Mon Nov 24 06:48:00 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3236
3237         * pass1.c (e2fsck_pass1_check_device_inode): For now, only check
3238                 to make sure the extra i_blocks in a device are cleared if
3239                 the immutable flag is set.
3240
3241         * util.c (print_resource_track): Fix typo which caused the
3242                 time/resource tracking to print "Pass 1 :" instead of
3243                 "Pass 1: ".
3244
3245 Thu Nov 20 16:02:23 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3246
3247         * pass3.c (expand_directory): Fix bug which could cause core dump
3248                 when expanding the directory, and the bitmaps hadn't yet
3249                 been read in.  Also, only use ext2fs_write_dir_block when
3250                 writing a directory block, not when writing out a fresh
3251                 indirect block.
3252
3253 Wed Nov 19 16:15:44 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3254
3255         * pass1.c (process_bad_block): Fix bug where first_block wasn't
3256                 getting incremented, which caused user to get a
3257                 "Programming error?" warning if there was a bad block in a
3258                 non-primary superblock/group_descriptor.  Also fixed
3259                 another bug so that ext2fs_bg_has_super() is consulted, to
3260                 avoid problems when using a filesystem with the
3261                 sparse_groups option set and there are bad blocks at the
3262                 beginning of a group which doesn't have a superblock.
3263
3264 Thu Nov  6 16:10:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3265
3266         * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c: Add calls to the 
3267                 progress indicator function.
3268
3269         * pass1.c (scan_callback): Add call to the progress feedback
3270                 function (if it exists).
3271
3272 Tue Nov  4 09:45:36 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3273
3274         * super.c (check_super_block): Skip the device size check if the
3275                 get_device_size returns EXT2_EXT_UNIMPLEMENTED.
3276
3277         * iscan.c (main): Don't use fatal_error() anymore.
3278
3279         * pass1b.c, swapfs.c, badblocks.c: Set E2F_FLAG_ABORT instead of
3280                 calling fatal_error(0).
3281
3282         * problem.c, pass3.c (PR_3_ROOT_NOT_DIR_ABORT, 
3283                 PR_3_NO_ROOT_INODE_ABORT): New problem codes.
3284         
3285         * problem.c, pass2.c (PR_2_SPLIT_DOT): New problem code.
3286
3287         * problem.c, pass1.c (PR_1_SUPPRESS_MESSAGES): New problem code.
3288         
3289         * problemP.h: New file which separates out the private fix_problem
3290                 data structures.
3291
3292         * util.c, dirinfo.c, pass1.c, pass1b.c, pass2.c, pass5.c, super.c,
3293                 swapfs.c util.c: allocate_memory() now takes a e2fsck
3294                 context as its first argument, and rename it to be
3295                 e2fsck_allocate_memory().
3296
3297 Mon Nov  3 14:35:29 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3298
3299         * unix.c (main): Add a special case check for the error code EROFS
3300                 and display an appropriate error message for this case.
3301
3302         * [lots of files]:  Change ext2fs_read_inode, ext2fs_write_inode
3303                 to take the e2fsck context as their first argument.
3304                 Change dir_info.c routines to take an e2fsck_context,
3305                 renamed them to start with e2fsck_ to avoid namespace
3306                 issues, and changed them to store the directory
3307                 information inside the e2fsck context.
3308                 Added e2fsck_run() which calls all of the e2fsck passes in
3309                 the correct order, and which handles the return of abort
3310                 codes.  Added abort processing, both via setjmp/longjmp
3311                 and via flags in the e2fsck context.  Use a flag in the
3312                 e2fsck context instead of the restart_e2fsck global
3313                 variable.   Change uses of free and malloc to
3314                 ext2fs_free_mem and ext2fs_get_mem.
3315         
3316 Fri Oct 31 01:12:43 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3317
3318         * pass1.c, pass3.c: Rename new error codes to _ET_ in them for
3319                 consistency.
3320
3321 Sat Oct 25 00:10:58 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3322
3323         * pass3.c (get_lost_and_found): Check error return of 
3324                 EXT2_FILE_NOT_FOUND instead of ENOTDIR
3325
3326         * pass1.c (pass1_check_directory): Return EXT2_NO_DIRECTORY
3327                 instead of ENOTDIR
3328
3329 Fri Oct 24 00:12:39 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3330
3331         * unix.c (PRS): Make the variable which getopt returns into be
3332                 an int, so that it won't lose on platforms where char is
3333                 unsigned. 
3334
3335         * pass1b.c (clone_file): Fix bug in error reporting in the case
3336                 where cs.errcode is non-zero.
3337
3338 Sun Oct 19 21:12:11 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3339
3340         * pass*.c, super.c, unix.c, util.c, e2fsck.h: Place #ifdef
3341                 RESOURCE_TRACK around code which uses init_resource_track
3342                 and print_resource_track.  (Not all systems have timeval)
3343
3344         * super.c: Remove excess #includes which are not necessary.
3345
3346         * e2fsck.h: Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H
3347
3348 Fri Oct  3 13:40:03 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3349
3350         * pass*.c, super.c: Massive changes to avoid using printf and
3351                 com_err routines.   All diagnostic messages are now routed
3352                 through the fix_problem interface.
3353
3354 Sat Sep  6 17:13:28 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3355
3356         * pass2.c (check_dir_block): Check for duplicate '.' and '..'
3357                 entries. 
3358
3359         * problem.c, problem.h: Add new problem codes PR_2_DUP_DOT and
3360                 PR_2_DUP_DOT_DOT.
3361
3362 Tue Sep  2 09:04:51 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3363
3364         * problem.c: Added new problem codes for some of the
3365                 superblock corruption checks, and for the pass header
3366                 messages.  ("Pass 1: xxxxx")
3367
3368         * util.c (print_resource_track): Now takes a description
3369                 argument. 
3370
3371 Mon Aug 25 10:23:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3372
3373         * super.c, unix.c, e2fsck.c: New files to separate out the
3374                 operating-specific operations out from e2fsck.c.  
3375                 e2fsck.c now contains the global e2fsck context management
3376                 routines, and super.c contains the "pass 0" initial
3377                 validation of the superblock and global block group
3378                 descriptors. 
3379
3380         * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c, util.c: Eliminate
3381                 (nearly) all global variables and moved them to the e2fsck
3382                 context structure.
3383
3384         * problem.c, problem.h: Added new problem codes PR_0_SB_CORRUPT,
3385                 PR_0_FS_SIZE_WRONG, PR_0_NO_FRAGMENTS,
3386                 PR_0_BLOCKS_PER_GROUP, PR_0_FIRST_DATA_BLOCK
3387
3388 Thu Aug 14 10:55:21 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3389
3390         * message.c: Add compression for the word "Illegal"
3391
3392         * problem.c: Added entries for PR_2_BAD_CHAR_DEV and
3393                 PR_2_BAD_BLOCK_DEV
3394
3395 Wed Aug 13 09:55:57 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3396
3397         * pass1.c (pass1, check_device_inode), pass2.c
3398                 (process_bad_inode): Use a more stringent test for a valid
3399                 device.
3400
3401 Sun Aug 10 18:58:02 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3402
3403         * e2fsck.c (check_mount): Add stronger warning message about the
3404                 perils of running e2fsck on a mounted filesystem.
3405
3406 Tue Jun 17 01:33:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3407
3408         * Release of E2fsprogs 1.11
3409
3410 Thu Jun 12 00:25:31 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3411
3412         * pass1.c (mark_table_blocks): Mark the superblock and group
3413                 descriptor blocks first, so that any conflicts between
3414                 these and the bitmap or inode table blocks is noticed.
3415
3416         * problem.c: Fix message printed out when a block or inode bitmap
3417                 conflicts with other fs data, has the correct group number
3418                 in it.
3419
3420 Tue Jun 10 12:07:37 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3421
3422         * pass2.c (pass2): Check the error return from ext2fs_dblist_iterate.
3423
3424 Thu May  8 22:45:27 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3425
3426         * e2fsck.8.in: Fix minor typos and grammer oops found by Bill
3427                 Hawes (whawes@star.net).
3428
3429         * badblocks.c (read_bad_blocks_file): Pass the blocksize to the
3430                 bad blocks command so that all of the filesystem gets
3431                 tested in the case where the blocksize 2048 or 4096.
3432
3433 Thu Apr 24 12:16:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
3434
3435         * Release of E2fsprogs version 1.10
3436
3437 Mon Apr 21 22:43:08 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3438
3439         * pass1b.c (pass1b): While scanning for inodes, simply skip inodes
3440                 where ext2fs_get_next_inode returns the 
3441                 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE error.
3442
3443 Thu Apr 17 12:23:38 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3444
3445         * Release of E2fsprogs version 1.09
3446
3447 Fri Apr 11 18:56:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3448
3449         * Release of E2fsprogs version 1.08
3450
3451 Thu Apr 10 13:51:16 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3452
3453         * pass1b.c (clone_file_block): If we clone a directory, we need to
3454                 update the dblist entry so that we check (and correct) the
3455                 right directory block.
3456
3457 Sun Apr  6 09:13:12 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3458
3459         * pass1.c (process_block): Don't clear blocks references to
3460                 filesystem metadata; let pass 1B handle this case.
3461
3462         * problem.c, problem.h: Add new problem, PR_1B_SHARE_METADATA.
3463
3464         * pass1b.c (pass1d): Deal with a block which is shared with
3465                 filesystem metadata.
3466
3467         * e2fsck.h: Make block_illegal_map be a global variable
3468
3469 Sat Apr  5 11:51:58 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3470
3471         * e2fsck.c, pass1.c (mark_table_blocks): Support the sparse_super
3472                 feature.
3473                 (get_backup_sb): New function which attempts to obtain the
3474                 correct backup superblock (if possible).
3475
3476 Fri Apr  4 10:46:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3477
3478         * e2fsck.c (main): Check the version of the library, and warn if
3479                 the library is out of date; this happens generally due to
3480                 users who manually install e2fsprogs.
3481
3482         * pass1.c (pass1_get_blocks): If the passed in inode number for
3483                 get_blocks isn't what we're expecting pass back
3484                 EXT2_ET_CALLBACK_NOT_HANDLED.
3485
3486 Wed Mar 12 13:32:05 1997  Theodore Y. Ts'o  <tytso@mit.edu>
3487
3488         * Release of E2fsprogs version 1.07
3489
3490 Tue Mar 11 10:31:47 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3491
3492         * icount.c: New file which implements an inode count abstraction.
3493                 This significantly reduces amount of memory needed to
3494                 check really large filesystems.
3495
3496         * pass1.c, pass2.c, pass3.c, pass4.c: Modified to use the icount
3497                 abstraction.
3498
3499 Fri Mar  7 08:28:55 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3500
3501         * dirinfo.c (dir_info_iter): New function which allows iteration
3502                 over the directories in the dir_info map.
3503
3504         * pass3.c (pass3, check_directory): Speed up pass 3 by iterating
3505                 over all directories in the dir_info structure, instead of
3506                 iterating all inodes looking for directories, and then
3507                 looking up the directories using get_dir_info().
3508
3509 Sat Feb  1 11:33:43 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3510
3511         * pass1.c (pass1, process_block): 
3512         * pass2.c (pass2): Use the ext2_dblist abstraction instead of
3513                 manual code to manage the directory block list information.
3514
3515         * pass1.c (check_blocks), pass1b.c (pass1b), pass2.c
3516                 (deallocate_inode): Call the ext2 library routine
3517                 ext2_inode_has_valid_blocks() instead of
3518                 inode_has_valid_blocks().
3519
3520         * swapfs.c (swap_inodes): Add check so that we don't try to call
3521                 swap_inode_blocks unless the inode has valid blocks.
3522                 (Otherwise a long fast symlink might cause
3523                 swap_inode_blocks to erroneously get called.)
3524
3525 Wed Jan 22 14:42:53 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3526
3527         * problem.c, problem.h: Added entries for PR_2_DOT_NULL_TERM and
3528                 PR_2_DOT_DOT_NULL_TERM.
3529
3530         * pass2.c (check_dot, check_dot_dot): Make sure the new . and
3531                 .. entries are null-terminated, since the 2.0 kernel
3532                 requires this (for no good reason).
3533
3534 Mon Jan 20 20:05:11 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3535
3536         * pass1.c (pass1): Set the EXT2_SF_SKIP_MISSING_ITABLE flag so
3537                 that we can recover from missing inode tables.
3538
3539         * dirinfo.c (get_dir_info): If there are no directories in the
3540                 dir_info abstraction, don't core dump (because dir_info is
3541                 NULL).
3542
3543         * e2fsck.c (main): Don't try using the backup superblocks if there
3544                 aren't any.
3545                 (check_super_block): If there are illegal inode table or
3546                 bitmaps, set the filesystem as being in error.
3547
3548 Wed Jan 15 11:32:01 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3549
3550         * pass2.c (check_dir_block): Added check to make sure that rec_len
3551                 is a a multiple of 4 (so that the directory entries are
3552                 4-byte aligned).
3553
3554 Sat Dec 28 12:16:32 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3555
3556         * Makefile.in (uninstall): Uninstall all programs in the PROGS
3557                 line.
3558                 (PROGS): Don't build and install the extend program by
3559                 default. 
3560         
3561
3562 Sat Dec  7 16:41:02 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3563
3564         * pass1.c (process_inodes): Make sure the stashed_ino variable is
3565                 saved and restored as well.
3566                 (pass1): For fast sym links, skip the check_blocks
3567                 processing step altogether.
3568
3569 Mon Dec  2 09:28:24 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3570
3571         * problem.c, message.c: New files, to completely refurbish how
3572                 filesystem problems are reported to the user.  The
3573                 diagnostic messages are now encoded out in an easily
3574                 customizable, extensible format.  The messages printed out
3575                 in preen mode are all on one line, and contain the device
3576                 name.
3577
3578 Fri Nov 29 20:26:08 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3579
3580         * swapfs.c (swap_inodes): When swapping a filesystem, ignore
3581                 deleted files.
3582
3583         * pass1.c (pass1): Ignore missing inode table errors during the
3584                 scan, and just skip past those inodes.
3585
3586         * pass3.c (check_root): Remove root_ino argument, and assume that
3587                 the root inode must be EXT2_ROOT_INO.  Move responsibility
3588                 of setting the parent of the root inode in the directory
3589                 inode structure to pass2().
3590
3591         * pass2.c (check_dir_block): Don't allow links to the root
3592                 directory.  
3593
3594         * dirinfo.c (add_dir_info): Remove last argument to add_dir_info,
3595                 since the inode is no longer used.
3596
3597 Tue Oct 15 00:06:49 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3598
3599         * e2fsck.c (main): If the superblock magic number is wrong, or the
3600                 block group fails a sanity check, then automatically
3601                 restart trying to use the backup superblocks.
3602
3603         * pass1.c (mark_table_blocks): Make the inode tables ahead of
3604                 everything else; in the case where a bitmap block overlays
3605                 the inode table, the inode table should take precedence.
3606
3607         * pass2.c (maybe_clear_entry): Make the deleted/unused error
3608                 message fit on one line, since the error can happen during
3609                 a preen pass.  (We eventually need to revamp the whole
3610                 e2fsck error reporting and prompting system, but that's a
3611                 job for another day.)
3612
3613 Mon Oct 14 22:29:49 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3614
3615         * e2fsck.c (main): Read in the list badblocks into fs->badblocks
3616                 for the benefit of the inode scan functions. 
3617
3618         * pass1.c (pass1): If ext2fs_get_next_inode() returns an error
3619                 indicating that an inode is in a bad block, mark that
3620                 inode as being used, as well as in the inode "bb" map.
3621
3622         * pass2.c (maybe_clear_entry): New function which generalizes the
3623                 error cases when a directory entry needs to be cleared.
3624                 (check_dir_block): If an inode is in the "bb" map, offer
3625                 to clear the directory entry, since the inode is in a bad
3626                 block.
3627
3628         * pass4.c (pass4): If an inode is marked as used, but is is marked
3629                 in the "bb" map, don't process it as a disconnected inode.
3630
3631 Tue Oct  8 02:02:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3632
3633         * Release of E2fsprogs version 1.06
3634
3635 Mon Oct  7 00:45:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3636
3637         * e2fsck.c (main): Print out the version number of the shared
3638                 library when using the -V option.
3639
3640         * swapfs.c (swap_filesys): Change EXT2_SWAP to EXT2_FLAG_SWAP for
3641                 consistency's sake.
3642
3643         * e2fsck.c (main): By setting EXT2_FLAG_MASTER_SB_ONLY, only write
3644                 out the backup superblocks when we know we have a valid
3645                 filesystem.
3646
3647 Tue Oct  1 22:00:29 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3648
3649         * util.c (preenhalt): Make it explicit on preenhalt that running
3650                 e2fsck manually means without the -a or -p flag.
3651
3652 Fri Sep 27 14:41:08 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3653
3654         * pass1.c (pass1): Add support for the EXT2_BOOT_LOADER inode.
3655                 (Linux/FT actually sets the mode bits, so we have to
3656                 handle it specially.)
3657
3658         * e2fsck.c (check_if_skip): Print a message if the filesystem is
3659                 just dirty, so that the user knows that it's about to be
3660                 checked (since this will take a while).
3661
3662 Mon Sep 16 17:00:01 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3663
3664         * pass4.c: If a disconnected inode is zero-length, prompt to
3665                 delete it instead of connecting it to lost+found.
3666
3667 Thu Sep 12 15:23:07 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3668
3669         * Release of E2fsprogs version 1.05
3670
3671 Fri Aug 30 20:24:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3672
3673         * pass4.c (pass4): If the user refuses to connect an unattached
3674                 inode to lost+found, don't try to set i_links_count.  This
3675                 is bad, since if the user says yes, the inode will be
3676                 marked as unused, which is not necessarily the right
3677                 thing, especially since the rest of the cleanup doesn't
3678                 happen here.
3679
3680         * pass2.c (deallocate_inode): Set inode_link_info[ino] when
3681                 dellocating an inode.  (Not strictly necessary, but...)
3682
3683         * pass4.c (pass4): Add "bonehead" explanation to the "programming
3684                 error" message.
3685
3686 Tue Aug 27 11:26:32 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3687
3688         * e2fsck.c (PRS,main): Added new options -s and -S.  -s will
3689                 byte-swap the filesystem so that it is normalized.  -S
3690                 will byte-swap the filesystem regardless of its current
3691                 byte-order.
3692
3693         * swapfs.c: New file, which will byte-swap a filesystem.
3694
3695 Tue Aug 20 09:41:37 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3696
3697         * pass1.c (pass1): Change handling on files with non-zero dtime
3698                 and non-zero i_link_count; before we treated them as
3699                 deleted file per botched ext2 0.3c kernel behavior.  We
3700                 now clear dtime instead.
3701
3702 Mon Aug 19 23:33:57 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3703
3704         * e2fsck.c (main): If e2fsck sets the clean bit, even if
3705                 nothing else is changed, make sure FSCK_NONDESTRUCT is
3706                 set (since after all having the filesystem set to
3707                 invalid is an error.  :-)
3708
3709 Fri Aug  9 10:25:13 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3710
3711         * pass1.c (process_block): Make sure that meta data doesn't get
3712                 accidentally set in the dir_blocks array (which could
3713                 happen in some error condtions).
3714         
3715         * pass1.c (pass1): 
3716         * pass2.c (process_bad_inode): Check for fragments in a
3717                 OS-independent fashion.
3718
3719 Thu Aug  8 15:20:54 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3720
3721         * e2fsck.c (check_if_skip): Close the filesystem when skipping the
3722                 cleanup for the filesystem.
3723
3724 Mon Jul 22 22:03:28 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3725
3726         * e2fsck.c: Improve corrupt_msg, so that it's less confusing.
3727
3728 Thu May 16 11:12:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3729
3730         * Release of E2fsprogs version 1.04
3731
3732 Wed May 15 21:41:29 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3733
3734         * e2fsck.c (relocate_hint): Issue a hint that the user may wish to
3735                 try "e2fsck -b 8193" before allowing e2fsck to relocate
3736                 inode table blocks.
3737
3738         * Makefile.in (e2fsck): Build e2fsck statically or dynamically
3739                 depending on the option to configure.  Added targets for
3740                 e2fsck.static and e2fsck.shared for people who want to
3741                 build a static or shared variant manually.
3742
3743 Wed Mar 27 00:33:40 1996    <tytso@rsts-11.mit.edu>
3744
3745         * Release of E2fsprogs version 1.03
3746
3747 Tue Mar 26 12:03:42 1996    <tytso@rsts-11.mit.edu>
3748
3749         * e2fsck.c (show_stats): Don't use floating point to display
3750                 percentage of non-contiguous files, as different libc
3751                 handle result truncation differently, and this causes the
3752                 test suite to bomb out depending on which libc you are
3753                 using.
3754
3755         * util.c (allocate_memory): Fix error message to omit extraneous
3756                 %%s.
3757
3758 Tue Mar  5 03:50:40 1996    <tytso@rsts-11.mit.edu>
3759
3760         * pass4.c (pass4): 
3761         * pass2.c (check_dir_block): 
3762         * pass1.c (pass1): Add support for dynamic first inode revision.
3763
3764 Wed Feb 14 16:27:30 1996    <tytso@rsts-11.mit.edu>
3765
3766         * pass3.c (check_root): Fix spelling typo
3767
3768 Mon Feb  5 22:30:30 1996    <tytso@rsts-11.mit.edu>
3769
3770         * e2fsck.c (check_super_block): If the superblock fails certain
3771                 internal consistency checks, exit with a fatal error after
3772                 printing the "superblock is corrupt message".
3773
3774 Wed Jan 31 11:06:08 1996    <tytso@rsts-11.mit.edu>
3775
3776         * Release of E2fsprogs version 1.02
3777
3778 Wed Dec 15 21:24:26 1996    <tytso@rsts-11.mit.edu>
3779
3780         * pass1.c (process_block): Check to see if a file is "fragmented".
3781                 i.e., non-contiguous.  Note that any file which is larger
3782                 than the block group is guaranteed to be non-contiguous.
3783                 We may want to use a different hueristic for deciding
3784                 whether or not a file is "fragmented".
3785
3786         * e2fsck.c (show_stats): Print statistics of how many
3787                 non-contiguous files are on the system.
3788
3789 Fri Dec 15 19:19:47 1995    <tytso@rsts-11.mit.edu>
3790
3791         * badblocks.c (read_bad_blocks_file, test_disk): Fold
3792                 functionality of test_disk() (which runs badblocks) into
3793                 read_bad_blocks_file(); test_disk() now calls
3794                 read_bad_blocks_file() with a NULL bad_blocks_file
3795                 argument.
3796
3797 Mon Nov 20 18:30:10 1995    <tytso@rsts-11.mit.edu>
3798
3799         * e2fsck.c (check_mount): Use #if defined(__linux__) instead of
3800                 #if defined(linux).  The latter won't work if we're
3801                 compiling -ansi.
3802
3803 Mon Oct 30 20:31:17 1995    <tytso@rsts-11.mit.edu>
3804
3805         * e2fsck.c (check_mount): For Linux systems, the check to see if
3806                 the root is mounted read-only has to be done for all
3807                 filesystems, not just for the root filesystem, due to the
3808                 way that some /etc/rc scripts are set up.
3809
3810 Thu Oct 26 12:05:30 1995    <tytso@rsts-11.mit.edu>
3811
3812         * Makefile.in (install): Strip programs when they are installed.
3813                 (e2fsck): Build e2fsck statically.
3814
3815 Wed Oct 25 21:18:16 1995    <tytso@rsts-11.mit.edu>
3816
3817         * util.c (preenhalt): Preenhalt now takes an argument, which is an
3818                 ext2fs_filsys; this allows it to set the EXT2_ERROR_FS
3819                 flag in the superblock in cases where preenhalt is called.
3820                 All calls to preenhalt() were changed to either
3821                 preenhalt(fs) or preenhalt(NULL) in a few cases where the
3822                 fs pointer was not available.  (Most notable, for block
3823                 read/write errors.)
3824
3825 Mon Sep  4 21:41:03 1995  Remy Card  <card@bbj>
3826
3827         * ehandler.c:
3828           util.c: Include <sys/time.h> before <sys/resource.h>.  BSD needs it.
3829
3830 Mon Sep  4 10:14:49 1995    <tytso@rsts-11.mit.edu>
3831
3832         * e2fsck.c (show_stats): Show statistics about how many inodes
3833                 have indirect, doubly indirect, and triply indirect
3834                 blocks.  Allow up to 8 digits for statistics, instead of
3835                 merely 6, so things look pretty for large filesystems.
3836
3837         * pass1.c (pass1): Keep statistics about indirect, doubly
3838                 indirect, and triply indirect blocks.
3839
3840         * pass1.c (unwind_pass1): Clear the above statistics when unwinding
3841                 pass 1.
3842
3843 Fri Aug 18 15:17:10 1995  Theodore Y. Ts'o  <tytso@dcl>
3844
3845         * util.c, ehandler.c: Move #include of <sys/resource.h> after
3846                 #include of "e2fsck.h", since sys/resource.h may depend on
3847                 sys/time.h, which is #included in e2fsck.h.
3848
3849 Thu Aug 17 22:33:37 1995    <tytso@rsts-11.mit.edu>
3850
3851         * e2fsck.c (check_mount):  Use the new ext2fs_check_if_mounted()
3852                 function to determine if the device is mounted.
3853
3854         * e2fsck.c (main):  Add better error messages if ext2fs_open()
3855                 fails. 
3856
3857 Wed Aug 16 16:25:02 1995    <tytso@rsts-11.mit.edu>
3858
3859         * pass1.c (check_blocks): If we're clearing a directory, clear
3860                 pb.is_dir so we don't do the following check of making
3861                 sure the directory size matches; this is pointless, since
3862                 we've already cleared the inode.
3863
3864 Fri Aug 11 09:08:54 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3865
3866         * pass1.c (bad_primary_block): New function, called by
3867                 process_bad_block, which explains the facts of life to the
3868                 user when a block in the primary superblock or primary
3869                 group descriptors is bad.
3870
3871         * pass2.c (check_dot): Handle the case where the first directory
3872                 entry is used, but not ".".
3873
3874         * pass2.c (check_dotdot): Handle the case where the second directory
3875                 entry is used, but is not "..".
3876
3877 Thu Aug 10 10:05:10 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3878
3879         * e2fsck.c (check_super_block): Get the size of the physical
3880                 device and if it is smaller than the reported size of the
3881                 filesystem, report an error.
3882
3883 Sat Aug 12 03:39:18 1995  Remy Card  <card@bbj>
3884
3885         * e2fsck.c (check_if_skip): Print the number of allocated files and
3886                 blocks on clean filesystems.
3887
3888 Fri Aug 11 14:15:36 1995  Remy Card  <card@bbj>
3889
3890         * e2fsck.8: Updated date and version number.
3891
3892 Thu Aug 10 14:26:01 1995  Remy Card  <card@bbj>
3893
3894         * pass1.c (check_blocks): Check that directory size matches *exactly*
3895                 the count of allocated blocks.
3896
3897 Wed Aug  9 21:21:24 1995  Theodore Y. Ts'o  <tytso@dcl>
3898
3899         * pass1b.c (pass1d): Free the shared[] array when we're done with
3900                 it to avoid a memory leak.
3901
3902         * pass1.c (unwind_pass1): Use ext2fs_free_block_bitmap to free the
3903                 block_dup_map.
3904
3905         * pass2.c (process_bad_inode): When clearing the inode, make sure
3906                 the pathname is freed, to prevent a memory leak.
3907
3908         * pass5.c (check_inode_bitmaps): Free free_array and dir_array
3909                 when we're finished with them.
3910                 (check_block_bitmaps): Free free_array when we're finished
3911                 with them.
3912
3913         * Makefile.in (e2fsck, flushb): Use $(LD) instead of $(CC) when
3914                 linking the executable.
3915
3916         * pass2.c (process_bad_inode): Even on OS's that don't support the
3917                 fragment fields, make sure the Linux equivalent fields are
3918                 set to zero.  If an OS wants to reuse these fields, which
3919                 is probably a bad idea (although we may get desperate in
3920                 the future) this code will have to be changed.
3921
3922         * pass1.c (dir_block_cmp): If the block numbers are equal, compare
3923                 on the inode field, and then blockcnt field.  This is just
3924                 to keep the ordering of dir_blocks the same on all
3925                 platforms when there are more than on missing directory
3926                 blocks, which are indicated directories with holes, which
3927                 are indicated with the block number being set to zero.
3928
3929 Sun Aug  6 15:40:58 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3930
3931         * pass1.c (check_blocks, process_block): check_blocks() modified
3932                 to call the ext2fs_block_iterate() with BLOCK_FLAG_HOLE if
3933                 the inode is a directory.  process_block() now checks to
3934                 see if a directory has a "hole", or missing block.  If so,
3935                 this fact is recorded in the directory block list so that
3936                 the problem can be resolved in pass #2.
3937
3938         * pass2.c (allocate_dir_block): Added allocate_dir_block() to
3939                 allocate new blocks for directories with "holes".  Called
3940                 out of check_dir_block if a block in the directory block
3941                 list is zero.
3942
3943         * pass3.c (get_lost_and_found): Move location of free(block) to
3944                 prevent possible memory leak.
3945
3946 Sat Aug  5 12:42:22 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3947
3948         * pass2.c (check_dir_block): Use a automatic, fixed-saize array
3949                 instead of alloca() --- alloca is not portable!  Check to
3950                 make sure the filename is not longer than EXT2_NAME_LEN,
3951                 and offer to fix it by truncating it, since it should
3952                 never happen.
3953
3954         * e2fsck.c (PRS): Use malloc() instead of alloca() --- alloca() is
3955                 not portable!!  In any case putenv() in some systems must
3956                 take a static character array or malloc()'ed memory;
3957                 passing memory allocated using alloca() to putenv() is not
3958                 advisable.
3959
3960         * pass2.c (check_dot, check_dotdot): Use malloc() instead of
3961                 alloca() --- alloca() is not portable!!!
3962
3963 Tue Jul 18 20:04:02 1995    <tytso@rsx-11.mit.edu>
3964
3965         * pass1b.c (pass1c): 
3966         * pass3.c (check_root, get_lost_and_found): 
3967         * pass2.c (check_dir_block): Use ext2fs_{read,write}_dir_block
3968                 to read/write the directory block.
3969
3970 Mon Jul 17 04:00:56 1995    <tytso@rsx-11.mit.edu>
3971
3972         * util.c (ask_yn): Apply patch supplied by Peter A. Zaitcev to
3973                 make sure VMIN and VTIME are set correct.
3974
3975 Fri Jul 14 19:26:29 1995    <tytso@rsx-11.mit.edu>
3976
3977         * pass1.c (mark_block_used): Change to be an inline function.
3978                 Assume that the block validity checks are already done,
3979                 and use the fast variant of the bitmap functions.
3980
3981 Thu Jul 13 08:10:55 1995    <tytso@rsx-11.mit.edu>
3982
3983         * pass5.c (check_block_bitmaps, check_inode_bitmaps): Check the
3984                 bounds of the bitmaps in advance, and then use the fast
3985                 variant of e2fs_test_{block,inode}_bitmap.
3986
3987         * pass1.c (mark_block_used): Use ext2_fast_mark_block_bitmap since
3988                 the bounds checking has already been done earlier.
3989
3990 Wed Jul 12 02:22:46 1995    <tytso@rsx-11.mit.edu>
3991
3992         * pass1.c (pass1): Allocate and free the block_illegal_map, which
3993                 is used for shortcut processing in process_block.
3994                 (mark_table_blocks): Initialize block_illegal_map with the
3995                 filesystem blocks.
3996                 (describe_illegal_block): New helper function that
3997                 describes why a block is illegal.
3998                 (process_block): Use block_illegal_map as a shortcut
3999                 to determine whether a block is bad.  Use
4000                 describe_illegal_block to print out why the block is illegal.
4001
4002 Mon Jun 12 19:11:06 1995  Theodore Y. Ts'o  (tytso@dcl)
4003
4004         * flushb.c: Don't include <linux/fs.h> if it doesn't exist.
4005
4006         * scantest.c: Don't include <linux/fs.h>, <getopt.h>, or
4007                 <mntent.h> if they don't exist.  (Mostly so that "make
4008                 depend" works.)
4009
4010         * pass1.c, pass1b.c, pass3.c, badblocks.c: Include <errno.h> (if
4011                 it exists).
4012
4013         * e2fsck.c, scantest.c: Don't include <getopt.h> if it doesn't
4014                 exist. 
4015
4016 Mon Jun 12 08:37:49 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
4017
4018         * pass2.c (process_bad_inode, check_for_zero_long,
4019                 check_for_zero_char):  Change long to u32, and char to u8.
4020
4021 Sun Jun 11 15:05:57 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
4022
4023         * util.c (inode_has_valid_blocks): 
4024         * pass2.c (process_bad_inode): 
4025         * pass1.c (pass1, check_blocks, pass1_check_directory): Use
4026                 LINUX_S_IS* instead of S_IS*.
4027
4028         * e2fsck.h: Don't #include <sys/stat.h>
4029
4030         * flushb.c (main): Add #ifdef BLKFLSBUF around ioctl.  (Although
4031                 this program is pretty much useless if BLKFLSBUF isn't
4032                 supported.)
4033
4034         * e2fsck.c, badblocks.c: Add #include <errno.h>, since errno is
4035                 used.
4036
4037 Thu Jun  8 12:31:19 1995  Miles Bader  <miles@churchy.gnu.ai.mit.edu>
4038
4039         * pass2.c (check_dot, check_dotdot, check_dir_block): Use alloca
4040         to allocate space for file names instead of using fixed size buffers.
4041         (process_bad_inode): Only check inode frag fields if
4042         HAVE_EXT2_FRAGS is defined (by configure).
4043         * pass1.c (pass1): Only check the inode frag fields if
4044         HAVE_EXT2_FRAGS is defined (by configure).
4045
4046         * e2fsck.c (check_mount): Only check for a mounted filesystem if
4047         HAVE_MNTENT_H is defined (by configure).
4048         (PRS): Use alloca to allocate the new path string, instead of
4049         having a fixed size buffer (which was the wrong size anyway).
4050         (PRS): Only support the -F (flush) option if the BLKFLSBUF ioctl
4051         is defined.
4052
4053         * e2fsck.h: Only include <linux/fs.h> if HAVE_LINUX_FS_H is
4054         defined (by configure).
4055
4056         * Makefile.in: Rewritten to conform to GNU coding standards and
4057         support separate compilation directories.
4058
4059 Thu Apr  6 15:04:36 1995  Remy Card  <card@bbj.ibp.fr>
4060
4061         * pass1.c (pass1): Test the mode in reserved inodes (must be zero).
4062
4063 Sat Mar 11 13:12:16 1995  Theodore Y. Ts'o  <tytso@localhost>
4064
4065         * pass1.c (unwind_pass1): Clear the file type statistics counter
4066                 when pass 1 needs to be restarted from scratch.
4067
4068         * pass1.c (handle_fs_bad_blocks): Fix bug where bitmap blocks were
4069                 being reallocated to blocks in the next block group,
4070                 instead of the current block grup.
4071
4072         * pass1.c (pass1, check_blocks): Set inode_link_info[ino] whenever
4073                 inode.i_links_count is set.
4074
4075 Tue Feb 14 01:38:04 1995  Theodore Y. Ts'o  (tytso@rt-11)
4076
4077         * pass1.c (process_block): Add checks for if the block is
4078                 trepassing on a superblock or group descriptor table.
4079
4080 Sat Dec 31 00:52:11 1994    <tytso@rsx-11.mit.edu>
4081
4082         * main.c (corrupt_msg): Extend the message which is printed out
4083                 when the superblock is corrupt, to include the suggestion
4084                 of using the -b option to specify an alternate superblock.
4085
4086 Thu Nov 24 09:29:58 1994  Theodore Y. Ts'o  (tytso@rt-11)
4087
4088         * badblocks.c (read_bad_blocks_file): If we are adding or
4089                 replacing bad blocks in the bad blocks inode, sanity check
4090                 the bad block inode first, and clear out any illegal blocks.
4091
4092         * pass2.c (check_name): Don't bomb out if the attempt to get the
4093                 pathname of the containing directory returns an error; the
4094                 directory may be too badly damaged to expect that
4095                 ext2fs_get_pathname will always succeed.  Use "???" if the
4096                 pathname can't be obtained (it's only for a printf to the
4097                 user anyway).
4098
4099                 The name of the containing directory and the bad filename
4100                 were incorrectly interchanged in the user message.  Fixed.
4101
4102         * pass2.c (check_name, check_dir_block): Use a common static
4103                 string for the unknown pathname.
4104
4105 Mon Nov  7 22:30:54 1994  Remy Card  <card@bbj>
4106
4107         * Fixed lots of printf formats to make sure that block and inode
4108         numbers are printed as unsigned integers.
4109
4110 Mon Oct 24 14:10:46 1994    (tytso@rsx-11)
4111
4112         * pass5.c (check_block_end): Fix calculation of how the last block
4113                 in the block bitmap should be calculated.
4114
4115 Wed Sep  7 10:01:13 1994    (tytso@rsx-11)
4116
4117         * pass1b.c (pass1_dupblocks): Fix declaration of dup_inode_map to
4118                 be an ext2fs_inode_bitmap, and free it properly.
4119
4120         * e2fsck.h
4121         * e2fsck.c (main): Folded in Remy Card's changes to add a revision
4122         level to the superblock.
4123
4124 Wed Aug 17 22:00:20 1994  Remy Card  (card@bbj)
4125
4126         * e2fsck.c (usage): Fixed bogus usage message.
4127
4128 Wed Aug 17 11:21:45 1994  Theodore Y. Ts'o  (tytso@rt-11)
4129
4130         * pass1.c (process_bad_block): Fixed bug so that blocks in the
4131         backup superblocks and group descriptors are handled gracefully.
4132