Whamcloud - gitweb
ChangeLog, pass1.c, problem.c, problem.h:
[tools/e2fsprogs.git] / e2fsck / ChangeLog
1 2000-05-27  Theodore Ts'o  <tytso@valinux.com>
2
3         * pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
4                 (cw@foof.org) which checks to see if special devices have
5                 a non-zero size, and deals with it.
6
7         * problem.c, problem.h (PR1_SET_NONZSIZE): Add new problem code.
8
9 2000-05-18  Theodore Ts'o  <tytso@valinux.com>
10
11         * Makefile.in (install): Create a symbolic link for fsck.ext3 as
12                 well.
13
14 2000-05-08  Theodore Ts'o  <tytso@valinux.com>
15
16         * problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem
17                 code. 
18
19         * super.c (check_super_block): If the OS type in the superblock is
20                 the Hurd, check to see if the filetype feature is set, and
21                 offer to clear it if so.   This needs to be done since the
22                 Hurd doesn't properly support the filetype feature.
23                 (And since the hurd allows the transmogrification of files
24                 to special files and vice versa --- for no good reason
25                 that I can understand --- it can't support the filetype
26                 feature for the forseeable future, either.)
27
28 2000-04-03  Theodore Ts'o  <tytso@valinux.com>
29
30         * unix.c: For platforms that don't define optarg.h, manually
31                 define optarg and optind.
32
33 2000-03-20  Theodore Ts'o  <tytso@valinux.com>
34
35         * pass1.c (check_immutable, e2fsck_pass1_check_device_inode):
36                 Check for the append-only as well as the immutable flag.
37
38         * problem.c (PR_1_SET_IMMUTABLE): Adjust message to include
39                 append-only flag.   Fix comment for compression flag.
40         
41 2000-02-12    <tytso@snap.thunk.org>
42
43         * unix.c (e2fsck_update_progress): Limit the number of updates to
44                 the progress bars to 8 times a second.  This allows a 9600
45                 baud console link to keep up.
46
47 2000-02-11    <tytso@snap.thunk.org>
48
49         * unix.c (main): If compression is enabled on the filesystem,
50                 print a warning message (for now).
51
52         * message.c: Add new compression shortcut: @c == compress
53
54         * problem.c, problem.h (PR_1_COMPR_SET): Add new error code.
55
56         * pass1.c (check_blocks): If the inode has EXT2_COMPRBLK_FL flag
57                 set, check to see if the filesystem supports compression.
58                 If it does pass this information down to process_block()
59                 so it can treat the compressed block flag words
60                 correctly.  If not, offer to clear the flag, since it
61                 shouldn't be set.  
62                 (process_block): If an inode has the compressed inode flag
63                 set, allow EXT2FS_COMPRESSED_BLKADDR.
64
65         * pass1b.c (process_pass1b_block, delete_file_block,
66                 clone_file_block):
67         * pass2.c (deallocate_inode_block): Use HOLE_BLKADDR to check to
68                 see if the block can be skipped.
69
70 2000-02-08    <tytso@snap.thunk.org>
71
72         * util.c: Make resource tracking message more concise.
73
74         * e2fsck.h:
75         * pass1.c (mark_table_blocks, e2fsck_pass1): Remove
76                 ctx->block_illegal_map, since it's not needed by pass1,
77                 and pass1b has been modified to calculate it manually if
78                 needed.   This reduces the memory footprint needed by e2fsck.
79
80         * pass1b.c (check_if_fs_block): New static function which returns
81                 whether or not a block overlaps with filesystem metadata.
82                 This replaces consulting the block_illegal_map bitmap.
83
84         * Makefile.in: Call sync after finishing building all in this
85                 directory. 
86         
87         * unix.c (PRS): sync the filesystem before trying to use
88                 BLKFLSBUF, to minimize the chance of causing dirty blocks
89                 to get dropped.
90
91         * e2fsck.h: Manually define BLKFLSBUF if not defined, and we're on
92                 a Linux/i386 system.
93         
94         * pass3.c (check_directory): Only do the loop detection algorithm
95                 if we've searched over 2048 parent directories and haven't
96                 found the end yet.  This means that in the common case, we
97                 don't allocate or clear the inode_loop_detection bitmap,
98                 which for large systems, merely clearing the bitmap for
99                 each directory was turning out to be quite expensive.
100                 Thanks to Jani Jaakkola (jjaakkol@cs.helsinki.fi) for
101                 identifying this problem.
102
103 2000-02-06  Theodore Ts'o  <tytso@valinux.com>
104
105         * badblocks.c, e2fsck.h, ehandler.c, emptydir.c, extend.c,
106                 flushb.c, iscan.c, message.c, pass1.c, pass1b.c, pass3.c
107                 pass4.c, pass5.c, problem.c, scantest.c, swapfs.c, 
108                 unix.c, util.c: Add Internationalization support as 
109                 suggested by Marco d'Itri <md@linux.it>.
110
111 2000-02-02  Theodore Ts'o  <tytso@valinux.com>
112
113         * e2fsck.h, flushb.c, scantest.c: Remove uneeded include of
114                 linux/fs.h 
115
116 2000-01-18  Theodore Ts'o  <tytso@valinux.com>
117
118         * Makefile.in: Since LIBUUID can sometimes include "-lsocket"
119                 we need a separate DEPLIBUUID that can be used in
120                 Makefile's dependency rules.
121
122 1999-11-23    <tytso@valinux.com>
123
124         * e2fsck.8.in: Update language about where to find a backup
125                 superblock.
126
127 1999-11-19    <tytso@valinux.com>
128
129         * pass1.c (process_inodes): Add shortcut handling; if
130                 process_inodes_count is zero, return right away, to avoid
131                 calling qsort with a non-positive count.
132
133         * message.c (safe_print): Fix to properly display ^A, ^B, etc. and
134                 to print Delete as ^?
135
136         * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
137                 the source directory.
138
139 1999-11-10    <tytso@valinux.com>
140
141         * Release of E2fsprogs 1.18
142
143 1999-11-10    <tytso@valinux.com>
144
145         * problem.c (fix_problem): Support a new flag, PR_PREEN_NO which
146                 means the answer is assumed to be no in preen mode.  This
147                 is now used in the PR_1_SET_IMMUTABLE code, so that in
148                 preen mode we ignore these inodes and just print a warning
149                 message. 
150
151 1999-11-09    <tytso@valinux.com>
152
153         * pass1.c (e2fsck_pass1): If the filesystem does not support
154                 imagic inodes, if an inode has the imagic flag set, offer
155                 to clear the imagic flag.  If a valid device/fifo/socket
156                 has the immutable flag set, call the new helper function
157                 check_immutable() to offerto clear the immutable flag.
158
159         * pass2.c (check_filetype): Use the new ext2_file_type() helper
160                 function instead of calculating the file_type information
161                 manually.
162
163         * pass3.c (e2fsck_reconnect_file): When adding a link to
164                 lost+found, calculate the filetype information so that
165                 ext2fs_link() can use the information if applicable.
166                 (get_lost_and_found): Create the /lost+found directory
167                 with the correct filetype information if applicable.
168
169         * util.c (ext2_file_type), e2fsck.h: New function which returns
170                 the directory entry file type information given the
171                 inode's mode bits.
172
173         * problem.c, problem.h: Added new problem codes PR_1_SET_IMAGIC
174                 and PR_1_SET_IMMUTABLE.
175
176 1999-11-07    <tytso@valinux.com>
177
178         * pass4.c (e2fsck_pass4): Clear inode_imagic_map after freeing it,
179                 to prevent it from getting freed twice.
180
181 1999-11-06    <tytso@valinux.com>
182
183         * unix.c (main): Close the filesystem before freeing the context,
184                 so that in the event of a free()-related segmentation
185                 violation, the filesystem is properly closed and written
186                 out.
187
188 1999-10-27    <tytso@valinux.com>
189
190         * e2fsck.c (e2fsck_reset_context): When freeing
191                 ctx->inode_reg_map, we weren't zero'ing
192                 ctx->inode_reg_map, which could cause a segfault later on
193                 in the e2fsck run.
194
195 1999-10-26    <tytso@valinux.com>
196
197         * problem.h (PR_2_SPLIT_DOT): Fix excess zero in problem code (now
198                 matches the standard convention).
199
200 1999-10-26    <tytso@valinux.com>
201
202         * Release of E2fsprogs 1.17
203
204 1999-10-26    <tytso@valinux.com>
205
206         * message.c (safe_print): Make safe_print take an char instead of
207                 an unsigned char to fix gcc warnings.
208
209 1999-10-25    <tytso@valinux.com>
210
211         * util.c: For NT portability, don't redefine getchar(), since
212                 stdio defines that.  Instead we introduce a new
213                 abstract macro read_a_char() which is #defined to the
214                 right function as necessary.
215
216         * problem.c, problem.h (PR_2_NULL_NAME): Add new problem code.
217
218         * pass2.c (check_dir_block): Require that the length of the
219                 directory entry be at least 12 bytes.  Check to see if the
220                 filename is zero-length, and flag that as an error.
221
222 1999-10-22    <tytso@valinux.com>
223
224         * Release of E2fsprogs 1.16
225
226 1999-10-22    <tytso@valinux.com>
227
228         * pass2.c (check_filetype): If the filetype filesystem feature is
229                 not set, and a directory entry has a dirent feature, offer
230                 to clear it (since 2.0 kernels will do complain will
231                 interpret it as a very large name length field).
232
233         * problem.c (PR_2_CLEAR_FILETYPE): Add new problem code.
234
235 1999-10-21    <tytso@valinux.com>
236
237         * e2fsck.8.in: Update man page to use a more standard format (bold
238                 option flags and italicized variables), as suggested by
239                 Andreas Dilger (adilger@enel.ucalgary.ca)
240
241         * pass4.c (e2fsck_pass4): If an inode is set in the
242                 inode_imagic_map bitmap, don't check to see if it is
243                 disconnected from the inode tree (because it almost
244                 certainly will be).  Free inode_imagic_map at the end of
245                 pass 4.
246
247         * pass2.c (check_dir_block, check_filetype): If the FILETYPE
248                 feature is set, check the directory entry's filetype
249                 information field, and fix/set it if necessary.
250                 (e2fsck_pass2): Free the inode_reg_map bitmap at the end
251                 of pass 2.
252
253         * pass1.c (e2fsck_pass1, alloc_imagic_map): Allocate and fill in
254                 information for inode_reg_map and inode_imagic_map, which
255                 indicates which inodes are regular files and AFS inodes,
256                 respectively.
257                 Since only the master superblock is written during a
258                 restart, force that superblock to be used after a restart;
259                 otherwise changes to the block group descriptors end up
260                 getting ignored.
261
262         * problem.c, problemP.h: If e2fsck is run -n, make def_yn variable
263                 be 0 for "no".  Add support for a new flag, PR_NO_NOMSG,
264                 which supresses the problem message if e2fsck is run with
265                 the -n option.
266
267         * problem.c, problem.h (PR_2_SET_FILETYPE, PR_2_BAD_FILETYPE): Add
268                 new problem codes.
269
270         * message.c (expand_dirent_expression): Add support for %dt which
271                 prints the dirent type information.
272
273         * e2fsck.c (e2fsck_reset_context): Free new bitmaps (inode_reg_map
274                 and inode_imagic_map).
275
276         * e2fsck.h (e2fsck_t): Add new inode_reg_map and inode_magic_map
277                 to the context structure.
278         
279 1999-09-24    <tytso@valinux.com>
280
281         * unix.c (PRS), util.c (ask_yn): Add #ifdef's to make
282                 e2fsprogs easier to port to non-Unix platforms.
283
284 1999-09-07    <tytso@valinux.com>
285
286         * pass3.c (adjust_inode_count): Fix bug where we didn't keep the
287                 internal and external inode counts in sync when we
288                 decremented an inode whose link count was already zero.
289                 Now we skip incrementing or decrementing both link counts
290                 if we would cause an overflow condition.
291                 (expand_dir, expand_dir_proc): Change where we update the
292                 inode block count and size files so that the block count
293                 field is updated correctly when we create an indirect block.
294
295 1999-08-05    <tytso@valinux.com>
296
297         * super.c (check_super_block): Check to see whether the
298                 inodes_per_group value in the superblock is insanely too
299                 high.
300
301 1999-08-02    <tytso@valinux.com>
302
303         * pass1b.c (clone_file_block): Don't clear the dup_map flag if
304                 the block also shares data with the fs metadata when
305                 the count drops to 1, since the block should still be
306                 cloned, as fs metadata isn't included in the count.
307
308 1999-07-18  Theodore Ts'o  <tytso@valinux.com>
309
310         * Release of E2fsprogs 1.15
311
312 1999-07-19    <tytso@valinux.com>
313
314         * unix.c (usage): Add minimalist emergency help to the usage
315                 message. 
316
317 1999-07-18    <tytso@valinux.com>
318
319         * unix.c: Add support for calculating a progress bar if the -C0
320                 option is given.   The function e2fsck_clear_progbar()
321                 clears the progress bar and must be called before any
322                 message is issued.  SIGUSR1 will enable the progress bar,
323                 and SIGUSR2 will disable the progress bar.  This is used
324                 by fsck to handle parallel filesystem checks.  Also, set
325                 the device_name from the filesystem label if it is
326                 available. 
327
328         * e2fsck.h: Add new flags E2F_FLAG_PROG_BAR and
329                 E2F_FLAG_PROG_SUPRESS.  Add new field in the e2fsck
330                 structure which contains the last tenth of a percent
331                 printed for the user.
332
333         * message.c (print_e2fsck_message): Add call to
334                 e2fsck_clear_progbar(). 
335
336         * pass1.c (e2fsck_pass1):
337         * pass2.c (e2fsck_pass2):
338         * pass3.c (e2fsck_pass3):
339         * pass4.c (e2fsck_pass4):
340         * pass5.c (e2fsck_pass5): Add call to e2fsck_clear_progbar when
341                 printing the resource tracking information.
342
343         * pass5.c (check_block_bitmaps, check_inode_bitmaps): If there is
344                 an error in the bitmaps, suppress printing the progress
345                 bar using the suppression flag for the remainder of the
346                 check, in order to clean up the display.
347
348 1999-06-30    <tytso@valinux.com>
349
350         * unix.c (check_mount): Clean up the abort message displayed when
351                 the filesystem is mounted and either stdout or stdin isn't
352                 a tty.
353
354 1999-06-25    <tytso@valinux.com>
355
356         * e2fsck.h:
357         * pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode, 
358                 pass1_check_directory, e2fsck_use_inode_shortcuts): Make
359                 pass1_* be private static functions, and create new
360                 function e2fsck_use_inode_shortcuts which sets and clears
361                 the inode shortcut functions in the fs structure.
362
363         * e2fsck.h:     
364         * pass2.c (e2fsck_process_bad_inode): Make process_bad_inode() an
365                 exported function.
366
367         * pass4.c (e2fsck_pass4): Call e2fsck_process_bad_inode to check
368                 if a disconnected inode has any problems before
369                 connecting it to /lost+found.  Bug and suggested fix by 
370                 Pavel Machek <pavel@bug.ucw.cz>
371
372 1999-06-21    <tytso@valinux.com>
373
374         * unix.c (main): Add missing space in the disk write-protected
375                 message. 
376
377 1999-05-22    <tytso@rsts-11.mit.edu>
378
379         * problem.c, problem.h (PR_0_INODE_COUNT_WRONG): Add new problem
380                 code. 
381         
382         * super.c (check_super_block): Add check to make sure the total
383                 number of inodes is sane, since this can be calculated
384                 from the number of groups times the number of inodes per
385                 group.   Offer to correct it if it is incorrect.
386
387 1999-03-19    <tytso@rsts-11.mit.edu>
388
389         * pass5.c (check_block_end): Fix fencepost condition where when
390                 clearing the block padding we were missing the last position
391                 in the bitmap.
392
393 1999-05-17    <tytso@rsts-11.mit.edu>
394
395         * unix.c (reserve_stdio_fds): Add safety check in case
396                 reserve_stdio_fds couldn't open /dev/null.
397
398 1999-03-14  Theodore Ts'o  <tytso@rsts-11.mit.edu>
399
400         * util.c (print_resource_track): Use mallinfo if present to get
401                 more accurate malloc statistics.
402
403         * pass3.c (get_lost_and_found): Check to see if lost+found is a
404                 plain file; if so, offer to unlink it.
405
406         * problem.c, problem.h (PR_3_LPF_NOTDIR): Add new problem code.
407
408 1999-03-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
409
410         * problem.c: Fix problem message for PR_1_BAD_GROUP_DESCRIPTORS so
411                 that the block group number is printed.  Add new prompt,
412                 PROMPT_UNLINK.
413
414 1999-01-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
415
416         * Release of E2fsprogs 1.14
417
418 1999-01-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
419
420         * message.c (safe_print): New function which prints strings,
421                 converting non-printable characters using the '^' and
422                 M-notation.  This function is now used to print directory
423                 name entries and pathnames.
424
425 Mon Jan  4 02:28:59 1999  Theodore Y. Ts'o  <tytso@mit.edu>
426
427         * unix.c (main): Reset the context before calling ext2fs_close(),
428                 to avoid referencing already freed memory.
429
430 1998-12-15  Theodore Ts'o  <tytso@rsts-11.mit.edu>
431
432         * Release of E2fsprogs 1.13
433
434 1998-12-03  Theodore Ts'o  <tytso@rsts-11.mit.edu>
435
436         * Makefile.in: Updated dependencies.
437
438 1998-11-27  Theodore Ts'o  <tytso@rsts-11.mit.edu>
439
440         * pass3.c (get_lost_and_found): If the filesystem is not opened
441                 read-only, then force /lost+found to be created if it is
442                 not present.
443
444         * problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen
445                 operation. 
446
447 1998-10-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
448
449         * unix.c (main): Move ext2fs_close() after e2fsck_free_context()
450                 since e2fsck_free_context may reference data in ctx->fs.
451
452         * e2fsck.c (e2fsck_reset_context): Make sure ctx->fs is non-NULL
453                 before checking ctx->fs->dblist.
454
455 1998-10-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
456
457         * pass1.c (e2fsck_pass1): Use the device check subroutine on
458                 FIFO's and Socket's, so that we catch bogus immutable inodes.
459
460         * pass2.c (process_bad_inode): Process bad socket and fifo's.
461
462         * problem.h, problem.c: Define new problem codes PR_2_BAD_FIFO and
463                 PR_2_BAD_SOCKET.
464
465 1998-09-02  Theodore Ts'o  <tytso@rsts-11.mit.edu>
466
467         * problem.c: Add PR_3_NO_DIRINFO error code.
468
469         * super.c (check_super_value): Rename min and max to min_val and
470                 max_val to avoid possible cpp macro conflicts.
471
472         * pass4.c (e2fsck_pass4): Rename max to maxgroup, to avoid
473                 possible cpp macro conflicts.
474         
475         * pass3.c (e2fsck_pass3): Rename max to maxdirs, to avoid possible
476                 cpp macro conflicts.
477                 (check_directory): Fix logic to avoid possible core dump
478                 in the case of ext2fs_get_dir_info returning NULL.  (By
479                 the time we get here, it should never happen, but...).
480                 Also simply/streamline the control flow of the function.
481
482 1998-08-17  Theodore Ts'o  <tytso@rsts-11.mit.edu>
483
484         * unix.c (check_if_skip): Move the "not cleanly mounted" check
485                 ahead of the maximal mount and too long since checked tests.
486                 (reserve_stdio_fds): Make sure 0,1,2 file descriptors are
487                 open, so that we don't open the filesystem using the same
488                 file descriptor as stdout or stderr.
489
490 1998-08-01  Theodore Ts'o  <tytso@rsts-11.mit.edu>
491
492         * pass2.c (e2fsck_pass2): Fix the progress accounting so that we
493                 get to 100%.
494
495         * pass3.c (e2fsck_pass3): Change progress accounting to be
496                 consistent with the other e2fsck passes.                
497
498         * e2fsck.c (e2fsck_run): At the end of each pass, call the
499                 progress function with the pass number set to zero. 
500
501         * unix.c (e2fsck_update_progress): If the pass number is zero,
502                 ignore the call, since that indicates that we just want to
503                 deallocate any progress structures.
504
505 1998-07-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
506
507         * Release of E2fsprogs 1.12
508
509 1998-07-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
510
511         * unix.c (main): Fix typo in checking the incompat feature set; it
512                 should be checked against EXT2_LIB_FEATURE_INCOMPAT_SUPP.
513
514 1998-07-07  Theodore Ts'o  <tytso@rsts-11.mit.edu>
515
516         * badblocks.c (test_disk): Don't clear the existing bad blocks
517                 list when using e2fsck -c, since it may cause blocks with
518                 marginal errors to be dropped from the bad blocks list.
519
520 Mon Jul  6 10:32:11 1998  Theodre Ts'o  <tytso@lurch.mit.edu>
521
522         * pass1.c (e2fsck_pass1): Use ext2fs_sb structure for
523                 compatibility with older kernels.
524
525 1998-06-25  Theodore Ts'o  <tytso@rsts-11.mit.edu>
526
527         * unix.c (e2fsck_update_progress): Remove unused variables.
528
529 1998-06-10  Theodore Ts'o  <tytso@rsts-11.mit.edu>
530
531         * pass1.c, problem.h: Change blkcnt_t to be e2_blkcnt_t to avoid
532                 collision with LFS API.
533
534         * pass1.c (e2fsck_pass1): Fix bug so that ext2_max_sizes is
535                 properly initialized.  
536                 (e2fsck_pass1): Don't allow the the boot loader inode to
537                 be a directory (clear the inode mode field if so).
538
539 1998-05-07  Theodore Ts'o  <tytso@rsts-11.mit.edu>
540
541         * unix.c (PRS): Added new option -C, which causes e2fsck to print
542                 progress updates so that callers can keep track of the
543                 completion progress of e2fsck.  Designed for use by
544                 progress, except for -C 0, which prints a spinning report
545                 which may be useful for some users.
546
547         * pass5.c (e2fsck_pass5): Use a finer-grained progress reporting
548                 scheme (useful for larger filesystems).
549
550         * e2fsck.h: Add progress_fd and progress_pos, for use by the Unix
551                 progress reporting functions.
552
553 1998-04-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
554
555         * pass1.c (process_inode_cmp): Use EXT2_QSORT_TYPE to define the
556                 appropriate return type for comparison functions for qsort.
557
558         * e2fsck.h: Add #ifdef protection for unistd.h
559
560         * super.c: Remove header files already included by e2fsck.h
561
562 1998-04-26  Theodore Ts'o  <tytso@rsts-11.mit.edu>
563
564         * dirinfo.c (e2fsck_add_dir_info): Update function to pass the old
565                   size of the memory to be resized to ext2fs_resize_mem().
566
567 1998-03-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
568
569         * Makefile.in: Change to use new installation directory variables
570                 convention.  Fix uninstall rules to take $(DESTDIR) into
571                 account.  Remove cat8dir from the installdirs target,
572                 since modern man package don't necessarily put the cat
573                 directory in /usr/man/cat?.
574
575 1998-03-29  Theodore Ts'o  <tytso@rsts-11.mit.edu>
576
577         * super.c, e2fsck.h: Always declare e2fsck_get_device_size() as an
578                 extern in e2fsck.h to prevent -Wall warnings.
579
580         * pass4.c (e2fsck_pass4): Remove unused variable 'j'.
581
582 1998-03-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
583
584         * super.c (check_super_block): Fix broken superblock sanity check
585                 when calculating blocks_per_group if s_log_frag_size !=
586                 s_log_block_size.  Since we don't support fragments, this
587                 isn't a bug deal, but it's good to get it fixed.
588
589 1998-03-23  Theodore Ts'o  <tytso@rsts-11.mit.edu>
590
591         * unix.c: Fix bug in check of feature set, to make sure we can
592                 really fix this filesystem.
593
594         * problem.h: Make blkcount type to be of type blkcnt_t.  Make the
595                 num field be a 64 bit type.  Add the problem code
596                 PR_1_FEATURE_LARGE_FILES
597
598         * problem.c: Add table entry for the problem code
599                 PR_1_FEATURE_LARGE_FILES.
600
601         * pass1.c (e2fsck_pass1): A non-zero i_dir_acl field is only
602                 a problem for directory inodes.  (Since it is also
603                 i_size_high now.)   If there are no large_files, then
604                 clear the LARGE_FLAG feature flag.  If there are
605                 large_files, but the LARGE_FLAG feature flag is not set,
606                 complain and offer to fix it.
607                 (check_blocks): Add support to deal with non-directory
608                 inodes that have i_size_high set (i.e., large_files).
609                 Don't give an error if a directory has preallocated
610                 blocks, to support the DIR_PREALLOC feature.
611                 (process_block, process_bad_block): The blockcnt variable
612                 is a type of blkcnt_t, for conversion to the new
613                 block_iterate2.
614
615         * pass2.c (process_bad_inode): A non-zero i_dir_acl field is only
616                 a problem for directory inodes.  (Since it is also
617                 i_size_high now.)
618
619         * message.c (expand_inode_expression): Print a 64-bits of the
620                 inode size for non-directory inodes.  (Directory inodes
621                 can only use a 32-bit directory acl size, since
622                 i_size_high is shared with i_dir_acl.)  Add sanity check
623                 so that trying to print out the directory acl on a
624                 non-directory inode will print zero.
625                 (expand_percent_expression): %B and %N, which print 
626                 pctx->blkcount and pctx->num, can now be 64 bit
627                 variables.  Print them using the "%lld" format if
628                 EXT2_NO_64_TYPE is not defined.
629
630         * e2fsck.h: Add the large_flagsfield to the e2fsck context.
631
632         * e2fsck.c (e2fsck_reset_context): Clear the large_flags
633                 field.
634
635 Sun Mar  8 23:08:08 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
636
637         * pass3.c (fix_dotdot_proc): 
638         * pass2.c (check_dot, check_dotdot, check_name, check_dir_block): 
639         * message.c (expand_dirent_expression): Mask off the high eight
640                 bits of the directory entry's name_len field, so that it
641                 can be used for other purposes.
642
643 Fri Feb 27 00:01:39 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
644
645         * e2fsck.c (e2fsck_run): Since E2F_FLAG_SIGNAL_MASK doesn't
646                 include EXT2_FLAG_RESTART anymore, we need to adjust this
647                 routine so that it *does* return in the case of it seeing
648                 EXT2_FLAG_RESTART.
649
650         * pass1.c (e2fsck_pass1): ext2_get_next_inode() may call the group
651                 done callback function, which may set context abort
652                 flags.  So we need to test the context abort flags after
653                 we call ext2_get_next_inode().
654                 (process_inodes): If we abort due out of process_inodes,
655                 do a clean exit by breaking out of the for loop instead of
656                 just returning.
657
658         * e2fsck.h (E2F_FLAG_SIGNAL_MASK): EXT2_FLAG_RESTART shouldn't be
659                 considered a SIGNAL mask (i.e., requiring an immediate
660                 abort of processing to restart).  FLAG_RESTART just means
661                 that we want to restart once pass 1 is complete.
662
663 Tue Feb 24 15:19:40 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
664
665         * Change the progress function to return an integer; if returns 1,
666                 then the progress function is expected to have set the
667                 e2fsck context flag signalling a user abort, and the
668                 caller should also initiate a user abort.
669
670 Tue Feb 17 19:03:44 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
671
672         * pass5.c (check_block_bitmaps, check_inode_bitmaps): Don't call
673                 end_problem_latch() unless there was actually a problem
674                 latched.  Simplifies semantics of the latch processing.
675
676 Mon Feb 16 17:31:44 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
677
678         * e2fsck.h: Add new field, priv_data to the e2fsck context
679                 structure.  It should be used by callers of the e2fsck
680                 functions only, and not by anything in e2fsck itself.
681
682 Mon Feb 7 17:31:04 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
683
684         * super.c: Instead of call ext2fs_get_device_size(), define and call
685                 e2fsck_get_device_size().  (This function may be stubbed
686                 out in special versions of e2fsck.)
687
688         * pass3.c, pass4.c: Remove extra calls to the progress function
689                 that weren't needed.
690
691         * mke2fs.8.in: Update man page to note that the format of the bad
692                 block file is the same as the one generated by badblocks. 
693
694 Sun Feb  1 07:57:14 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
695
696         * dirinfo.c, e2fsck.c: Don't include com_err.h; it isn't needed.
697
698         * e2fsck.h: Include <time.h> since it is needed
699
700         * super.c: If EXT2_SKIP_UUID is defined, then skip the UUID
701                 processing. 
702
703 Tue Jan 20 15:37:01 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
704
705         * unix.c (main): In the case where the filesystem revision is too
706                 high, print the message about the superblock possibly
707                 being corrupt.
708
709         * e2fsck.8.in: Add expanded comments about how the -b option
710                 works. 
711
712 Sat Jan 17 13:02:16 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
713
714         * e2fsck.h: If EXT2_FLAT_INCLUDES is defined, then assume all of
715                 the ext2-specific header files are in a flat directory.
716
717         * dirinfo.c, ehandler.c, pass1.c, pass1b.c, pass2.c, pass5.c,
718                 super.c, swapfs.c, unix.c: Explicitly cast all assignments
719                 from void * to be compatible with C++.
720
721 Tue Jan  6 11:30:24 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
722
723         * unix.c (sync_disk): Remove sync_disk and calls to that function,
724                 since ext2fs_close() now takes care of this.
725
726 Mon Dec 29 14:45:42 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
727
728         * pass1.c, pass1b.c, pass2.c, pass3.c, swapfs, badblocks.c,
729                 ehandler.c, unix.c: Change use of private to be priv_data,
730                 to avoid C++ reserved name clash.
731
732 Fri Nov 28 09:30:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
733
734         * dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead
735                 of e2fsck_get_num_dirs, which has been removed.
736
737 Tue Nov 25 15:54:35 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
738
739         * Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want
740                 to compile and install flushb.
741
742 Mon Nov 24 06:48:00 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
743
744         * pass1.c (e2fsck_pass1_check_device_inode): For now, only check
745                 to make sure the extra i_blocks in a device are cleared if
746                 the immutable flag is set.
747
748         * util.c (print_resource_track): Fix typo which caused the
749                 time/resource tracking to print "Pass 1 :" instead of
750                 "Pass 1: ".
751
752 Thu Nov 20 16:02:23 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
753
754         * pass3.c (expand_directory): Fix bug which could cause core dump
755                 when expanding the directory, and the bitmaps hadn't yet
756                 been read in.  Also, only use ext2fs_write_dir_block when
757                 writing a directory block, not when writing out a fresh
758                 indirect block.
759
760 Wed Nov 19 16:15:44 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
761
762         * pass1.c (process_bad_block): Fix bug where first_block wasn't
763                 getting incremented, which caused user to get a
764                 "Programming error?" warning if there was a bad block in a
765                 non-primary superblock/group_descriptor.  Also fixed
766                 another bug so that ext2fs_bg_has_super() is consulted, to
767                 avoid problems when using a filesystem with the
768                 sparse_groups option set and there are bad blocks at the
769                 beginning of a group which doesn't have a superblock.
770
771 Thu Nov  6 16:10:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
772
773         * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c: Add calls to the 
774                 progress indicator function.
775
776         * pass1.c (scan_callback): Add call to the progress feedback
777                 function (if it exists).
778
779 Tue Nov  4 09:45:36 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
780
781         * super.c (check_super_block): Skip the device size check if the
782                 get_device_size returns EXT2_EXT_UNIMPLEMENTED.
783
784         * iscan.c (main): Don't use fatal_error() anymore.
785
786         * pass1b.c, swapfs.c, badblocks.c: Set E2F_FLAG_ABORT instead of
787                 calling fatal_error(0).
788
789         * problem.c, pass3.c (PR_3_ROOT_NOT_DIR_ABORT, 
790                 PR_3_NO_ROOT_INODE_ABORT): New problem codes.
791         
792         * problem.c, pass2.c (PR_2_SPLIT_DOT): New problem code.
793
794         * problem.c, pass1.c (PR_1_SUPPRESS_MESSAGES): New problem code.
795         
796         * problemP.h: New file which separates out the private fix_problem
797                 data structures.
798
799         * util.c, dirinfo.c, pass1.c, pass1b.c, pass2.c, pass5.c, super.c,
800                 swapfs.c util.c: allocate_memory() now takes a e2fsck
801                 context as its first argument, and rename it to be
802                 e2fsck_allocate_memory().
803
804 Mon Nov  3 14:35:29 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
805
806         * unix.c (main): Add a special case check for the error code EROFS
807                 and display an appropriate error message for this case.
808
809         * [lots of files]:  Change ext2fs_read_inode, ext2fs_write_inode
810                 to take the e2fsck context as their first argument.
811                 Change dir_info.c routines to take an e2fsck_context,
812                 renamed them to start with e2fsck_ to avoid namespace
813                 issues, and changed them to store the directory
814                 information inside the e2fsck context.
815                 Added e2fsck_run() which calls all of the e2fsck passes in
816                 the correct order, and which handles the return of abort
817                 codes.  Added abort processing, both via setjmp/longjmp
818                 and via flags in the e2fsck context.  Use a flag in the
819                 e2fsck context instead of the restart_e2fsck global
820                 variable.   Change uses of free and malloc to
821                 ext2fs_free_mem and ext2fs_get_mem.
822         
823 Fri Oct 31 01:12:43 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
824
825         * pass1.c, pass3.c: Rename new error codes to _ET_ in them for
826                 consistency.
827
828 Sat Oct 25 00:10:58 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
829
830         * pass3.c (get_lost_and_found): Check error return of 
831                 EXT2_FILE_NOT_FOUND instead of ENOTDIR
832
833         * pass1.c (pass1_check_directory): Return EXT2_NO_DIRECTORY
834                 instead of ENOTDIR
835
836 Fri Oct 24 00:12:39 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
837
838         * unix.c (PRS): Make the variable which getopt returns into be
839                 an int, so that it won't lose on platforms where char is
840                 unsigned. 
841
842         * pass1b.c (clone_file): Fix bug in error reporting in the case
843                 where cs.errcode is non-zero.
844
845 Sun Oct 19 21:12:11 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
846
847         * pass*.c, super.c, unix.c, util.c, e2fsck.h: Place #ifdef
848                 RESOURCE_TRACK around code which uses init_resource_track
849                 and print_resource_track.  (Not all systems have timeval)
850
851         * super.c: Remove excess #includes which are not necessary.
852
853         * e2fsck.h: Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H
854
855 Fri Oct  3 13:40:03 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
856
857         * pass*.c, super.c: Massive changes to avoid using printf and
858                 com_err routines.   All diagnostic messages are now routed
859                 through the fix_problem interface.
860
861 Sat Sep  6 17:13:28 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
862
863         * pass2.c (check_dir_block): Check for duplicate '.' and '..'
864                 entries. 
865
866         * problem.c, problem.h: Add new problem codes PR_2_DUP_DOT and
867                 PR_2_DUP_DOT_DOT.
868
869 Tue Sep  2 09:04:51 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
870
871         * problem.c: Added new problem codes for some of the
872                 superblock corruption checks, and for the pass header
873                 messages.  ("Pass 1: xxxxx")
874
875         * util.c (print_resource_track): Now takes a description
876                 argument. 
877
878 Mon Aug 25 10:23:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
879
880         * super.c, unix.c, e2fsck.c: New files to separate out the
881                 operating-specific operations out from e2fsck.c.  
882                 e2fsck.c now contains the global e2fsck context management
883                 routines, and super.c contains the "pass 0" initial
884                 validation of the superblock and global block group
885                 descriptors. 
886
887         * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c, util.c: Eliminate
888                 (nearly) all global variables and moved them to the e2fsck
889                 context structure.
890
891         * problem.c, problem.h: Added new problem codes PR_0_SB_CORRUPT,
892                 PR_0_FS_SIZE_WRONG, PR_0_NO_FRAGMENTS,
893                 PR_0_BLOCKS_PER_GROUP, PR_0_FIRST_DATA_BLOCK
894
895 Thu Aug 14 10:55:21 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
896
897         * message.c: Add compression for the word "Illegal"
898
899         * problem.c: Added entries for PR_2_BAD_CHAR_DEV and
900                 PR_2_BAD_BLOCK_DEV
901
902 Wed Aug 13 09:55:57 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
903
904         * pass1.c (pass1, check_device_inode), pass2.c
905                 (process_bad_inode): Use a more stringent test for a valid
906                 device.
907
908 Sun Aug 10 18:58:02 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
909
910         * e2fsck.c (check_mount): Add stronger warning message about the
911                 perils of running e2fsck on a mounted filesystem.
912
913 Tue Jun 17 01:33:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
914
915         * Release of E2fsprogs 1.11
916
917 Thu Jun 12 00:25:31 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
918
919         * pass1.c (mark_table_blocks): Mark the superblock and group
920                 descriptor blocks first, so that any conflicts between
921                 these and the bitmap or inode table blocks is noticed.
922
923         * problem.c: Fix message printed out when a block or inode bitmap
924                 conflicts with other fs data, has the correct group number
925                 in it.
926
927 Tue Jun 10 12:07:37 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
928
929         * pass2.c (pass2): Check the error return from ext2fs_dblist_iterate.
930
931 Thu May  8 22:45:27 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
932
933         * e2fsck.8.in: Fix minor typos and grammer oops found by Bill
934                 Hawes (whawes@star.net).
935
936         * badblocks.c (read_bad_blocks_file): Pass the blocksize to the
937                 bad blocks command so that all of the filesystem gets
938                 tested in the case where the blocksize 2048 or 4096.
939
940 Thu Apr 24 12:16:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
941
942         * Release of E2fsprogs version 1.10
943
944 Mon Apr 21 22:43:08 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
945
946         * pass1b.c (pass1b): While scanning for inodes, simply skip inodes
947                 where ext2fs_get_next_inode returns the 
948                 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE error.
949
950 Thu Apr 17 12:23:38 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
951
952         * Release of E2fsprogs version 1.09
953
954 Fri Apr 11 18:56:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
955
956         * Release of E2fsprogs version 1.08
957
958 Thu Apr 10 13:51:16 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
959
960         * pass1b.c (clone_file_block): If we clone a directory, we need to
961                 update the dblist entry so that we check (and correct) the
962                 right directory block.
963
964 Sun Apr  6 09:13:12 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
965
966         * pass1.c (process_block): Don't clear blocks references to
967                 filesystem metadata; let pass 1B handle this case.
968
969         * problem.c, problem.h: Add new problem, PR_1B_SHARE_METADATA.
970
971         * pass1b.c (pass1d): Deal with a block which is shared with
972                 filesystem metadata.
973
974         * e2fsck.h: Make block_illegal_map be a global variable
975
976 Sat Apr  5 11:51:58 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
977
978         * e2fsck.c, pass1.c (mark_table_blocks): Support the sparse_super
979                 feature.
980                 (get_backup_sb): New function which attempts to obtain the
981                 correct backup superblock (if possible).
982
983 Fri Apr  4 10:46:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
984
985         * e2fsck.c (main): Check the version of the library, and warn if
986                 the library is out of date; this happens generally due to
987                 users who manually install e2fsprogs.
988
989         * pass1.c (pass1_get_blocks): If the passed in inode number for
990                 get_blocks isn't what we're expecting pass back
991                 EXT2_ET_CALLBACK_NOT_HANDLED.
992
993 Wed Mar 12 13:32:05 1997  Theodore Y. Ts'o  <tytso@mit.edu>
994
995         * Release of E2fsprogs version 1.07
996
997 Tue Mar 11 10:31:47 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
998
999         * icount.c: New file which implements an inode count abstraction.
1000                 This significantly reduces amount of memory needed to
1001                 check really large filesystems.
1002
1003         * pass1.c, pass2.c, pass3.c, pass4.c: Modified to use the icount
1004                 abstraction.
1005
1006 Fri Mar  7 08:28:55 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1007
1008         * dirinfo.c (dir_info_iter): New function which allows iteration
1009                 over the directories in the dir_info map.
1010
1011         * pass3.c (pass3, check_directory): Speed up pass 3 by iterating
1012                 over all directories in the dir_info structure, instead of
1013                 iterating all inodes looking for directories, and then
1014                 looking up the directories using get_dir_info().
1015
1016 Sat Feb  1 11:33:43 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1017
1018         * pass1.c (pass1, process_block): 
1019         * pass2.c (pass2): Use the ext2_dblist abstraction instead of
1020                 manual code to manage the directory block list information.
1021
1022         * pass1.c (check_blocks), pass1b.c (pass1b), pass2.c
1023                 (deallocate_inode): Call the ext2 library routine
1024                 ext2_inode_has_valid_blocks() instead of
1025                 inode_has_valid_blocks().
1026
1027         * swapfs.c (swap_inodes): Add check so that we don't try to call
1028                 swap_inode_blocks unless the inode has valid blocks.
1029                 (Otherwise a long fast symlink might cause
1030                 swap_inode_blocks to erroneously get called.)
1031
1032 Wed Jan 22 14:42:53 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1033
1034         * problem.c, problem.h: Added entries for PR_2_DOT_NULL_TERM and
1035                 PR_2_DOT_DOT_NULL_TERM.
1036
1037         * pass2.c (check_dot, check_dot_dot): Make sure the new . and
1038                 .. entries are null-terminated, since the 2.0 kernel
1039                 requires this (for no good reason).
1040
1041 Mon Jan 20 20:05:11 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1042
1043         * pass1.c (pass1): Set the EXT2_SF_SKIP_MISSING_ITABLE flag so
1044                 that we can recover from missing inode tables.
1045
1046         * dirinfo.c (get_dir_info): If there are no directories in the
1047                 dir_info abstraction, don't core dump (because dir_info is
1048                 NULL).
1049
1050         * e2fsck.c (main): Don't try using the backup superblocks if there
1051                 aren't any.
1052                 (check_super_block): If there are illegal inode table or
1053                 bitmaps, set the filesystem as being in error.
1054
1055 Wed Jan 15 11:32:01 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1056
1057         * pass2.c (check_dir_block): Added check to make sure that rec_len
1058                 is a a multiple of 4 (so that the directory entries are
1059                 4-byte aligned).
1060
1061 Sat Dec 28 12:16:32 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1062
1063         * Makefile.in (uninstall): Uninstall all programs in the PROGS
1064                 line.
1065                 (PROGS): Don't build and install the extend program by
1066                 default. 
1067         
1068
1069 Sat Dec  7 16:41:02 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1070
1071         * pass1.c (process_inodes): Make sure the stashed_ino variable is
1072                 saved and restored as well.
1073                 (pass1): For fast sym links, skip the check_blocks
1074                 processing step altogether.
1075
1076 Mon Dec  2 09:28:24 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1077
1078         * problem.c, message.c: New files, to completely refurbish how
1079                 filesystem problems are reported to the user.  The
1080                 diagnostic messages are now encoded out in an easily
1081                 customizable, extensible format.  The messages printed out
1082                 in preen mode are all on one line, and contain the device
1083                 name.
1084
1085 Fri Nov 29 20:26:08 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1086
1087         * swapfs.c (swap_inodes): When swapping a filesystem, ignore
1088                 deleted files.
1089
1090         * pass1.c (pass1): Ignore missing inode table errors during the
1091                 scan, and just skip past those inodes.
1092
1093         * pass3.c (check_root): Remove root_ino argument, and assume that
1094                 the root inode must be EXT2_ROOT_INO.  Move responsibility
1095                 of setting the parent of the root inode in the directory
1096                 inode structure to pass2().
1097
1098         * pass2.c (check_dir_block): Don't allow links to the root
1099                 directory.  
1100
1101         * dirinfo.c (add_dir_info): Remove last argument to add_dir_info,
1102                 since the inode is no longer used.
1103
1104 Tue Oct 15 00:06:49 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1105
1106         * e2fsck.c (main): If the superblock magic number is wrong, or the
1107                 block group fails a sanity check, then automatically
1108                 restart trying to use the backup superblocks.
1109
1110         * pass1.c (mark_table_blocks): Make the inode tables ahead of
1111                 everything else; in the case where a bitmap block overlays
1112                 the inode table, the inode table should take precedence.
1113
1114         * pass2.c (maybe_clear_entry): Make the deleted/unused error
1115                 message fit on one line, since the error can happen during
1116                 a preen pass.  (We eventually need to revamp the whole
1117                 e2fsck error reporting and prompting system, but that's a
1118                 job for another day.)
1119
1120 Mon Oct 14 22:29:49 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1121
1122         * e2fsck.c (main): Read in the list badblocks into fs->badblocks
1123                 for the benefit of the inode scan functions. 
1124
1125         * pass1.c (pass1): If ext2fs_get_next_inode() returns an error
1126                 indicating that an inode is in a bad block, mark that
1127                 inode as being used, as well as in the inode "bb" map.
1128
1129         * pass2.c (maybe_clear_entry): New function which generalizes the
1130                 error cases when a directory entry needs to be cleared.
1131                 (check_dir_block): If an inode is in the "bb" map, offer
1132                 to clear the directory entry, since the inode is in a bad
1133                 block.
1134
1135         * pass4.c (pass4): If an inode is marked as used, but is is marked
1136                 in the "bb" map, don't process it as a disconnected inode.
1137
1138 Tue Oct  8 02:02:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1139
1140         * Release of E2fsprogs version 1.06
1141
1142 Mon Oct  7 00:45:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1143
1144         * e2fsck.c (main): Print out the version number of the shared
1145                 library when using the -V option.
1146
1147         * swapfs.c (swap_filesys): Change EXT2_SWAP to EXT2_FLAG_SWAP for
1148                 consistency's sake.
1149
1150         * e2fsck.c (main): By setting EXT2_FLAG_MASTER_SB_ONLY, only write
1151                 out the backup superblocks when we know we have a valid
1152                 filesystem.
1153
1154 Tue Oct  1 22:00:29 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1155
1156         * util.c (preenhalt): Make it explicit on preenhalt that running
1157                 e2fsck manually means without the -a or -p flag.
1158
1159 Fri Sep 27 14:41:08 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1160
1161         * pass1.c (pass1): Add support for the EXT2_BOOT_LOADER inode.
1162                 (Linux/FT actually sets the mode bits, so we have to
1163                 handle it specially.)
1164
1165         * e2fsck.c (check_if_skip): Print a message if the filesystem is
1166                 just dirty, so that the user knows that it's about to be
1167                 checked (since this will take a while).
1168
1169 Mon Sep 16 17:00:01 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1170
1171         * pass4.c: If a disconnected inode is zero-length, prompt to
1172                 delete it instead of connecting it to lost+found.
1173
1174 Thu Sep 12 15:23:07 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1175
1176         * Release of E2fsprogs version 1.05
1177
1178 Fri Aug 30 20:24:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1179
1180         * pass4.c (pass4): If the user refuses to connect an unattached
1181                 inode to lost+found, don't try to set i_links_count.  This
1182                 is bad, since if the user says yes, the inode will be
1183                 marked as unused, which is not necessarily the right
1184                 thing, especially since the rest of the cleanup doesn't
1185                 happen here.
1186
1187         * pass2.c (deallocate_inode): Set inode_link_info[ino] when
1188                 dellocating an inode.  (Not strictly necessary, but...)
1189
1190         * pass4.c (pass4): Add "bonehead" explanation to the "programming
1191                 error" message.
1192
1193 Tue Aug 27 11:26:32 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1194
1195         * e2fsck.c (PRS,main): Added new options -s and -S.  -s will
1196                 byte-swap the filesystem so that it is normalized.  -S
1197                 will byte-swap the filesystem regardless of its current
1198                 byte-order.
1199
1200         * swapfs.c: New file, which will byte-swap a filesystem.
1201
1202 Tue Aug 20 09:41:37 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1203
1204         * pass1.c (pass1): Change handling on files with non-zero dtime
1205                 and non-zero i_link_count; before we treated them as
1206                 deleted file per botched ext2 0.3c kernel behavior.  We
1207                 now clear dtime instead.
1208
1209 Mon Aug 19 23:33:57 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1210
1211         * e2fsck.c (main): If e2fsck sets the clean bit, even if
1212                 nothing else is changed, make sure FSCK_NONDESTRUCT is
1213                 set (since after all having the filesystem set to
1214                 invalid is an error.  :-)
1215
1216 Fri Aug  9 10:25:13 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1217
1218         * pass1.c (process_block): Make sure that meta data doesn't get
1219                 accidentally set in the dir_blocks array (which could
1220                 happen in some error condtions).
1221         
1222         * pass1.c (pass1): 
1223         * pass2.c (process_bad_inode): Check for fragments in a
1224                 OS-independent fashion.
1225
1226 Thu Aug  8 15:20:54 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1227
1228         * e2fsck.c (check_if_skip): Close the filesystem when skipping the
1229                 cleanup for the filesystem.
1230
1231 Mon Jul 22 22:03:28 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1232
1233         * e2fsck.c: Improve corrupt_msg, so that it's less confusing.
1234
1235 Thu May 16 11:12:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1236
1237         * Release of E2fsprogs version 1.04
1238
1239 Wed May 15 21:41:29 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1240
1241         * e2fsck.c (relocate_hint): Issue a hint that the user may wish to
1242                 try "e2fsck -b 8193" before allowing e2fsck to relocate
1243                 inode table blocks.
1244
1245         * Makefile.in (e2fsck): Build e2fsck statically or dynamically
1246                 depending on the option to configure.  Added targets for
1247                 e2fsck.static and e2fsck.shared for people who want to
1248                 build a static or shared variant manually.
1249
1250 Wed Mar 27 00:33:40 1996    <tytso@rsts-11.mit.edu>
1251
1252         * Release of E2fsprogs version 1.03
1253
1254 Tue Mar 26 12:03:42 1996    <tytso@rsts-11.mit.edu>
1255
1256         * e2fsck.c (show_stats): Don't use floating point to display
1257                 percentage of non-contiguous files, as different libc
1258                 handle result truncation differently, and this causes the
1259                 test suite to bomb out depending on which libc you are
1260                 using.
1261
1262         * util.c (allocate_memory): Fix error message to omit extraneous
1263                 %%s.
1264
1265 Tue Mar  5 03:50:40 1996    <tytso@rsts-11.mit.edu>
1266
1267         * pass4.c (pass4): 
1268         * pass2.c (check_dir_block): 
1269         * pass1.c (pass1): Add support for dynamic first inode revision.
1270
1271 Wed Feb 14 16:27:30 1996    <tytso@rsts-11.mit.edu>
1272
1273         * pass3.c (check_root): Fix spelling typo
1274
1275 Mon Feb  5 22:30:30 1996    <tytso@rsts-11.mit.edu>
1276
1277         * e2fsck.c (check_super_block): If the superblock fails certain
1278                 internal consistency checks, exit with a fatal error after
1279                 printing the "superblock is corrupt message".
1280
1281 Wed Jan 31 11:06:08 1996    <tytso@rsts-11.mit.edu>
1282
1283         * Release of E2fsprogs version 1.02
1284
1285 Wed Dec 15 21:24:26 1996    <tytso@rsts-11.mit.edu>
1286
1287         * pass1.c (process_block): Check to see if a file is "fragmented".
1288                 i.e., non-contiguous.  Note that any file which is larger
1289                 than the block group is guaranteed to be non-contiguous.
1290                 We may want to use a different hueristic for deciding
1291                 whether or not a file is "fragmented".
1292
1293         * e2fsck.c (show_stats): Print statistics of how many
1294                 non-contiguous files are on the system.
1295
1296 Fri Dec 15 19:19:47 1995    <tytso@rsts-11.mit.edu>
1297
1298         * badblocks.c (read_bad_blocks_file, test_disk): Fold
1299                 functionality of test_disk() (which runs badblocks) into
1300                 read_bad_blocks_file(); test_disk() now calls
1301                 read_bad_blocks_file() with a NULL bad_blocks_file
1302                 argument.
1303
1304 Mon Nov 20 18:30:10 1995    <tytso@rsts-11.mit.edu>
1305
1306         * e2fsck.c (check_mount): Use #if defined(__linux__) instead of
1307                 #if defined(linux).  The latter won't work if we're
1308                 compiling -ansi.
1309
1310 Mon Oct 30 20:31:17 1995    <tytso@rsts-11.mit.edu>
1311
1312         * e2fsck.c (check_mount): For Linux systems, the check to see if
1313                 the root is mounted read-only has to be done for all
1314                 filesystems, not just for the root filesystem, due to the
1315                 way that some /etc/rc scripts are set up.
1316
1317 Thu Oct 26 12:05:30 1995    <tytso@rsts-11.mit.edu>
1318
1319         * Makefile.in (install): Strip programs when they are installed.
1320                 (e2fsck): Build e2fsck statically.
1321
1322 Wed Oct 25 21:18:16 1995    <tytso@rsts-11.mit.edu>
1323
1324         * util.c (preenhalt): Preenhalt now takes an argument, which is an
1325                 ext2fs_filsys; this allows it to set the EXT2_ERROR_FS
1326                 flag in the superblock in cases where preenhalt is called.
1327                 All calls to preenhalt() were changed to either
1328                 preenhalt(fs) or preenhalt(NULL) in a few cases where the
1329                 fs pointer was not available.  (Most notable, for block
1330                 read/write errors.)
1331
1332 Mon Sep  4 21:41:03 1995  Remy Card  <card@bbj>
1333
1334         * ehandler.c:
1335           util.c: Include <sys/time.h> before <sys/resource.h>.  BSD needs it.
1336
1337 Mon Sep  4 10:14:49 1995    <tytso@rsts-11.mit.edu>
1338
1339         * e2fsck.c (show_stats): Show statistics about how many inodes
1340                 have indirect, doubly indirect, and triply indirect
1341                 blocks.  Allow up to 8 digits for statistics, instead of
1342                 merely 6, so things look pretty for large filesystems.
1343
1344         * pass1.c (pass1): Keep statistics about indirect, doubly
1345                 indirect, and triply indirect blocks.
1346
1347         * pass1.c (unwind_pass1): Clear the above statistics when unwinding
1348                 pass 1.
1349
1350 Fri Aug 18 15:17:10 1995  Theodore Y. Ts'o  <tytso@dcl>
1351
1352         * util.c, ehandler.c: Move #include of <sys/resource.h> after
1353                 #include of "e2fsck.h", since sys/resource.h may depend on
1354                 sys/time.h, which is #included in e2fsck.h.
1355
1356 Thu Aug 17 22:33:37 1995    <tytso@rsts-11.mit.edu>
1357
1358         * e2fsck.c (check_mount):  Use the new ext2fs_check_if_mounted()
1359                 function to determine if the device is mounted.
1360
1361         * e2fsck.c (main):  Add better error messages if ext2fs_open()
1362                 fails. 
1363
1364 Wed Aug 16 16:25:02 1995    <tytso@rsts-11.mit.edu>
1365
1366         * pass1.c (check_blocks): If we're clearing a directory, clear
1367                 pb.is_dir so we don't do the following check of making
1368                 sure the directory size matches; this is pointless, since
1369                 we've already cleared the inode.
1370
1371 Fri Aug 11 09:08:54 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
1372
1373         * pass1.c (bad_primary_block): New function, called by
1374                 process_bad_block, which explains the facts of life to the
1375                 user when a block in the primary superblock or primary
1376                 group descriptors is bad.
1377
1378         * pass2.c (check_dot): Handle the case where the first directory
1379                 entry is used, but not ".".
1380
1381         * pass2.c (check_dotdot): Handle the case where the second directory
1382                 entry is used, but is not "..".
1383
1384 Thu Aug 10 10:05:10 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
1385
1386         * e2fsck.c (check_super_block): Get the size of the physical
1387                 device and if it is smaller than the reported size of the
1388                 filesystem, report an error.
1389
1390 Sat Aug 12 03:39:18 1995  Remy Card  <card@bbj>
1391
1392         * e2fsck.c (check_if_skip): Print the number of allocated files and
1393                 blocks on clean filesystems.
1394
1395 Fri Aug 11 14:15:36 1995  Remy Card  <card@bbj>
1396
1397         * e2fsck.8: Updated date and version number.
1398
1399 Thu Aug 10 14:26:01 1995  Remy Card  <card@bbj>
1400
1401         * pass1.c (check_blocks): Check that directory size matches *exactly*
1402                 the count of allocated blocks.
1403
1404 Wed Aug  9 21:21:24 1995  Theodore Y. Ts'o  <tytso@dcl>
1405
1406         * pass1b.c (pass1d): Free the shared[] array when we're done with
1407                 it to avoid a memory leak.
1408
1409         * pass1.c (unwind_pass1): Use ext2fs_free_block_bitmap to free the
1410                 block_dup_map.
1411
1412         * pass2.c (process_bad_inode): When clearing the inode, make sure
1413                 the pathname is freed, to prevent a memory leak.
1414
1415         * pass5.c (check_inode_bitmaps): Free free_array and dir_array
1416                 when we're finished with them.
1417                 (check_block_bitmaps): Free free_array when we're finished
1418                 with them.
1419
1420         * Makefile.in (e2fsck, flushb): Use $(LD) instead of $(CC) when
1421                 linking the executable.
1422
1423         * pass2.c (process_bad_inode): Even on OS's that don't support the
1424                 fragment fields, make sure the Linux equivalent fields are
1425                 set to zero.  If an OS wants to reuse these fields, which
1426                 is probably a bad idea (although we may get desperate in
1427                 the future) this code will have to be changed.
1428
1429         * pass1.c (dir_block_cmp): If the block numbers are equal, compare
1430                 on the inode field, and then blockcnt field.  This is just
1431                 to keep the ordering of dir_blocks the same on all
1432                 platforms when there are more than on missing directory
1433                 blocks, which are indicated directories with holes, which
1434                 are indicated with the block number being set to zero.
1435
1436 Sun Aug  6 15:40:58 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
1437
1438         * pass1.c (check_blocks, process_block): check_blocks() modified
1439                 to call the ext2fs_block_iterate() with BLOCK_FLAG_HOLE if
1440                 the inode is a directory.  process_block() now checks to
1441                 see if a directory has a "hole", or missing block.  If so,
1442                 this fact is recorded in the directory block list so that
1443                 the problem can be resolved in pass #2.
1444
1445         * pass2.c (allocate_dir_block): Added allocate_dir_block() to
1446                 allocate new blocks for directories with "holes".  Called
1447                 out of check_dir_block if a block in the directory block
1448                 list is zero.
1449
1450         * pass3.c (get_lost_and_found): Move location of free(block) to
1451                 prevent possible memory leak.
1452
1453 Sat Aug  5 12:42:22 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
1454
1455         * pass2.c (check_dir_block): Use a automatic, fixed-saize array
1456                 instead of alloca() --- alloca is not portable!  Check to
1457                 make sure the filename is not longer than EXT2_NAME_LEN,
1458                 and offer to fix it by truncating it, since it should
1459                 never happen.
1460
1461         * e2fsck.c (PRS): Use malloc() instead of alloca() --- alloca() is
1462                 not portable!!  In any case putenv() in some systems must
1463                 take a static character array or malloc()'ed memory;
1464                 passing memory allocated using alloca() to putenv() is not
1465                 advisable.
1466
1467         * pass2.c (check_dot, check_dotdot): Use malloc() instead of
1468                 alloca() --- alloca() is not portable!!!
1469
1470 Tue Jul 18 20:04:02 1995    <tytso@rsx-11.mit.edu>
1471
1472         * pass1b.c (pass1c): 
1473         * pass3.c (check_root, get_lost_and_found): 
1474         * pass2.c (check_dir_block): Use ext2fs_{read,write}_dir_block
1475                 to read/write the directory block.
1476
1477 Mon Jul 17 04:00:56 1995    <tytso@rsx-11.mit.edu>
1478
1479         * util.c (ask_yn): Apply patch supplied by Peter A. Zaitcev to
1480                 make sure VMIN and VTIME are set correct.
1481
1482 Fri Jul 14 19:26:29 1995    <tytso@rsx-11.mit.edu>
1483
1484         * pass1.c (mark_block_used): Change to be an inline function.
1485                 Assume that the block validity checks are already done,
1486                 and use the fast variant of the bitmap functions.
1487
1488 Thu Jul 13 08:10:55 1995    <tytso@rsx-11.mit.edu>
1489
1490         * pass5.c (check_block_bitmaps, check_inode_bitmaps): Check the
1491                 bounds of the bitmaps in advance, and then use the fast
1492                 variant of e2fs_test_{block,inode}_bitmap.
1493
1494         * pass1.c (mark_block_used): Use ext2_fast_mark_block_bitmap since
1495                 the bounds checking has already been done earlier.
1496
1497 Wed Jul 12 02:22:46 1995    <tytso@rsx-11.mit.edu>
1498
1499         * pass1.c (pass1): Allocate and free the block_illegal_map, which
1500                 is used for shortcut processing in process_block.
1501                 (mark_table_blocks): Initialize block_illegal_map with the
1502                 filesystem blocks.
1503                 (describe_illegal_block): New helper function that
1504                 describes why a block is illegal.
1505                 (process_block): Use block_illegal_map as a shortcut
1506                 to determine whether a block is bad.  Use
1507                 describe_illegal_block to print out why the block is illegal.
1508
1509 Mon Jun 12 19:11:06 1995  Theodore Y. Ts'o  (tytso@dcl)
1510
1511         * flushb.c: Don't include <linux/fs.h> if it doesn't exist.
1512
1513         * scantest.c: Don't include <linux/fs.h>, <getopt.h>, or
1514                 <mntent.h> if they don't exist.  (Mostly so that "make
1515                 depend" works.)
1516
1517         * pass1.c, pass1b.c, pass3.c, badblocks.c: Include <errno.h> (if
1518                 it exists).
1519
1520         * e2fsck.c, scantest.c: Don't include <getopt.h> if it doesn't
1521                 exist. 
1522
1523 Mon Jun 12 08:37:49 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
1524
1525         * pass2.c (process_bad_inode, check_for_zero_long,
1526                 check_for_zero_char):  Change long to u32, and char to u8.
1527
1528 Sun Jun 11 15:05:57 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
1529
1530         * util.c (inode_has_valid_blocks): 
1531         * pass2.c (process_bad_inode): 
1532         * pass1.c (pass1, check_blocks, pass1_check_directory): Use
1533                 LINUX_S_IS* instead of S_IS*.
1534
1535         * e2fsck.h: Don't #include <sys/stat.h>
1536
1537         * flushb.c (main): Add #ifdef BLKFLSBUF around ioctl.  (Although
1538                 this program is pretty much useless if BLKFLSBUF isn't
1539                 supported.)
1540
1541         * e2fsck.c, badblocks.c: Add #include <errno.h>, since errno is
1542                 used.
1543
1544 Thu Jun  8 12:31:19 1995  Miles Bader  <miles@churchy.gnu.ai.mit.edu>
1545
1546         * pass2.c (check_dot, check_dotdot, check_dir_block): Use alloca
1547         to allocate space for file names instead of using fixed size buffers.
1548         (process_bad_inode): Only check inode frag fields if
1549         HAVE_EXT2_FRAGS is defined (by configure).
1550         * pass1.c (pass1): Only check the inode frag fields if
1551         HAVE_EXT2_FRAGS is defined (by configure).
1552
1553         * e2fsck.c (check_mount): Only check for a mounted filesystem if
1554         HAVE_MNTENT_H is defined (by configure).
1555         (PRS): Use alloca to allocate the new path string, instead of
1556         having a fixed size buffer (which was the wrong size anyway).
1557         (PRS): Only support the -F (flush) option if the BLKFLSBUF ioctl
1558         is defined.
1559
1560         * e2fsck.h: Only include <linux/fs.h> if HAVE_LINUX_FS_H is
1561         defined (by configure).
1562
1563         * Makefile.in: Rewritten to conform to GNU coding standards and
1564         support separate compilation directories.
1565
1566 Thu Apr  6 15:04:36 1995  Remy Card  <card@bbj.ibp.fr>
1567
1568         * pass1.c (pass1): Test the mode in reserved inodes (must be zero).
1569
1570 Sat Mar 11 13:12:16 1995  Theodore Y. Ts'o  <tytso@localhost>
1571
1572         * pass1.c (unwind_pass1): Clear the file type statistics counter
1573                 when pass 1 needs to be restarted from scratch.
1574
1575         * pass1.c (handle_fs_bad_blocks): Fix bug where bitmap blocks were
1576                 being reallocated to blocks in the next block group,
1577                 instead of the current block grup.
1578
1579         * pass1.c (pass1, check_blocks): Set inode_link_info[ino] whenever
1580                 inode.i_links_count is set.
1581
1582 Tue Feb 14 01:38:04 1995  Theodore Y. Ts'o  (tytso@rt-11)
1583
1584         * pass1.c (process_block): Add checks for if the block is
1585                 trepassing on a superblock or group descriptor table.
1586
1587 Sat Dec 31 00:52:11 1994    <tytso@rsx-11.mit.edu>
1588
1589         * main.c (corrupt_msg): Extend the message which is printed out
1590                 when the superblock is corrupt, to include the suggestion
1591                 of using the -b option to specify an alternate superblock.
1592
1593 Thu Nov 24 09:29:58 1994  Theodore Y. Ts'o  (tytso@rt-11)
1594
1595         * badblocks.c (read_bad_blocks_file): If we are adding or
1596                 replacing bad blocks in the bad blocks inode, sanity check
1597                 the bad block inode first, and clear out any illegal blocks.
1598
1599         * pass2.c (check_name): Don't bomb out if the attempt to get the
1600                 pathname of the containing directory returns an error; the
1601                 directory may be too badly damaged to expect that
1602                 ext2fs_get_pathname will always succeed.  Use "???" if the
1603                 pathname can't be obtained (it's only for a printf to the
1604                 user anyway).
1605
1606                 The name of the containing directory and the bad filename
1607                 were incorrectly interchanged in the user message.  Fixed.
1608
1609         * pass2.c (check_name, check_dir_block): Use a common static
1610                 string for the unknown pathname.
1611
1612 Mon Nov  7 22:30:54 1994  Remy Card  <card@bbj>
1613
1614         * Fixed lots of printf formats to make sure that block and inode
1615         numbers are printed as unsigned integers.
1616
1617 Mon Oct 24 14:10:46 1994    (tytso@rsx-11)
1618
1619         * pass5.c (check_block_end): Fix calculation of how the last block
1620                 in the block bitmap should be calculated.
1621
1622 Wed Sep  7 10:01:13 1994    (tytso@rsx-11)
1623
1624         * pass1b.c (pass1_dupblocks): Fix declaration of dup_inode_map to
1625                 be an ext2fs_inode_bitmap, and free it properly.
1626
1627         * e2fsck.h
1628         * e2fsck.c (main): Folded in Remy Card's changes to add a revision
1629         level to the superblock.
1630
1631 Wed Aug 17 22:00:20 1994  Remy Card  (card@bbj)
1632
1633         * e2fsck.c (usage): Fixed bogus usage message.
1634
1635 Wed Aug 17 11:21:45 1994  Theodore Y. Ts'o  (tytso@rt-11)
1636
1637         * pass1.c (process_bad_block): Fixed bug so that blocks in the
1638         backup superblocks and group descriptors are handled gracefully.
1639