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