blob: 83a7b499ca522495e1361b5fd450fe4aff8ca62d [file] [log] [blame]
Theodore Ts'o54779c62002-11-13 07:00:16 -050012002-11-12 Theodore Ts'o <tytso@mit.edu>
2
3 * problem.c: Make HTREE problems PR_PREEN_OK, so that we don't
4 abort an e2fsck after the filesystem has been mounted
5 using the 2.4 ext2 codebase.
6
Theodore Ts'o38513012002-11-09 15:00:56 -050072002-11-09 Theodore Ts'o <tytso@mit.edu>
8
9 * Release of E2fsprogs 1.32
10
Theodore Ts'oae65b292002-11-08 20:08:48 -0500112002-11-08 Theodore Ts'o <tytso@mit.edu>
12
13 * Release of E2fsprogs 1.31
14
Theodore Ts'o299d7422002-11-08 11:10:28 -0500152002-11-08 <tytso@snap.thunk.org>
16
Theodore Ts'oc1637bd2002-11-08 15:55:17 -050017 * unix.c (main): Fix a bug where e2fsck could erroneously mark a
18 filesystem as being valid if it was being checked and it
19 is interrupted with a ^C. (Bug introduced in e2fsprogs
20 1.28.)
21
Theodore Ts'o5e72cdb2002-11-08 15:35:13 -050022 * unix.c (PRS), journal.c: Set the default level of journal
23 debugging to be 0, and allow the user to set the level of
24 journal debugging by using the E2FSCK_JBD_DEBUG
25 environment variable.
26
Theodore Ts'o299d7422002-11-08 11:10:28 -050027 * pass1.c (new_table_block), super.c (check_super_block), swapfs.c
28 (swap_filesys): Clear EXT2_FLAG_MASTER_SB_ONLY to make
29 sure the backup superblocks and group descriptors are
30 updated when we make an important change to the
31 superblocks and/or group descriptors. (i.e., generating a
32 UUID, allocating filesystem metadata, or byte-swapping the
33 filesystem.)
34
Theodore Ts'oee895132002-11-07 16:16:55 -0500352002-11-07 Theodore Ts'o <tytso@mit.edu>
36
37 * e2fsck.h, unix.c (main, check_mount): Fix e2fsck so that it
38 returns the appropriate exit code, so that the boot
39 scripts will be told that they need to automatically
40 reboot.
41
Theodore Ts'obe93ef02002-10-31 18:38:55 -0500422002-10-31 Theodore Ts'o <tytso@mit.edu>
43
Theodore Ts'o5d823a42002-11-01 02:13:53 -050044 * Release of E2fsprogs 1.30
45
462002-10-31 Theodore Ts'o <tytso@mit.edu>
47
Theodore Ts'ob40ffd72002-10-31 19:30:24 -050048 * unix.c (usage), e2fsck.8.in: Add the -D option to the usage and
49 command synopsis. (Addresses Debian bug #167108)
50
Theodore Ts'obe93ef02002-10-31 18:38:55 -050051 * pass1.c (e2fsck_pass1): Check the superblock write time to see
52 whether or not we can safely do the LOW_DTIME checks.
53 (Addresses Sourceforge bug #620980)
54
Theodore Ts'o76dd5e52002-10-30 23:07:21 -0500552002-10-30 Theodore Ts'o <tytso@mit.edu>
56
Theodore Ts'o482afc42002-10-31 03:32:34 -050057 * Makefile.in (install): Search all compression extensions when
58 deleting old man pages.
59
Theodore Ts'o76dd5e52002-10-30 23:07:21 -050060 * pass1.c (mark_table_blocks): Fix bug in meta_bg support; only
61 mark blocks legacy group descriptor blocks up to
62 s_first_meta_bg.
63
Theodore Ts'oa49929b2002-10-20 00:58:08 -0400642002-10-20 Theodore Ts'o <tytso@valinux.com>
65
66 * pass1.c (mark_table_blocks): Add support for the meta_blockgroup
67 filesystem format.
68
Theodore Ts'o3e699062002-10-13 23:56:28 -0400692002-10-13 Theodore Ts'o <tytso@mit.edu>
70
71 * pass3.c (e2fsck_get_lost_and_found): Pass in mode 700 to
72 ext2fs_new_inode().
73
74 * unix.c (show_stats): Fix format bug if NLS is in use.
75
76 * journal.c, pass1.c, revoke.c, util.c: Fix gcc -Wall nits.
77
Theodore Ts'o64aecc42002-10-11 17:44:12 -0400782002-10-08 Theodore Ts'o <tytso@mit.edu>
79
80 * pass3.c (e2fsck_get_lost_and_found): Create the lost+found
81 directory with mode 0700.
82
Theodore Ts'o8132d842002-10-02 22:07:17 -0400832002-10-02 Theodore Y. Ts'o <tytso@mit.edu>
84
85 * pass2.c (parse_int_node, check_dir_block): Add byte-swap
86 functions around the htree code, so that it works on
87 big-endian machines.
88
89 * swapfs.c (swap_filesys): For PPC machines, byte-swap the bitmap,
90 since PPC big-endian filesystems were historically wierd.
91 This is just for the regression test, since no one
92 actually uses them anymore...
93
Theodore Ts'oad4fa462002-09-30 11:19:19 -0400942002-09-30 Theodore Ts'o <tytso@mit.edu>
95
96 * problem.c, problem.h (PR_2_HTREE_BAD_LIMIT,
97 PR_2_HTREE_BAD_COUNT, PR_2_HTREE_HASH_ORDER,
98 PR_2_HTREE_BAD_DEPTH): Add new problem codes.
99
100 * pass2.c (salvage_directory, check_dir_block): Avoid counting
101 directory entries twice during a directory salvage. Make
102 the salvaging algorithm smarter about directory entry size
103 overruns.
104 (parse_int_node): Add check to make sure the limit and
105 count fields in the node headers are sane. Also check
106 to make sure the hash table in ascending order.
107 (pass2, htree_depth): For all leaf nodes, determine their
108 depth in the tree, and make sure it matches with the depth
109 in the htree root information.
110
Theodore Ts'ofe5b72d2002-09-29 19:05:26 -04001112002-09-29 Theodore Ts'o <tytso@mit.edu>
112
Theodore Ts'oe8254bf2002-09-29 19:30:28 -0400113 * pass2.c (check_dir_block): Do a more paranoid check when trying
114 to determine whether or not a directory entry is a
115 completely empty leaf block or leaf node. Otherwise
116 e2fsck might get confused into thinking that a valid dxdir
117 was corrupted.
118
Theodore Ts'ofe5b72d2002-09-29 19:05:26 -0400119 * rehash.c (e2fsck_rehash_dir): Apply patch from Christopher Li
120 which avoids creating an empty directory entry at the end
121 of the directory block. This screws up earlier versions
122 of the indexed directory patch.
123
Theodore Ts'oe70ae992002-09-28 09:16:28 -04001242002-09-28 Theodore Ts'o <tytso@mit.edu>
125
126 * rehash.c (write_directory): Clear the index flag if by
127 reoptimizing the directory, we bring it back into a
128 non-indexed state.
129 (e2fsck_rehash_dir): Allow directories that contain two
130 blocks to be indexed. Otherwise when they grow, they
131 never will be indexed by the kernel.
132
133 * unix.c (main): Only update the master superblock; there's no
134 point updating the backup superblocks, and it speeds up
135 fsck slightly.
136
137 * pass2.c (salvage_directory): New function called by
138 check_dir_block() which is much more sophisticated about
139 how it salvages corrupted filesystems.
140
Theodore Ts'oc6633052002-09-24 01:26:50 -04001412001-09-24 Theodore Tso <tytso@mit.edu>
142
143 * Release of E2fsprogs 1.29
144
Theodore Ts'ocf3909e2002-09-06 10:14:12 -04001452002-09-06 Theodore Ts'o <tytso@mit.edu>
146
147 * rehash.c (copy_dir_entries): Fix bug which caused corrupted
148 directories if there are 4 or 8 bytes left over in a
149 directory page when optimizing/reindexing a directory.
150
Theodore Ts'o87ee8dc2002-08-31 03:02:57 -04001512001-08-31 Theodore Tso <tytso@thunk.org>
152
153 * Release of E2fsprogs 1.28
154
Theodore Ts'oceecbc72002-08-31 02:35:35 -04001552002-08-31 Theodore Ts'o <tytso@mit.edu>
156
157 * ehandler.c (e2fsck_handle_read_error): If the user asks to
158 ignore the error, offer to try forcing a write of the
159 block to the disk; sometimes this will cause the drive to
160 remap the bad block.
161
Theodore Ts'oea1959f2002-08-31 02:32:41 -04001622002-08-31 Theodore Ts'o <tytso@valinux.com>
163
164 * pass2.c (e2fsck_pass2): If this is a HTREE directory, sort the
165 dblist so that the first block of all of the directories
166 is handled first so we can read the hash version
167 information.
168 (check_dir_block): Examine the root node for correctness,
169 and offer to clear it if it is not correct. Also copy the
170 hash version to the dx_dir structure, so that the proper
171 hash function can be used for other blocks in the
172 directory.
173
174 * problem.c, problem.h (PR_2_HTREE_BAD_ROOT): Add new problem code.
175
Theodore Ts'oa3da9d12002-08-21 12:52:03 -04001762002-08-21 Theodore Ts'o <tytso@mit.edu>
177
178 * problem.c: Fix PR_1_RELOC_BLOCK_ALLOCATE message to explain that
179 it is necessary to find contiguous blocks in a particular
180 block group.
181
Theodore Ts'o0684a4f2002-08-17 10:19:44 -04001822002-08-17 Theodore Ts'o <tytso@mit.edu>
183
Theodore Ts'of044b4d2002-08-17 13:32:21 -0400184 * e2fsck.8.in: Add clarifying text describing how e2fsck works
185 with ext3 filesytems. (Addresses Debian bug #145044).
186
187 * pass1.c (handle_htree): Add support for EXT2_HASH_TEA
188
Theodore Ts'o0684a4f2002-08-17 10:19:44 -0400189 * e2fsck.h, e2fsck.c (e2fsck_allocate_context): Add new field to
190 the e2fsck context, ext_attr_ver, which specifies the EA
191 format version.
192
193 * unix.c (usage, parse_extended_opts, PRS), e2fsck.8.in: Add new
194 option -E, which allows the users to specify extended
195 options. Added ea_ver extended option.
196
197 * pass1.c (e2fsck_pass1_check_device_inode): Add ext2_filsys
198 argument to this function, so we can account for the
199 presence of extended attribute blocks attached to device
200 inodes.
201 (e2fsck_pass1_check_symlink, e2fsck_pass1): Take into
202 account the fact that symlinks can also have extended
203 attribute blocks.
204 (check_ext_attr): Don't be flexible about the EA format
205 version. Check against the version number in
206 ctx->ext_attr_ver.
207 (check_blocks): Check all inodes, so that we account for
208 extended attribute blocks belonging to special files.
209 Clean up i_size checks.
210
211 * pass1b.c (pass1b): Check all inodes, so that we account for
212 extended attribute blocks belonging to special files.
213 (delete_file_block): Use ext2fs_alloc_block_stats() to
214 update the filesystem statistics.
215 (delete_file): Attempt to decrement the extended
216 attribute refcount, and free the EA block if the count
217 hits zero.
218 (clone_file): Fixed bugs in EA handling. Don't call
219 block_iterate on inodes that don't have a valid i_block[]
220 array. Reread the base inode since it may have been
221 changed by ext2fs_block_iterate. When updating inodes as
222 part of cloning an EA block, write out the correct inode
223 structure.
224
225 * pass2.c (deallocate_inode_block, deallocate_inode): Use standard
226 ext2fs_alloc_*_stats functions to update the filesystem
227 statistics.
228 (deallocate_inode): Attempt to decrement the extended
229 attribute refcount, and free the EA block if the count
230 hits zero.
231 (e2fsck_process_bad_inode): Add extra argument to calls
232 to e2fsck_pass1_check_device_inode ().
233
234 * pass3.c (e2fsck_get_lost_and_found): Use standard
235 ext2fs_alloc_*_stats functions to update the filesystem.
236 statistics when creating /lost+found.
237 (adjust_inode_count): Remove debugging code that can never
238 be triggered.
239
240 * pass4.c (disconnect_inode): Add explanation about why we only
241 clear inodes that have no data blocks and no EA blocks.
242 Use ext2fs_inode_alloc_stats2 function to update the
243 filesystem statistics when clearing a zero-length inode.
244
245 * problem.c, problem.h (PR_1B_ADJ_EA_REFCOUNT,
246 PR_2_ADJ_EA_REFCOUNT): Add new problem codes.
247
248 * super.c (release_inode_block), (release_orphan_inodes): Use the
249 standard ext2fs_alloc_*_stats functions to update the
250 filesystem statistics.
251 (release_inode_blocks): Attempt to decrement the extended
252 attribute refcount, and free the EA block if the count
253 hits zero.
254
Theodore Ts'o838e7732002-08-01 12:37:00 -04002552002-08-01 Theodore Ts'o <tytso@mit.edu>
256
257 * dict.c, dict.h: New file from kazlib 1.20 which implements a
258 red-black tree
259
260 * pass1b.c: Massive changes to take advantage of dict.c. This
261 removes several O(n**2) algorithms from the rare case
262 where there are a large number of blocks claimed by
263 multiple inodes.
264
Theodore Ts'o542867f2002-07-24 07:42:02 -04002652002-07-24 Theodore Ts'o <tytso@mit.edu>
266
Theodore Ts'o850d05e2002-07-25 00:00:08 -0400267 * e2fsck.8.in, e2fsck.h, pass3.c (e2fsck_pass3), unix.c, rehash.c:
268 Add new option -D, which requests e2fsck to optimize all
269 directories. Rehash.c will also compress and sort
270 non-indexed directories.
271
272 * problem.c, problem.h: Rename PR_3A_REHASH_* to PR_3A_OPTIMIZE_*
273
274 * unix.c (PRS): Make sure the signal_cancel is registered without
275 SA_RESTART.
276
277 * rehash.c (e2fsck_rehash_dir, copy_dir_entries, calculate_tree):
278 Restructured code in e2fsck_rehash_dir into two new
279 subroutines to make the code more understandable/maintainable.
280 (set_root_node): Fixed bug which caused the root node to
281 be invalid on non-FILETYPE filesystems due to an
282 unitialized variable.
283 (calculate_tree): Fix bug where pointers which might get
284 invalidated if realloc() moves outdir->buf around.
285 (e2fsck_rehash_dir): Fix memory leak bug.
286
287 * pass3.c (e2fsck_get_lost_and_found), e2fsck.h, e2fsck.c:
288 Exported as a public interface a function for finding the
289 lost and found directory. Cache the location of the lost
290 and found directory in the e2fsck context structure.
291
Theodore Ts'o542867f2002-07-24 07:42:02 -0400292 * util.c (ask_yn, read_a_char): Note when the user has typed ^C,
293 and abort processing by longjmp'ing to ctx->abort_loc.
294
Theodore Ts'o3214a452002-07-23 12:00:00 -04002952002-07-23 Theodore Ts'o <tytso@mit.edu>
296
297 * pass1.c (e2fsck_pass1): If e2fsck is run with -n, don't create
298 the dirs_to_hash list, since we don't want to reindex
299 directories if the filesystem is opened read-only.
300
Theodore Ts'o4cae0452002-07-21 14:14:03 -04003012002-07-21 Theodore Ts'o <tytso@mit.edu>
302
303 * e2fsck.8.in: Document new exit code FSCK_CANCELED
304
305 * unix.c (PRS, signal_cancel): Capture SIGINT and SIGTERM signals
306 and set a flag in the e2fsck context indicating that
307 cancellation has been requested, so that e2fsck will exit
308 only at safe points.
309 (main): Change the exit handling so that if a cancellation
310 is requested, return FSCK_CANCELED (a new exit code 32).
311 e2fsck can now return more than one exit code as part of a
312 bitmask (as had been documented in the man page).
313
314 * pass2.c (e2fsck_pass2, check_dir_block), pass3.c (e2fsck_pass3),
315 pass4.c (e2fsck_pass4): Check to see if a cancellation was
316 requested, and abort processing if necessary.
317
Theodore Ts'ob7a00562002-07-20 00:28:07 -04003182002-07-19 Theodore Ts'o <tytso@mit.edu>
319
320 * rehash.c, Makefile.in: New file which rewrites directories using
321 the htree format.
322
323 * problem.c (fix_problem), problemP.h (PR_PREEN_NOHDR): Add option
324 which suppresses the header printed when in preen mode.
325
326 * pass3.c (e2fsck_pass3): If there are entries on the dirs_to_hash
327 list, call e2fsck_rehash_directories to reindex those
328 directories.
329 (e2fsck_expand_directory): Generalize the old
330 expand_dirctory() function so it can expand a directory to
331 a guaranteed minimum size.
332
333 * e2fsck.h (struct e2fsck_struct): Add the dirs_to_hash list. Add
334 new function prototypes for rehash.c and for
335 e2fsck_expand_directory().
336
337 * e2fsck.c (e2fsck_reset_context): Free the dirs_to_hash list.
338
339 * pass1.c (e2fsck_pass1): Initialize the dirs_to_hash list if the
340 htree feature is present in the filesystem.
341 (check_blocks): If a non-htree directory has more than 2
342 blocks, put it on the dirs_to_hash list.
343
344 * pass2.c (clear_htree): Add corrupt htree directories to the
345 dirs_to_hash list.
346
347 * problem.h, problem.c (PR_3A_PASS_HEADER, PR_3A_REHASH_ITER,
348 PR_3A_REHASH_DIR_ERR, PR_3A_REHASH_DIR_HEADER,
349 PR_3A_REHASH_DIR, PR_3A_REHASH_DIR_END): Add new problem codes
350
351 * pass2.c (parse_int_node), problem.c (PR_2_HTREE_BADBLK): Fix
352 problem display.
353
Theodore Ts'o62acaa12002-07-15 16:54:42 -04003542002-07-15 Theodore Ts'o <tytso@mit.edu>
355
356 * pass2.c (e2fsck_pass2): Use dx_dir->numblocks instead of
357 dx_dir->ino to indicate that a bad inode was cleared.
358
Theodore Ts'o503f9e72002-06-26 16:52:10 -04003592002-06-26 Theodore Ts'o <tytso@mit.edu>
360
361 * pass1.c (check_blocks): Move htree handling to handle_htree().
362 Factor out calls to ext2fs_write_inode so that it happens
363 if dirty_inode is non-zero.
364 (handle_htree): Add checks for invalid htree root, invalid
365 hash version, invalid hash version, and htree depth too deep.
366
367 * problem.h, problem.c (PR_1_HTREE_NODIR, PR_1_HTREE_BADROOT,
368 PR_1_HTREE_HASHV, PR_1_HTREE_INCOMPAT, PR_1_HTREE_DEPTH):
369 Add new problem codes.
370
371 * pass2.c (parse_int_node): Fix silly typo.
372 (check_dir_block): Change to use new ext2fs_dirhash()
373 function prototype.
374 (pass2): Fixed two minor bugs discovered by the test case:
375 Don't stop checking dxdir's after clearing a bad inode.
376 If there is a bad max hash, make sure the bad_dir flag
377 is set to make sure we try to clear inode.
378
Theodore Ts'o8fdc9982002-06-25 23:26:34 -04003792002-06-25 Theodore Ts'o <tytso@mit.edu>
380
381 * e2fsck.c (e2fsck_reset_context): Free the dx_dirinfo structure.
382
383 * message.c: Add new abbrevations @h and @p, "HTREE directory
384 inode" and "problem in".
385
386 * pass1.c (check_blocks): If the inode has the INDEX_FL flag,
387 register the block into the indexed directory data
388 structures. Or if the filesystem doesn't have the
389 DIR_INDEX flag, offer to clear the INDEX_FL.
390
391 * pass2.c (e2fsck_pass2, parse_int_node): Add support check htree
392 directories (we don't check all possible corruptions yet).
393
394 * problem.h, problem.h (PR_1_HTREE_SET, PR_2_HTREE_NOTREF,
395 PR_2_HTREE_DUPREF, PR_2_HTREE_MIN_HASH, PR_2_HTREE_MAX_HASH,
396 PR_2_HTREE_CLEAR, PR_2_HTREE_FCLR, PR_2_HTREE_BADBLK): Add
397 new problem codes.
398
399 * unix.c (main): If ENABLE_HTREE is not defined, complain if the
400 filesystem has the dir_index feature.
401
402 * Makefile.in, e2fsck.h, dx_dirinfo.c: New file (and group of
403 functions) which keeps track of blocks in HTREE directory
404 blocks.
405
Andreas Dilgerb21bf262002-06-10 11:05:56 -06004062002-05-22 Andreas Dilger <adilger@clusterfs.com>
407
408 * super.c (check_superblock): Check that the number of inodes and
409 blocks in a group is less than 2^16, so that the free inode
410 and block counts for a group fit into the group descriptor
411 table fields. Any more than that would need a COMPAT flag.
412
Theodore Ts'o0d634672002-05-22 00:22:38 -04004132002-05-22 Theodore Ts'o <tytso@mit.edu>
414
415 * pass1.c (check_ext_attr): Update to support the V2 Bestbits EA
416 format. We automatically determine from the first EA
417 block we visit whether we are using the V1 or V2 format.
418
Theodore Ts'oda307042002-05-21 21:19:14 -04004192002-05-21 Theodore Ts'o <tytso@mit.edu>
420
421 * pass1.c (process_block): If an inode has too many blocks or
422 is too big, then offer to truncate the inode.
423 (check_blocks): Don't bother checking the size to see if
424 it's too big, since that's just a symptom, not the disease
425 (which we're now appropriately checking in process_block).
426
427 * problem.c, problem.h: Add new problem codes PR_1_INODE_TOOBIG,
428 PR_1_TOOBIG_DIR, PR_1_TOOBIG_REG, PR_1_TOOBIG_SYMLINK, and
429 add the latch code PR_LATCH_TOOBIG.
430
Theodore Ts'obcf9c5d2002-05-21 09:14:17 -04004312002-05-20 Theodore Ts'o <tytso@mit.edu>
432
433 * e2fsck.h, pass1.c (e2fsck_pass1_check_symlink), pass2.c
434 (e2fsck_process_bad_inode): Add an extra
435 argument so a scratch buffer can be passed into the
436 function.
437
438 * pass1.c (e2fsck_pass1_check_device_inode,
439 e2fsck_pass1_check_symlink): If the EXT2_INDEX_FL flag is
440 set, then the device/FIFO is invalid.
441 (check_immutable): Don't check for EXT2_INDEX_FL; we take
442 care of that elsewhere now.
443 (e2fsck_pass1): Check to see if the symlink is valid
444 before we offer to clear any immutable bits. This matches
445 the order in which we check other special files.
446
447 * pass2.c (e2fsck_pass2): Allocate a bigger scratch buffer so we
448 can pass part of it to e2fsck_process_bad_inode.
449
450 * pass4.c (e2fsck_pass4): If we need to call
451 e2fsck_process_bad_inode(), allocate the necessary scratch
452 buffer.
453
454 * problem.h, problem.c: Change PR_2_SYMLINK_SIZE to be
455 PR_2_INVALID_SYMLINK, and change the text
456 accordingly. Revert the text change for PR_1_SET_IMMUTABLE
457 since we no longer check for EXT2_INDEX_FL in
458 check_immutable().
459
4602002-05-18 Andreas Dilger <adilger@clusterfs.com>
461
462 * pass1.c (e2fsck_pass1_check_symlink): Remove checks of
463 immutable/append-only checks, since this is handled by
464 check_immutable. For non-fast symlinks, read in the
465 data block and check the length to make sure it
466 matches with the inode size.
467 (check_immutable): Generalize to also check for the
468 EXT2_INDEX_FL flag.
469 (check_blocks): For non-regular files, signal a bad inode
470 size if i_size_high is non-zero.
471
472 * pass2.c: Only count large files if they are regular files
473 (not just if they aren't directories).
474
475 * problem.c, problem.h: Change comment for PR_2_SYMLINK_SIZE
476 to indicate that it can be triggered by any symlink,
477 not fast symlink. Change text for PR_1_SET_IMMUTABLE
478 to indicate that it the EXT2_INDEX_FL was set.
479
Theodore Ts'o31e29a12002-05-17 10:53:07 -04004802002-05-17 Theodore Ts'o <tytso@mit.edu>
481
482 * pass1.c (e2fsck_pass1): When calculating max_sizes, omit capping
483 this value by the calculated value of max_sect_sizes.
484 The inode may be a sparse inode, and the limit of
485 max_sect_sizes assumed a non-sparse inode and a limit
486 based on a 32-bit i_blocks field measured in 512 sectors.
487
488 * super.c (check_super_block): Fix check for s_log_block_size so
489 that takes into account fact that there is an offset of
490 EXT2_MIN_BLOCK_LOG_SIZE.
491
492 * pass1.c: Allocate max_sizes array to be big enough to support
493 the larger block sizes.
494
4952002-05-16 Andreas Dilger <adilger@clusterfs.com>
496
497 * unix.c (main), util.c (get_backup_sb): Use EXT2_MAX_BLOCK_SIZE
498 instead of using a hardcoded value of 4096.
499
500 * super.c (check_super_block): Change checks for s_log_block_size
501 s_log_frag_size so they support the larger block sizes.
502
503 * pass1.c (e2fsck_pass1): Calculate max_sizes array for block
504 sizes up to EXT2_MAX_BLOCK_SIZE (to support block sizes
505 greater than 4k).
506
Theodore Ts'oa8e77242002-03-08 03:12:14 -05005072002-03-08 Theodore Tso <tytso@mit.edu>
508
509 * Release of E2fsprogs 1.27
510
Theodore Ts'o546a1ff2002-03-07 23:52:56 -05005112002-03-07 Theodore Tso <tytso@mit.edu>
512
513 * journal.c, pass5.c, revoke.c: Fix gcc -Wall complaints
514
5152002-03-07 Theodore Tso <tytso@mit.edu>
Theodore Ts'of2d5c932002-03-07 03:13:07 -0500516
517 * unix.c (main): Don't close the filesystem before calling
518 fatal_error(); this just causes a needless warning about a
519 bad I/O manager magic number.
520
521 * journal.c (e2fsck_check_ext3_journal): Offer to clear the inode
522 in case the journal is too small, or the inode number in
523 the superblock doesn't appear to be random.
524
Theodore Ts'o546a1ff2002-03-07 23:52:56 -05005252002-03-06 Theodore Tso <tytso@mit.edu>
Theodore Ts'of1226322002-03-07 02:47:07 -0500526
527 * problem.h, problem.c: PR_5_BLOCK_RANGE_UNUSED,
528 PR_5_BLOCK_RANGE_USED, PR_5_INODE_RANGE_UNUSED,
529 PR_5_INODE_RANGE_USED: Add new problem codes.
530
531 * pass5.c (check_block_bitmaps, check_inode_bitmaps): Collapse
532 reporting of adjacent blocks and inodes into a range.
533
Theodore Ts'o14308a52002-03-05 03:26:52 -05005342002-03-04 Philipp Thomas <pthomas@suse.de>
535
536 * unix.c (main): Newer libintl needs LC_CTYPE to be set in
537 addition to LC_MESSAGES.
538
Theodore Ts'o57173d02002-02-26 14:59:39 -05005392002-02-24 Theodore Tso <tytso@mit.edu>
Theodore Ts'ob9f40922002-02-24 03:08:57 -0500540
541 * Makefile.in (install): Install hard links for man pages for
542 fsck.ext2 and fsck.ext3. Remove any compressed man
543 pages before installing the man pages.
544
Theodore Ts'o57173d02002-02-26 14:59:39 -05005452002-02-22 Theodore Tso <tytso@mit.edu>
Theodore Ts'od1a21822002-02-22 00:17:59 -0500546
547 * journal.c: Improve code maintainability and reduce code size by
548 moving common code paths in e2fsck_journal_init_dev() and
549 e2fsck_journal_init_inode() into e2fsck_get_journal().
550 Also fixed a memory leak in recover_ext3_journal().
551
552 * super.c (release_orphan_inodes): Fix memory leak.
553
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05005542002-02-03 Theodore Tso <tytso@thunk.org>
555
556 * Release of E2fsprogs 1.26
557
5582001-12-24 Theodore Tso <tytso@mit.edu>
Theodore Ts'o3ed57c22001-12-24 15:01:59 -0500559
560 * unix.c (PRS): Don't allow the -c and -l/-L options to be
561 specified at the same time.
562
563 * e2fsck.h (E2F_OPT_WRITECHECK), unix.c (PRS),
564 badblocks.c (read_bad_blocks_file): If two -c options are
565 specified, then perform a non-destructive read/write scan
566 of the disk.
567
568 * e2fsck.8.in: Document the double -c option; also encourage users
569 to use -c instead of the -l/-L options since it's too hard
570 for users to get things like the blocksize parameter correct.
571
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05005722001-12-23 Theodore Tso <tytso@mit.edu>
Theodore Ts'o19007e52001-12-23 19:33:51 -0500573
Theodore Ts'of1a17612001-12-23 22:27:52 -0500574 * util.c (get_backup_sb): This function now searches for the
575 backup superblock by iterating over possible blocksizes
576 instead of defaulting a guess of 8193 if the superblock
577 isn't available.
578
579 * message.c (expand_percent_expression), unix.c (main): Pass in
580 new parameters to get_backup_sb. Also, in unix.c, use the
581 blocksize paramter in the e2fsck context structure instead
582 of using a static variable, since get_backup_sb wants to
583 be able to set the blocksize paramter.
584
585 * e2fsck.h: Update function prototype for get_backup_sb; also add
586 the blocksize parameter to the e2fsck context structure.
587
Theodore Ts'o19007e52001-12-23 19:33:51 -0500588 * Makefile.in, jfs_user.h: Move linux/jbd.h to
589 ext2fs/kernel-jbd.h, to avoid using the system header
590 file version of hbd.h when using diet glibc (since it
591 forcibly adds /usr/include to the beginning of the
592 include search path.)
593
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05005942001-12-21 Theodore Tso <tytso@mit.edu>
Theodore Ts'od37066a2001-12-21 23:28:54 -0500595
Theodore Ts'o6a50c5e2001-12-21 23:29:35 -0500596 * problem.c (fix_problem): Use ctx->filesystem_name if the
597 ctx->device_name is NULL.
598
Theodore Ts'od37066a2001-12-21 23:28:54 -0500599 * journal.c (e2fsck_check_ext3_journal): Give the opportunity to
600 run the journal even if recovery flag is cleared. If
601 we're using a backup superblock, run the journal by
602 default.
603
604 * e2fsck.h (E2F_OPT_FORCE), unix.c (PRS, check_if_skip): Use a
605 bitfield in the e2fsck context flags word to indicate
606 whether or not a check should be forced. This allows the
607 journal code to set the option if necessary to force a
608 filesystem check.
609
610 * problem.h, problem.c: Remove PR_0_JOURNAL_RESET_JOURNAL, and add
611 PR_0_JOURNAL_RUN and PR_0_JOURNAL_RUN_DEFAULT. Update
612 problem decription texts.
613
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05006142001-12-16 Theodore Tso <tytso@mit.edu>
Theodore Ts'o8cf93332001-12-16 02:23:36 -0500615
Theodore Ts'o4ea7bd02001-12-16 23:23:37 -0500616 * e2fsck.h (ext2fs_get_refcount_size), unix.c (check_mount, PRS),
617 pass1.c (adjust_extattr_refcount),
618 ea_refcount.c (ea_refcount_create): Fix gcc -Wall nits.
619
Theodore Ts'o8cf93332001-12-16 02:23:36 -0500620 * recovery.c, revoke.c: Update to versions from 2.4.17-pre8.
621
622 * journal.c, jfs_user.h: Update support code for new version of
623 recover.c and revoke.c. Fix support for filesystems with
624 external journals.
625
Gabriel Paubertb3b3d462001-11-30 13:45:28 +01006262001-11-30 Gabriel Paubert <paubert@iram.es>
627
628 * journal.c (e2fsck_journal_load): Fix an endianness bug.
629
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05006302001-11-26 Theodore Tso <tytso@mit.edu>
Theodore Ts'o24bfb442001-11-26 15:51:14 -0500631
632 * super.c (check_super_block): Make sure that if the inode table
633 or allocation bitmap is zero, that it is marked as
634 invalid, so that in pass #1, a new bitmap/inode table gets
635 properly allocated. (Addresses Debian Bug #116975)
636
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05006372001-11-24 Theodore Tso <tytso@mit.edu>
Theodore Ts'o1e9a7e02001-11-24 16:40:57 -0500638
639 * e2fsck.8.in: Fix minor typo in man page and clarify device
640 specification.
641
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05006422001-10-07 Theodore Tso <tytso@mit.edu>
Theodore Ts'o62e3e7f2001-10-07 02:13:30 -0400643
644 * journal.c (clear_v2_journal_fields, e2fsck_journal_load): If the
645 V2 fields are set on a V1 journal superblock, or an
646 internal V2 journal has s_nr_users is non-zero, clear the
647 entire journal superblock beyond the V1 superblock. This
648 fixes botched V1->V2 updates.
649
650 * problem.c, problem.h (PR_0_CLEAR_V2_JOURNAL): Add new problem code.
651
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05006522001-09-20 Theodore Tso <tytso@mit.edu>
Theodore Ts'o773fd8a2001-10-06 21:26:27 -0400653
654 * e2fsck.h, journal.c (e2fsck_move_ext3_journal): Add new function
655 which will automatically relocate the ext3 journal from a
656 visible file to an invisible journal file if the
657 filesystem has been opened read/write.
658
659 * super.c (check_super_block): Add call to e2fsck_move_ext3_journal
660
661 * problem.c, problem.h (PR_0_MOVE_JOURNAL, PR_0_ERR_MOVE_JOURNAL):
662 Add new problem codes.
663
Theodore Ts'ofbf91112001-09-20 10:47:47 -04006642001-09-20 Theodore Tso <tytso@thunk.org>
665
666 * Release of E2fsprogs 1.25
667
Theodore Ts'oa5f3f5c2002-02-03 01:00:22 -05006682001-09-19 Theodore Tso <tytso@mit.edu>
Theodore Ts'oae6cdcf2001-09-19 15:17:25 -0400669
670 * unix.c (main): If a superblock is specified explicitly by the
671 user, don't try to automatically fall back to an
672 alternate superblock.
673
Theodore Ts'ofb707752001-09-04 15:00:37 -04006742001-09-02 Theodore Tso <tytso@thunk.org>
675
676 * Release of E2fsprogs 1.24a
677
Theodore Ts'o109624a2001-08-31 00:59:55 -04006782001-08-30 Theodore Tso <tytso@thunk.org>
679
680 * Release of E2fsprogs 1.24
681
Theodore Ts'ob1f204f2001-08-30 16:42:09 -04006822001-08-30 Theodore Tso <tytso@valinux.com>
683
684 * pass1.c (e2fsck_pass1): For EXT2_RESIZE_INO, allow its i_mode to
685 either be zero or a regular file (for compatibility with
686 Andreas's on-line resizing programs).
687
Theodore Ts'o53abed02001-08-27 12:18:16 -04006882001-08-27 Theodore Tso <tytso@valinux.com>
689
Theodore Ts'o0f8973f2001-08-27 12:44:23 -0400690 * unix.c (main): Remove EXT2FS_VERSION from the version display,
691 since it only confuses people.
692
Theodore Ts'o53abed02001-08-27 12:18:16 -0400693 * pass1.c (strnlen): Provide strnlen if libc doesn't.
694
Theodore Ts'o943ed872001-08-27 12:29:22 -04006952001-08-15 Theodore Tso <tytso@valinux.com>
696
697 * Release of E2fsprogs 1.23
698
Theodore Ts'o85645a6f2001-08-13 06:11:39 -04006992001-08-13 Theodore Tso <tytso@valinux.com>
700
Theodore Ts'oeb4ab512001-08-13 10:58:41 -0400701 * super.c (release_orphan_inodes): If the filesystem contains
702 errors, don't run the orphan * list, since the orphan list
703 can't be trusted.
704
Theodore Ts'o85645a6f2001-08-13 06:11:39 -0400705 * pass1.c (check_size): Fix logic in check_size; the previous code
706 only offered to clear the inode size fields if both size
707 and i_size_high were zero.
Theodore Ts'oa40ecbb2001-08-13 06:15:36 -0400708 (e2fsck_pass1_check_device_inode): If i_blocks is
709 non-zero, then assume that the device/socket/fifo inode
710 is bogus.
Theodore Ts'o85645a6f2001-08-13 06:11:39 -0400711
Theodore Ts'o2b94c652001-08-09 04:08:52 -04007122001-08-09 Theodore Tso <tytso@valinux.com>
713
Theodore Ts'oa4742692001-08-09 04:14:04 -0400714 * pass1.c, pass2.c, problem.c, problem.h: Fix bug introduced by
715 Andreas's symlink code; check_blocks() was unconditionally
716 testing inode_bad_map without checking to see if it
717 existed first. Fixed problem a different way; we now no
718 longer check inode_bad_map at all, since the file might
719 not get deleted in pass 2 anyway. We move the large file
720 feature reconciliation code to to e2fsck_pass2(), and in
721 deallocate_inode() in pass2.c, we decrement the large
722 files counter if we're about to delete a large file.
723
Theodore Ts'o2b94c652001-08-09 04:08:52 -0400724 * unix.c (show_stats): Print the number of large files in verbose
725 mode.
726
Theodore Ts'oc0a083f2001-08-07 10:17:41 -04007272001-08-07 Theodore Tso <tytso@valinux.com>
728
729 * journal.c (recover_ext3_journal): If s_errno is set in the
730 journal superblock, set the EXT2_ERROR_FS flag in the
731 filesystem superblock after the journal is run.
732
Theodore Ts'obd512b62001-08-04 21:33:03 -04007332001-08-04 Andreas Dilger <root@lynx.adilger.int>
734
735 * message.c: Change comments for %D and %d expansion in e2fsck
736 problem codes. It was not consistent which was for dirent
737 expansion, and which was for directory number expansion.
738
739 * problem.c (PR_2_FINAL_RECLEN, PR_2_BAD_FILETYPE): Fix problem
740 codes which got caught by the confusion between %D and %d.
741
Theodore Ts'od007cb42001-08-04 20:39:39 -04007422001-08-04 Theodore Tso <tytso@valinux.com>
743
744 * problem.c (PR_2_SYMLINK_SIZE): Change description to make it
745 more clear (and remove %s expansion). Also add missing
746 periods to the end of a number of problem descriptions.
747
748 * pass2.c (e2fsck_process_bad_inode): Remove unneeded problem
749 context string set now that the problem description for
750 PR_2_SYMLINK_SIZE has been changed.
751
752 * pass1.c (e2fsck_pass1_check_symlink): Consolidate some checks,
753 and check the validity of the symlink block here (so that
754 we detect this case here instead of later). Also use
755 sizeof(inode->i_block) instead EXT2_LINK_DIR.
756
Theodore Ts'o83e6ac82001-07-30 16:29:52 -04007572001-07-30 Theodore Tso <tytso@valinux.com>
758
759 * unix.c (check_mount): Remove the code which tested for the root
760 filesystem being mounted read-only, and depend on the
761 results flags from ext2fs_check_if_mounted.
762
Theodore Ts'o1e165262001-07-29 11:48:10 -04007632001-07-29 Theodore Tso <tytso@valinux.com>
764
Theodore Ts'o6d222f32001-07-29 12:06:58 -0400765 * unix.c (check_if_skip): Free the e2fsck context structure on a
766 normal clean filesystem exit, to make it easier to find
767 real memory leaks.
768 (PRS): Only update the path to include /sbin at the
769 beginning if the -c option is given, again to make it
770 easier to find memory leaks.
Theodore Ts'o0628ae32001-07-29 12:26:46 -0400771 (main): Move the final print_resource_track call after the
772 filesystem and the context are freed.
Theodore Ts'o6d222f32001-07-29 12:06:58 -0400773
774 * journal.c (e2fsck_journal_init_dev): Avoid memory leak if we
775 need to search for the journal device.
776 (e2fsck_journal_release): Free the journal IO channel when
777 we release the journal handle, to avoid a memory leak.
778
Theodore Ts'o1e165262001-07-29 11:48:10 -0400779 * e2fsck.c (e2fsck_reset_context): Fix bug; only close the io
780 channel if it is *different* from the filesystem io
781 channel.
782
Theodore Ts'ofd77b2c2001-07-27 22:10:01 -04007832001-07-27 Theodore Tso <tytso@valinux.com>
784
Theodore Ts'oa092c562001-07-27 22:40:09 -0400785 * problem.c (PR_1_SET_IMMUTABLE): Clarify problem message.
786
Theodore Ts'ofd77b2c2001-07-27 22:10:01 -0400787 * pass1.c (e2fsck_pass1): Check for symlinks that have the
788 immutable flag set (and offer to clear them).
789
Theodore Ts'o24ceb242001-07-26 09:02:56 -04007902001-07-26 Theodore Tso <tytso@valinux.com>
791
792 * pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of
793 pass 1.
794
Theodore Ts'o14fe1c32001-07-25 19:48:24 -04007952001-07-25 Theodore Tso <tytso@valinux.com>
796
797 * pass1.c (check_ext_attr): Skip zero-length EA entries.
798
799 * problem.c: PR_1_EA_ALLOC_COLLISION shouldn't abort, but should
800 prompt to clear the EA block.
801
Theodore Ts'oadee8d72001-07-23 00:17:49 -04008022001-07-22 Theodore Tso <tytso@valinux.com>
803
804 * journal.c (ll_rw_block): Use ctx->journal_io instead of the
805 filesystem's io_channel.
806 (e2fsck_journal_init_dev): New function which supports
807 initialization of the external journal.
808 (e2fsck_get_journal): Remove code which flagged an error
809 if the superblock reported the use of an external journal.
810 (ext3_journal_via_mount): Remove unsued, #ifdefed out function.
811
812 * problem.c, problem.h: Removed error codes no longer used
813 (PR_0_JOURNAL_UNSUPP_DEV, PR_0_JOURNAL_BAD_DEV,
814 PR_0_JOURNAL_UNSUPP_UUID) and replace them with new error
815 codes related with failures in loading the external
816 journal (PR_0_JOURNAL_UNSUPP_MULTIFS,
817 PR_0_CANT_FIND_JOURNAL, PR_0_EXT_JOURNAL_BAD_SUPER).
818 Also changed the text assocated with PR_0_JOURNAL_BAD_UUID
819 to reflect the case where the external journal isn't
820 correct for this filesystem.
821
822 * unix.c (PRS), e2fsck.8.in: Add new option -j which allows
823 the user to specify the pathname to find the external journal.
824
825 * e2fsck.c (e2fsck_reset_context): Close journal_io if it isn't
826 the same as the filesystem io_channel.
827
828 * e2fsck.h: Add new fields (journal_io and journal_name) in the
829 context structure to support external journals.
830
Theodore Ts'od3124012001-07-20 14:13:49 -04008312001-07-20 Theodore Tso <tytso@valinux.com>
832
833 * unix.c (main): Add an explicit warning when the filesystem is
834 left not completely fixed when e2fsck exits. (Addresses
835 Debian bug #104502.)
836
Theodore Ts'o55fd07e2001-07-19 16:31:25 -04008372001-07-19 Theodore Tso <tytso@valinux.com>
838
839 * pass1.c (check_ext_attr): The entire EA block is now checked to
840 make sure that parts of the EA block aren't being used for
841 multiple purposes.
842
843 * Makefile.in e2fsck.h, region.c: New file which is used to detect
844 collisions in extended attribute block.
845
846 * problem.h, problem.c (PR_1_EA_MULTI_BLOCK, PR_1_EA_ALLOC_REGION,
847 PR_1_EA_ALLOC_COLLISION, PR_1_EA_BAD_NAME,
848 PR_1_EA_BAD_VALUE): Add new problem codes.
849
Theodore Ts'o3c6b8972001-07-10 14:27:58 -04008502001-07-10 Theodore Tso <tytso@valinux.com>
851
852 * journal.c (e2fsck_run_ext3_journal): Only call ext3_flush() if
853 the superblock is dirty.
854
Theodore Ts'oe8a3ee62001-07-07 11:12:50 -04008552001-07-07 Theodore Tso <tytso@valinux.com>
856
Theodore Ts'o7b63fff2001-07-07 23:01:31 -0400857 * pass1b.c (pass1b, process_pass1b_block): Change the num_bad
858 field calculation so that it only counts EA block entries
859 as a single multiply claimed block (since once we clone
860 the EA blocks for one inode, we fix the problem for all of
861 the other inodes). Also, I moved the num_bad calculation
862 from process_pass1b_block to the end of pass1b. This
863 fixes a *significant* performance bug in pass1b which hit
864 people who had to had a lot of multiply claimed blocks.
865 (Can you say O(n**3) boys and girls? I knew you could...
866 Fortunately, this case didn't happen that much in actual
867 practice.)
868
869 * pass1.c (e2fsck_pass1): Defer inodes which have an extended
870 attribute block for later processing to avoid extra seeks
871 across the disk.
872 (process_inode_cmp): If there is no indirect block, sort
873 by the extended attribute (i_file_acl) block.
874
Theodore Ts'o7abb2bd2001-07-07 13:20:34 -0400875 * pass1b.c (clone_file_block): Fix bugs when cloning extended
876 attribute blocks. Moved free of block_buf to after the
877 code which clones the extattr block, and fixed logic for
878 changing pointers to the extended attribute field in the
879 inodes which were affected.
880 (decrement_badcount): New function which is used whenever
881 we need to decrement the number of files which claim a
882 particular bad block. Fixed bug where delete_file wasn't
883 checking check_if_fs_block() before clearing the entry in
884 block_dup_map. This could cause a block which was claimed
885 by multiple files as well as the filesystem metadata to
886 not be completely fixed.
887
Theodore Ts'oe8a3ee62001-07-07 11:12:50 -0400888 * pass1.c (adjust_extattr_refcount): Add new function which
889 adjusts the reference counts of extended attribute blocks
890 if needed, both up and down.
891 (e2fsck_pass1): If the refcount or refcount_extra
892 structure are present, call adjust_extattr_refcount(),
893 and free it afterwards.
894
895 * problem.h, problem.c (PR_1_EXTATTR_READ_ABORT,
896 PR_1_EXTATTR_REFCOUNT, PR_1_EXTATTR_WRITE): Add new
897 problem codes.
898
Theodore Ts'o342d8472001-07-02 11:54:09 -04008992001-07-02 Theodore Tso <tytso@valinux.com>
900
901 * pass1.c (e2fsck_pass1, check_ext_attr, check_blocks): Add
902 initial support for scanning extended attribute blocks.
903
904 * e2fsck.c (e2fsck_reset_context): free extended attribute
905 refcount structure.
906
907 * e2fsck.h: Add new fields for accounting for the extended
908 attribute blocks.
909
910 * Makefile.in, ea_refcount.c, e2fsck.h: Add new file which
911 implements a reference count abstraction.
912
913 * problem.c, problem.h: Add new problem codes PR_1_ALLOCATE_REFCOUNT,
914 PR_1_READ_EA_BLOCK, PR_1_BAD_EA_BLOCK, PR_2_FILE_ACL_BAD
915
916 * message.c: Add "@a" as an abbreviation for "extended attribute"
917
918 * pass1b.c (clone_file): Add code which handles cloning an
919 extended attribute block.
920
921 * pass1b.c (delete_file):
922 * pass2.c (deallocate_inode): If the inode contains an extended
923 attribute block in the file_acl field, clear it and
924 deallocate the block.
925
9262001-06-28 Theodore Tso <tytso@valinux.com>
927
928 * pass2.c (e2fsck_process_bad_inode): Deal with inodes which are
929 marked bad because of an invalid file_acl (either because
930 EXT2_FEATURE_COMPAT_EXT_ATTR is not set, or because the
931 block number in file_acl is bad.
932
Theodore Ts'o636a9542001-06-29 17:57:26 -04009332001-06-29 Theodore Tso <tytso@valinux.com>
934
935 * unix.c (show_stats): Use long long to calculate the percentage
936 of the number of blocks in use in the filesystem.
937
Theodore Ts'o67960132001-06-23 00:16:37 -04009382001-06-23 Theodore Tso <tytso@valinux.com>
939
940 * Release of E2fsprogs 1.22
941
Theodore Ts'od90f3492001-06-22 21:01:17 -04009422001-06-22 Theodore Tso <tytso@valinux.com>
943
944 * flushb.c: Use platform independent method of defining the
945 BLKFLSBUF ioctl. Also include sys/mount.h since on newer
946 platforms BLKFLSBUF is defined there.
947
Theodore Ts'o42475e22001-06-22 20:35:38 -04009482001-06-19 Theodore Tso <tytso@valinux.com>
949
950 * super.c (release_inode_blocks): Don't try to release the blocks
951 if the orphaned inode is a device file, symlink, or some
952 other kind of special file that doesn't have a block list.
953
Theodore Ts'of4f75ba2001-06-16 01:14:28 +00009542001-06-15 Theodore Tso <tytso@valinux.com>
955
956 * Release of E2fsprogs 1.21
957
Theodore Ts'ob6a08072001-06-14 01:16:17 +00009582001-06-13 Theodore Tso <tytso@valinux.com>
959
960 * unix.c (check_if_skip): Adapted patch from Andreas Dilger which
961 prints the number of mounts or days elapsed since the last
962 check when e2fsck is forced to check an otherwise clean
963 filesystem.
964
Theodore Ts'ocbbf0312001-06-13 00:12:04 +00009652001-06-12 Theodore Tso <tytso@valinux.com>
966
967 * badblocks.c: Stop using the compatibility badblocks function,
968 and use the ext2fs_badblocks_* functions instead.
969
Theodore Ts'o5df55d72001-06-11 07:00:04 +00009702001-06-11 Theodore Tso <tytso@valinux.com>
971
Theodore Ts'o3034f622001-06-11 15:17:45 +0000972 * unix.c (PRS): Fix bug introduced in 1.20 which broke the -F
973 flag.
974
Theodore Ts'o5df55d72001-06-11 07:00:04 +0000975 * Makefile.in: Add message.c and swapfs.c to the list of source
976 files to build the make depend.
977
978 * swapfs.c, unix.c: Only support the -s and -S options to e2fsck
979 if ENABLE_SWAPFS is defined.
980
Theodore Ts'o725c4742001-06-08 11:55:44 +00009812001-06-08 Theodore Tso <tytso@valinux.com>
982
983 * recover.c, revoke.c: Synchronize with ext3 0.7a
984
Theodore Ts'ofdbdea02001-06-02 04:26:26 +00009852001-06-02 Theodore Tso <tytso@valinux.com>
986
Theodore Ts'oa479fe62001-06-02 04:50:14 +0000987 * recovery.c (scan_revoke_records): Fix bug in recovery code;
988 missing byte order conversion.
989
Theodore Ts'ofdbdea02001-06-02 04:26:26 +0000990 * pass1.c (mark_inode_bad): Replace alloc_bad_map with a function
991 which sets the bit in the bad inode bitmap.
992 (e2fsck_pass1): Check for fast symlinks with an invalid
993 size, and set the bad inode map in that case.
Theodore Ts'o62b6d472001-06-02 04:37:02 +0000994 (check_size): Check i_size_high for special files and
995 prompt to clear it along with i_size if non-zero.
Theodore Ts'ofdbdea02001-06-02 04:26:26 +0000996
997 * pass2.c (e2fsck_process_bad_inode): Check for fast symlinks with
998 an invalid size and prompt the user if the inode should be
999 cleared.
1000
1001 * problem.h, problem.c (PR_2_SYMLINK_SIZE): Added new problem code.
1002
Theodore Ts'o71d521c2001-06-01 19:29:36 +000010032001-06-01 Theodore Tso <tytso@valinux.com>
1004
Theodore Ts'o2f686ac2001-06-02 00:38:40 +00001005 * problem.c, problem.h: Change PR_0_JOURNAL_UNSUPP_INCOMPAT and
1006 PR_0_JOURNAL_UNSUPP_ROCOMPAT so they aren't fatal errors,
1007 but prompt to see if the user should abort. Removed the
1008 PR_0_JOURNAL_RESET_COMPAT problem code.
1009
1010 * journal.c (e2fsck_journal_load): If there are incompatible
1011 journal flags, just return an error code.
1012 (e2fsck_check_ext3_journal): If e2fsck_journal_load
1013 returns an error code indicating that there are
1014 incompatible journal flag, check to see if we should
1015 abort, and then offer to clear the journal.
Theodore Ts'oe3338452001-06-14 07:11:33 +00001016 (Addresses Debian bug #98527.)
Theodore Ts'o2f686ac2001-06-02 00:38:40 +00001017
Theodore Ts'o797f5ef2001-06-01 23:49:46 +00001018 * Makefile.in: Move include/asm/types.h.in to
Theodore Ts'o36a23e12001-06-02 00:54:10 +00001019 lib/ext2fs/ext2_types.h.in.
Theodore Ts'o797f5ef2001-06-01 23:49:46 +00001020
10212001-06-01 Theodore Tso <tytso@valinux.com>
1022
Theodore Ts'o71d521c2001-06-01 19:29:36 +00001023 * pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
1024 pass1_check_directory): Add a safety check to make sure
1025 ctx->stashed_inode is non-zero.
1026
1027 * pass1b.c (pass1b): Use e2fsck_use_inode_shortcuts() to disable
1028 the inode shortcut processing, instead of manually
1029 clearing only half of the function pointers that needed to
1030 be NULL'ed out. This caused nasty bugs if the last inode
1031 in the filesystem needed dup block processing.
1032
1033 * pass1b.c (clone_file_block): When cloning a directory's metadata
1034 block, don't try to update the directory block list
1035 database, since indirect blocks aren't stored in the
1036 database and the resulting error will abort the file clone
1037 operation.
1038
Theodore Ts'o561cd4d2001-05-25 16:40:56 +000010392001-05-25 Theodore Tso <tytso@valinux.com>
1040
Theodore Ts'obb185862001-05-25 17:35:00 +00001041 * Release of E2fsprogs 1.20
1042
10432001-05-25 Theodore Tso <tytso@valinux.com>
1044
Theodore Ts'o561cd4d2001-05-25 16:40:56 +00001045 * journal.c (e2fsck_journal_reset_super): Remove extraneous line
1046
Theodore Ts'oc7f23362001-05-23 22:19:47 +000010472001-05-23 Theodore Tso <tytso@valinux.com>
1048
1049 * journal.c (e2fsck_journal_reset_super): Fix bug; the reset
1050 journal wasn't getting written out to disk since the dirty
1051 bit wasn't being set on the buffer.
1052 (e2fsck_journal_load): Don't print an error message if the
1053 journal version number is wrong; just return a error code
1054 reflecting this fact. If the block type in the journal
1055 superblcok is obviously not a version number, report the
1056 journal is corrupted.
1057 (e2fsck_check_ext3_journal): On an unsupported journal
1058 version, prompt to abort by default, but then offer a
1059 chance to clear the journal as corrupt.
1060
1061 * problem.c, problem.h (PR_0_JOURNAL_UNSUPP_VERSION): Added new
1062 problem code.
1063
Theodore Ts'o424cd2b2001-05-14 04:06:56 +000010642001-05-14 Theodore Tso <tytso@valinux.com>
1065
Theodore Ts'o21afac02001-05-14 12:47:41 +00001066 * pass1.c: Treat inodes with a low dtime (that were from a
1067 corrupted orphan list) specially.
1068
1069 * problem.c, problem.h: Add new problem codes PR_1_LOW_DTIME and
1070 PR_1_ORPHAN_LIST_REFUGEES, and a new latch group,
1071 PR_LATCH_LOW_DTIME.
1072
1073 * problemP.h: Expand the size of the problem flag to be an int
1074 instead of a short. Expand space in the flag word which
1075 is reserved for problem latch flags from 3 bits to 8 bits.
1076
Theodore Ts'o54c637d2001-05-14 11:45:38 +00001077 * e2fsck.h, scantest.c: Change location of ext2_fs.h to be
1078 ext2fs/ext2_fs.h
1079
Theodore Ts'o424cd2b2001-05-14 04:06:56 +00001080 * super.c (check_super_block): Be more strict on checking
1081 s_r_blocks_count superblock field.
1082
10832001-05-13 Theodore Tso <tytso@valinux.com>
1084
1085 * problem.c, problem.h (PR_0_JOURNAL_UNSUPP_ROCOMPAT,
1086 PR_0_JOURNAL_UNSUPP_INCOMPAT, PR_0_JOURNAL_RESET_COMPAT):
1087 New problem codes.
1088
1089 * journal.c (e2fsck_journal_load): Use a problem code to
1090 report unsupported feature flags. There is code to
1091 clear unsupported flags, but since this is dangerous,
1092 it's not allowed in the problem code table.
1093
10942001-05-11 Andreas Dilger <adilger@turbolinux.com>
1095
1096 * journal.c (e2fsck_journal_reset_super): initialize the journal
1097 sequence number to a random value to avoid recovering
1098 bad transactions from a corrupt journal.
1099
Theodore Ts'o328a5ce2001-05-13 20:21:25 +000011002001-05-13 Theodore Tso <tytso@valinux.com>
1101
1102 * journal.c: Code cleanup; initialize journal_enable_debug using
1103 an initializer.
1104
Theodore Ts'ofc9a69c2001-05-12 13:43:46 +000011052001-05-12 Theodore Tso <tytso@valinux.com>
1106
1107 * unix.c (PRS): Skip validation of -C's file descriptor if it is
1108 zero, since that is special case.
1109
Theodore Ts'of0b8c872001-05-09 06:03:58 +000011102001-05-09 Theodore Tso <tytso@valinux.com>
1111
1112 * super.c (release_orphan_inodes): Add gettext quoting around
1113 "Truncating" and "Clearing" for i18n.
1114
Theodore Ts'ob9852cd2001-05-05 05:14:59 +000011152001-05-05 Theodore Tso <tytso@valinux.com>
1116
Theodore Ts'oe39ac922001-05-05 06:47:24 +00001117 * util.c (fatal_error): Use the correct magic number when checking
1118 the magic number for the io_channel data structure. Also
1119 remove extraneous call to io_channel_flush() that was left
1120 over from an editing session.
1121
Theodore Ts'ob9852cd2001-05-05 05:14:59 +00001122 * pass2.c (check_dir_block): Ignore EXT2_ET_DIR_CORRUPTED errors
1123 from ext2fs_read_dir_block().
1124
Theodore Ts'o5f629b72001-05-01 20:01:08 +000011252001-05-01 Theodore Tso <tytso@valinux.com>
1126
Theodore Ts'oae8160e2001-05-01 21:13:37 +00001127 * unix.c (PRS): Validate the completion information file
1128 descriptor so that the completion bar won't get
1129 accidentally written onto the disk.
1130
Theodore Ts'o5f629b72001-05-01 20:01:08 +00001131 * e2fsck.8.in: Add explanation that you can use mke2fs -n -b
1132 blocksize to printout alternate superblock locations.
1133
Theodore Ts'obc57f152001-04-26 04:11:46 +000011342001-04-26 Theodore Tso <tytso@valinux.com>
1135
1136 * unix.c (check_if_skip): If the max_mount_count is zero, treat it
1137 as having no count set.
1138
Theodore Ts'oef059872001-04-17 00:40:02 +000011392001-04-16 Theodore Tso <tytso@valinux.com>
1140
1141 * super.c (check_super_block): Fix bad calculation of
1142 inodes_per_block, and tighten min/max checks to be a bit
1143 more paranoid. Thanks to Andreas Dilger for pointing out
1144 this bug.
1145
Theodore Ts'o1f735032001-03-29 19:00:50 +000011462001-03-29 Theodore Tso <tytso@valinux.com>
1147
Theodore Ts'o15986f72001-03-29 19:22:16 +00001148 * journal.c (mark_buffer_uptodate): Add emulation of kernel
1149 function mark_buffer_uptodate.
1150
Theodore Ts'o1f735032001-03-29 19:00:50 +00001151 * recovery.c, revoke.c: Synchronize with 0.6b ext3 files.
1152
Theodore Ts'od0515212001-02-13 04:32:53 +000011532001-02-12 Theodore Tso <tytso@valinux.com>
1154
1155 * journal.c (e2fsck_run_ext3_journal): Force a flush of the
1156 filesystem and io_channel before replaying the journal.
1157
Theodore Ts'oa5c33f22001-01-18 02:34:03 +000011582001-01-17 Theodore Ts'o <tytso@valinux.com>
1159
1160 * pass1.c (check_blocks): Fix large file checking code so that
1161 files > 2GB are considered large files, and restrict
1162 directories from being > 2GB.
1163
Theodore Ts'o7e92dfa2001-01-12 15:30:25 +000011642001-01-12 Theodore Ts'o <tytso@valinux.com>
1165
Theodore Ts'oa9ca2012001-01-12 21:53:25 +00001166 * journal.c (e2fsck_journal_fix_unsupported_super): Remove unused
1167 function. Add FIXME notes to e2fsck_get_journal(), from
1168 Andreas Dilger.
1169
1170 * pass1.c (e2fsck_pass1): Cap the maximum legal size of a file by
1171 the limit caused by the fact that i_blocks is in 512 byte
1172 units, and that the Linux buffer cache also fundamentally
1173 assumes 512 byte sectors.
1174 Make sure that the journal inode is a regular file, and
1175 when clearing an unused journal inode, make sure the
1176 icount db is updated.
1177
1178 * problem.c, problem.h (PR_1_JOURNAL_BAD_MODE): Add new problem code.
1179
Theodore Ts'o37b6b292001-01-12 21:16:13 +00001180 * problem.c: For PR_1_RESERVED_BAD_MODE, print a description of
1181 the reserved inode. In PR_0_JOURNAL_HAS_JOURNAL, prompt
1182 to clear the journal, rather than deleting it (which is
1183 more accurate). (From Andreas Dilger.)
1184
Theodore Ts'o6a6d3d42001-01-12 21:11:24 +00001185 * journal.c: Make sure all functions which return an error code
1186 use the errcode_t return type, and not "int"
1187 (e2fsck_journal_release): Add new parameter, "drop",
1188 which is used when we just want to deallocate the journal
1189 without trying to write out any changes.
1190 (mark_buffer_clean): New function
1191 (e2fsck_check_ext3_journal): If we fail loading the
1192 journal, make sure we free all memory associated with it.
1193 (recover_ext3_journal): If we fail to load the journal or
1194 initialize the revoke data structures, make sure we free all
1195 memory associated with the journal.
1196
Theodore Ts'o721edd02001-01-12 21:05:57 +00001197 * message.c (special_inode_name): Add more special inode names
1198 (From Andreas Dilger)
1199
Theodore Ts'o58a75172001-01-12 20:59:19 +00001200 * util.c (fatal_error): Check to make sure the io_manager data
1201 structure is sane before trying to flush the io_channel.
1202 (From Andreas Dilger)
1203
Theodore Ts'o721edd02001-01-12 21:05:57 +00001204 * mtrace.h, super.c, pass2.c: Minor whitespace cleanups, from
1205 Andreas Dilger.
Theodore Ts'o4035f402001-01-12 20:25:50 +00001206
Theodore Ts'o7e92dfa2001-01-12 15:30:25 +00001207 * journal.c (e2fsck_journal_fix_bad_inode): Set pctx->ino to the
1208 bad journal number.
1209
1210 * problem.c (PR_0_JOURNAL_BAD_INODE): Use pctx->ino instead of
1211 pctx->num when printing the bad journal inode number.
1212
Theodore Ts'o86c627e2001-01-11 15:12:14 +000012132001-01-11 <tytso@snap.thunk.org>
1214
Theodore Ts'o5ba23cb2001-01-11 19:15:02 +00001215 * pass1.c (process_block): Remove dead code which was never
1216 getting executed.
1217
1218 * iscan.c, unix.c, e2fsck.h: Don't use NOARGS, and use
1219 ext2fs_sync_device() instead of using BLKFLSBUF.
1220
1221 * flushb.c: Don't use NOARGS anymore; everything is STDC these days.
1222
Theodore Ts'o86c627e2001-01-11 15:12:14 +00001223 * dirinfo.c, e2fsck.h, emptydir.c, iscan.c, jfs_user.h, journal.c,
1224 message.c, pass1.c, pass1b.c, pass2.c, pass3.c, pass4.c,
1225 pass5.c, problem.h, scantest.c, super.c, swapfs.c: Change
1226 ino_t to ext2_ino_t.
1227
Theodore Ts'o95a5bc92001-01-11 04:58:21 +000012282001-01-09 <tytso@snap.thunk.org>
1229
1230 * problem.c: Fix another broken @F vs @f problem.
1231
Theodore Ts'o53ef44c2001-01-06 05:55:58 +000012322001-01-06 <tytso@snap.thunk.org>
1233
1234 * journal.c, pass1.c, pass1b.c, pass3.c, recovery.c, revoke.c,
1235 super.c, unix.c, util.c: Fix random gcc -Wall complaints.
1236
1237 * jfs_user.h: Use more sophisticated inline handling to allow
1238 building with --enable-gcc-wall
1239
Theodore Ts'od3f35b62001-01-03 13:00:43 +000012402001-01-03 <tytso@snap.thunk.org>
1241
Theodore Ts'of18996c2001-01-03 16:57:24 +00001242 * pass1.c (e2fsck_pass1): Moved journal inode handling out to its
1243 own block; if the journal inode is not in use, and it
1244 contains data, offer to clear it.
1245
1246 * problem.h, problem.c (PR1_JOURNAL_INODE_NOT_CLEAR): Add new
1247 problem code.
1248
1249 * problem.c: Modified problem table to use a new abbreviations.
1250
Theodore Ts'od74edf42001-01-03 19:38:04 +00001251 * message.c: Add @j abbreviation for journal, and @v abbreviation
Theodore Ts'oe9044062001-01-03 15:39:37 +00001252 for device.
Theodore Ts'o1ce64532001-01-03 15:34:20 +00001253
Theodore Ts'occ7067b2001-01-03 13:24:06 +00001254 * jfs_user.h: Moved contents of jfs_e2fsck.h into jfs_user.h.
1255
Theodore Ts'od3f35b62001-01-03 13:00:43 +00001256 * journal.c (e2fsck_check_ext3_journal): Force a fsck if we remove
1257 the journal stored on a reserved inode. Also force a fsck
1258 if the journal appears to exist while !NEEDS_RECOVERY, and
1259 we forcibly reset the journal.
1260
Theodore Ts'of5ae75e2001-01-01 14:52:52 +000012612001-01-01 <tytso@snap.thunk.org>
1262
Theodore Ts'o5dd8f962001-01-01 15:51:50 +00001263 * journal.c, pass1.c, super.c, unix.c: Replace use of struct
1264 ext2fs_sb with struct ext2_super_block.
1265
Theodore Ts'of5ae75e2001-01-01 14:52:52 +00001266 * pass1.c (check_blocks): Remove use of EXT2_HAS_*_FEATURE macros.
1267
Theodore Ts'o2fe1efe2000-12-31 13:39:17 +000012682000-12-31 <tytso@snap.thunk.org>
1269
1270 * jfs_compat.h: Remove uneeded header file.
1271
Theodore Ts'ob2f93192000-12-30 20:33:42 +000012722000-12-30 <tytso@snap.thunk.org>
1273
Theodore Ts'oc59a7042000-12-31 01:52:03 +00001274 * malloc.h, mtrace.c: Renamed malloc.h to mtrace.h to avoid
1275 conflicts with the system header file.
1276
Theodore Ts'ob2f93192000-12-30 20:33:42 +00001277 * problem.h: Fixed numbering of pass1 error messages; an extra 0
1278 had slipped into some of the numbers. (Pointed out by
1279 Andreas Dilger)
1280
1281 * journal.c (e2fsck_journal_fix_corrupt_super): Clean up
1282 unnecessary automatic variable. Add explanatory comment
1283 about the kernel emulation routines. (Suggested by
1284 Andreas Dilger)
1285
Theodore Ts'o060b5fb2000-12-13 18:07:23 +000012862000-12-13 Theodore Ts'o <tytso@valinux.com>
1287
Theodore Ts'o9b565752000-12-13 18:50:22 +00001288 * journal.c (e2fsck_check_ext3_journal): Check to make sure the
1289 journal fields are consistent if any of the superblock
1290 fields are set. (Backs out erroneous change made by sct,
1291 pointed out by Andreas.)
1292
1293 * unix.c (main): Clarify coments (no code changes)
1294
1295 * super.c (release_orphan_inodes): Fix spelling typo in error message.
1296
Theodore Ts'o8188c9e2000-12-13 18:39:14 +00001297 * pass1.c (e2fsck_pass1): Offer to update the filesystem revision
1298 level if we need to set large files flag. Patch from
1299 Andreas Dilger.
1300
Theodore Ts'o7b59f1e2000-12-13 18:11:44 +00001301 * super.c (check_super_block): If we have any of the compatibility
1302 flags set, we need to have a revision 1 filesystem. Most
1303 kernels will not check the flags on a rev 0 filesystem
1304 and we may have corruption issues because of the
1305 incompatible changes to the filesystem. Patch from Andreas
1306 Dilger.
1307
Theodore Ts'o060b5fb2000-12-13 18:07:23 +00001308 * problem.c, problem.h (PR_0_FS_REV_LEVEL, PR_1_FS_REV_LEVEL): Add
1309 new problem codes.
1310
Theodore Ts'o0e8a9562000-12-09 06:41:25 +000013112000-12-09 <tytso@snap.thunk.org>
1312
Theodore Ts'obf2d4992000-12-09 14:46:20 +00001313 * flushb.c: Fix flushb so that it does something other than waste
1314 disk space when built on systems with modern header files
1315 and add a non-subtle Copyright Licensing restriction so
1316 Yann will remove it from the Debian Distribution. (Now
1317 violates the Debian Free Software Guidelines, on purpose.)
1318
Theodore Ts'of43650c2000-12-09 06:47:56 +00001319 * journal.c (e2fsck_check_ext3_journal): If JFS_DEBUG is defined
1320 at the top level, set the JFS debuging level to 2.
1321
Theodore Ts'o0e8a9562000-12-09 06:41:25 +00001322 * jfs_e2fsck.h, jfs_user.h: Replaces jfs_compat.h. The jfs.h file
1323 has been moved to the include/linux directory.
1324
1325 * journal.c, revoke.c, recovery.c: Updated files from Stephen to
1326 support the V2 superblock and revoke processing. The
1327 journal.c and revoke.c files are copies from the ext3
1328 kernel source.
1329
1330 * Makefile.in: Added revoke.c to the list of source/object files.
1331
Theodore Ts'o133a56d2000-11-17 05:40:49 +000013322000-11-16 Theodore Ts'o <tytso@valinux.com>
1333
1334 * pass1b.c: Change routines to use PR_1B_BLOCK_ITERATE when
1335 reporting problems rather than using com_err directly.
1336
1337 * problem.c, problem.h (PR_1B_BLOCK_ITERATE): Add new problem code.
1338
1339 * message.c (expand_percent_expression): Add safety check. If
1340 ctx->str is NULL, print "NULL" instead of dereferencing
1341 the null pointer.
1342
1343 * pass1b.c, pass2.c, pass3.c: Change calls to ext2fs_block_iterate
1344 to ext2fs_block_iterate2, to support 64-bit filesizes and
1345 to speed things up slightly by avoiding the use of the
1346 ext2fs_block_iterate's compatibility shim layer.
1347
Theodore Ts'o3f65f1a2000-10-30 14:33:49 +000013482000-10-30 <tytso@snap.thunk.org>
1349
1350 * util.c (get_backup_sb): Calculate backup superblock correctly
1351 when the blocksize is > 1k.
1352
Theodore Ts'o241f2242000-10-26 20:42:07 +000013532000-10-26 <tytso@snap.thunk.org>
1354
1355 * jfs.h, jfs_compat.h, journal.c: Updated to include the
1356 definition of the new journal superblock format; still
1357 only supports V1 superblocks for now. (From sct)
1358
Theodore Ts'ob09a4b02000-10-24 21:16:09 +000013592000-10-24 <tytso@snap.thunk.org>
1360
Theodore Ts'o83949022000-10-25 01:38:50 +00001361 * super.c (release_inode_block, release_inode_blocks,
1362 release_orphan_inodes): Add code to deal with truncating
1363 inodes which are still in use (but which are on the orphan
1364 list because they need truncation).
1365
1366 * problem.c, problem.h: Rename PR_0_CLEAR_ORPHAN_INODE to
1367 PR_0_ORPHAN_CLEAR_INODE, and remove
1368 PR_0_ORPHAN_INODE_INUSE.
1369
1370 * journal.c (e2fsck_run_ext3_journal): Add i18n support, and print
1371 a message when the journal is being recovered.
1372
Theodore Ts'ob09a4b02000-10-24 21:16:09 +00001373 * pass1.c (e2fsck_pass1): Don't check the i_mode field for the
1374 journal inode, if it is in use.
1375
Theodore Ts'oadfca562000-09-12 21:24:36 +000013762000-09-12 <tytso@valinux.com>
1377
1378 * extend.c:
1379 * flushb.c: Add include of nls-enable.h which is necessary so that
1380 they can compile correctly.
1381
Theodore Ts'occ96b2b2000-08-22 21:30:11 +000013822000-08-22 <tytso@valinux.com>
1383
Theodore Ts'o2575fb02000-08-22 21:50:04 +00001384 * unix.c (main): If we're doing a read-only check, skip the
1385 journal playback, but don't abort the e2fsck run.
1386
Theodore Ts'o99a2cc92000-08-22 21:41:52 +00001387 * super.c (release_orphan_inodes): Fix typo; should do bounds
1388 checking on next_ino instead of ino.
1389
1390 * jfs_compat.h (J_ASSERT):
1391 * journal.c (e2fsck_run_ext3_journal):
1392 * pass3.c (adjust_inode_count): Use fatal_error() instead of exit().
1393
Theodore Ts'o243dc312000-08-22 21:37:47 +00001394 * unix.c: Use fatal_error() instead of exit() whenever possible.
1395 Also fix the fsck exit codes so that we use FSCK_USAGE
1396 when it is appropriate. Rename global_signal_ctx to
1397 e2fsck_global_ctx and let it be exported globally.
1398
Theodore Ts'occ96b2b2000-08-22 21:30:11 +00001399 * util.c (fatal_error): Try to flush the I/O manager before
1400 forcing an exit.
1401
Theodore Ts'oecf1b772000-08-20 22:06:31 +000014022000-08-20 <tytso@valinux.com>
1403
1404 * journal.c (e2fsck_journal_load): Fix **nasty** bug which caused
1405 e2fsck_check_ext3_journal to smash the journal because
1406 journal->j_transaction_sequence wasn't getting
1407 initialized.
1408
1409 * journal.c: (recover_ext3_journal, e2fsck_run_ext3_journal): Move
1410 call to e2fsck_clear_recover from recover_ext3_journal to
1411 after the filesystem has been closed and reopened.
1412 Otherwise, the superblock in the filesystem handle will
1413 probably be stale, and will overwrite the newer version of
1414 the superblock written by the log recovery.
1415
1416 * message.c (expand_inode_expression): Add support for %Iu and %Ig
1417
1418 * problem.h (PR_0_CLEAR_ORPHAN_INODE): Add new problem code.
1419
1420 * super.c (release_orphan_inodes, release_inode_block,
1421 release_inode_blocks): Update the block group descriptor
1422 counts when freeing the orphan inode. Use
1423 PR_0_CLEAR_ORPHAN_INODE to report when we clear an orphan.
1424
1425 * journal.c (e2fsck_run_ext3_journal): Fix a bug where we
1426 attempted to reopen the filesystem using the device name
1427 instead of the filesystem name.
1428
Theodore Ts'o80bfaa32000-08-18 15:08:37 +000014292000-08-18 <tytso@valinux.com>
1430
1431 * Makefile.in: Update the make dependencies
1432
1433 * problem.c, problem.h: Add the problem codes:
1434 PR_0_ORPHAN_ILLEGAL_BLOCK_NUM,
1435 PR_0_ORPHAN_ALREADY_CLEARED_BLOCK,
1436 PR_0_ORPHAN_ILLEGAL_HEAD_INODE,
1437 PR_0_ORPHAN_ILLEGAL_INODE, PR_0_ORPHAN_INODE_INUSE
1438
1439 * super.c (release_inode_blocks, release_orphan_inodes,
1440 check_super_block): Add support for clearing orphaned
1441 inodes from the unmounted filesystem.
1442
1443 * journal.c (e2fsck_recover_ext3_journal): Remove the last orphan
1444 check; this is now handled in check_super_block ---
1445 non-journaled filesystems can use the orphan list in the
1446 future. Also, move the the re-opening of the filesystem
1447 to e2fsck_run_ext3_journal().
1448
Theodore Ts'o3b5386d2000-08-14 14:25:19 +000014492000-07-12 Andreas Dilger <adilger@turbolinux.com>
1450
1451 * journal.c: implement loading of ext3 journal for recovery code
1452
1453 * problem.c (fix_problem): return answer from PR_AFTER_CODE to caller.
1454 Add journal problems.
1455
1456 * recovery.c (journal_recover): user-space ext3 journal recovery code
1457
1458 * unix.c (main) : check journal and do recovery in separate steps
1459
Theodore Ts'ob8d164c2000-08-08 03:17:04 +000014602000-08-07 <tytso@snap.thunk.org>
1461
1462 * unix.c (calc_percent): Make sure that we don't take a floating
1463 exception if the max value is zero. (should normally
1464 never happen, but...)
1465
Theodore Ts'of9e67062000-07-13 23:25:54 +000014662000-07-13 <tytso@valinux.com>
1467
1468 * Release of E2fsprogs 1.19
1469
Theodore Ts'o17390c02000-07-07 04:13:21 +000014702000-07-06 Theodore Ts'o <tytso@valinux.com>
1471
1472 * unix.c (check_if_skip): Modify algorithm for checking
1473 s_max_mnt_count to match with the kernel. (If
1474 s_max_mnt_count is negative, ignore the mnt_count check.)
1475
1476 * unix.c (e2fsck_update_progress): Adjust the width of the
1477 progress bar dynamically, based on the filesystem name
1478 that we need to display.
1479
1480 * unix.c (main): If the ext3 needs_recovery flag is set, call
1481 e2fsck_run_ext3_journal() and then restart the e2fsck run.
1482
1483 * journal.c (e2fsck_run_ext3_journal): New file which contains
1484 logic to recover the ext3 journal. This version relies on
1485 the kernel being able to mount the filesystem in order to
1486 run the journal.
1487
Theodore Ts'o92269042000-07-05 18:25:59 +000014882000-07-05 Theodore Ts'o <tytso@valinux.com>
1489
1490 * unix.c (e2fsck_update_progress): Only save and check the last
1491 percentage after multiplying it by 10, nor 1000, since we
1492 only need to save values to a tenth of a percent (and the
1493 percentage is already from 0 .. 100%, not 0 .. 1).
Theodore Ts'oe4c8e882000-07-05 23:54:46 +00001494 Also, re-arrange the logic so that we do the time
1495 check only after doing the percentage check, and we
1496 only advance the spinner if we're about to display it.
Theodore Ts'o92269042000-07-05 18:25:59 +00001497
Theodore Ts'o9cbfb8d2000-07-04 19:51:22 +000014982000-07-04 Theodore Ts'o <tytso@valinux.com>
1499
1500 * pass1.c (e2fsck_pass1): Check to see if the ext3 s_last_orphan
1501 field is set; if so, clear it, so that ext3 mounting code
1502 won't get confused by the fact that we've cleared out the
1503 orphaned inodes.
1504
Theodore Ts'obbd47d72000-06-10 19:21:33 +000015052000-06-10 Theodore Ts'o <tytso@valinux.com>
1506
1507 * pass5.c (check_block_bitmaps, check_inode_bitmaps): Add error
1508 checking for a "should never happen case".
1509
1510 * problem.c, problem.h (PR_5_COPY_IBITMAP_ERROR,
1511 PR_5_COPY_BBITMAP_ERROR): Add new error codes.
1512
Theodore Ts'od647a1e2000-05-27 14:40:09 +000015132000-05-27 Theodore Ts'o <tytso@valinux.com>
1514
1515 * pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
1516 (cw@foof.org) which checks to see if special devices have
1517 a non-zero size, and deals with it.
1518
1519 * problem.c, problem.h (PR1_SET_NONZSIZE): Add new problem code.
1520
Theodore Ts'o1d279212000-05-19 02:38:14 +000015212000-05-18 Theodore Ts'o <tytso@valinux.com>
1522
1523 * Makefile.in (install): Create a symbolic link for fsck.ext3 as
1524 well.
1525
Theodore Ts'o4ea0a112000-05-08 13:33:17 +000015262000-05-08 Theodore Ts'o <tytso@valinux.com>
1527
1528 * problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem
1529 code.
1530
1531 * super.c (check_super_block): If the OS type in the superblock is
1532 the Hurd, check to see if the filetype feature is set, and
1533 offer to clear it if so. This needs to be done since the
1534 Hurd doesn't properly support the filetype feature.
1535 (And since the hurd allows the transmogrification of files
1536 to special files and vice versa --- for no good reason
1537 that I can understand --- it can't support the filetype
1538 feature for the forseeable future, either.)
1539
Theodore Ts'o373b8332000-04-03 16:22:35 +000015402000-04-03 Theodore Ts'o <tytso@valinux.com>
1541
1542 * unix.c: For platforms that don't define optarg.h, manually
1543 define optarg and optind.
1544
Theodore Ts'o01fbc702000-04-03 13:57:21 +000015452000-03-20 Theodore Ts'o <tytso@valinux.com>
1546
1547 * pass1.c (check_immutable, e2fsck_pass1_check_device_inode):
1548 Check for the append-only as well as the immutable flag.
1549
1550 * problem.c (PR_1_SET_IMMUTABLE): Adjust message to include
1551 append-only flag. Fix comment for compression flag.
1552
Theodore Ts'o06012322000-02-12 20:12:43 +000015532000-02-12 <tytso@snap.thunk.org>
1554
1555 * unix.c (e2fsck_update_progress): Limit the number of updates to
1556 the progress bars to 8 times a second. This allows a 9600
1557 baud console link to keep up.
1558
Theodore Ts'o19178752000-02-11 15:55:07 +000015592000-02-11 <tytso@snap.thunk.org>
1560
1561 * unix.c (main): If compression is enabled on the filesystem,
1562 print a warning message (for now).
1563
1564 * message.c: Add new compression shortcut: @c == compress
1565
1566 * problem.c, problem.h (PR_1_COMPR_SET): Add new error code.
1567
1568 * pass1.c (check_blocks): If the inode has EXT2_COMPRBLK_FL flag
1569 set, check to see if the filesystem supports compression.
1570 If it does pass this information down to process_block()
1571 so it can treat the compressed block flag words
1572 correctly. If not, offer to clear the flag, since it
1573 shouldn't be set.
1574 (process_block): If an inode has the compressed inode flag
1575 set, allow EXT2FS_COMPRESSED_BLKADDR.
1576
1577 * pass1b.c (process_pass1b_block, delete_file_block,
1578 clone_file_block):
1579 * pass2.c (deallocate_inode_block): Use HOLE_BLKADDR to check to
1580 see if the block can be skipped.
1581
Theodore Ts'o28ffafb2000-02-08 19:14:02 +000015822000-02-08 <tytso@snap.thunk.org>
1583
Theodore Ts'o4ee4ad32000-02-08 23:22:19 +00001584 * util.c: Make resource tracking message more concise.
1585
Theodore Ts'o80c5d7e2000-02-08 23:19:32 +00001586 * e2fsck.h:
1587 * pass1.c (mark_table_blocks, e2fsck_pass1): Remove
1588 ctx->block_illegal_map, since it's not needed by pass1,
1589 and pass1b has been modified to calculate it manually if
1590 needed. This reduces the memory footprint needed by e2fsck.
1591
1592 * pass1b.c (check_if_fs_block): New static function which returns
1593 whether or not a block overlaps with filesystem metadata.
1594 This replaces consulting the block_illegal_map bitmap.
1595
Theodore Ts'o28ffafb2000-02-08 19:14:02 +00001596 * Makefile.in: Call sync after finishing building all in this
1597 directory.
1598
1599 * unix.c (PRS): sync the filesystem before trying to use
1600 BLKFLSBUF, to minimize the chance of causing dirty blocks
1601 to get dropped.
1602
1603 * e2fsck.h: Manually define BLKFLSBUF if not defined, and we're on
1604 a Linux/i386 system.
1605
1606 * pass3.c (check_directory): Only do the loop detection algorithm
1607 if we've searched over 2048 parent directories and haven't
1608 found the end yet. This means that in the common case, we
1609 don't allocate or clear the inode_loop_detection bitmap,
1610 which for large systems, merely clearing the bitmap for
1611 each directory was turning out to be quite expensive.
1612 Thanks to Jani Jaakkola (jjaakkol@cs.helsinki.fi) for
1613 identifying this problem.
1614
Theodore Ts'o0c4a0722000-02-07 03:11:03 +000016152000-02-06 Theodore Ts'o <tytso@valinux.com>
1616
1617 * badblocks.c, e2fsck.h, ehandler.c, emptydir.c, extend.c,
1618 flushb.c, iscan.c, message.c, pass1.c, pass1b.c, pass3.c
1619 pass4.c, pass5.c, problem.c, scantest.c, swapfs.c,
1620 unix.c, util.c: Add Internationalization support as
1621 suggested by Marco d'Itri <md@linux.it>.
1622
Theodore Ts'o80e808f2000-02-02 16:19:59 +000016232000-02-02 Theodore Ts'o <tytso@valinux.com>
1624
1625 * e2fsck.h, flushb.c, scantest.c: Remove uneeded include of
1626 linux/fs.h
1627
Theodore Ts'o894edb22000-01-18 21:27:12 +000016282000-01-18 Theodore Ts'o <tytso@valinux.com>
1629
1630 * Makefile.in: Since LIBUUID can sometimes include "-lsocket"
1631 we need a separate DEPLIBUUID that can be used in
1632 Makefile's dependency rules.
1633
Theodore Ts'oa1ccadb1999-11-23 13:57:16 +000016341999-11-23 <tytso@valinux.com>
1635
1636 * e2fsck.8.in: Update language about where to find a backup
1637 superblock.
1638
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +000016391999-11-19 <tytso@valinux.com>
1640
Theodore Ts'o86a63e91999-11-23 13:52:48 +00001641 * pass1.c (process_inodes): Add shortcut handling; if
1642 process_inodes_count is zero, return right away, to avoid
1643 calling qsort with a non-positive count.
1644
Theodore Ts'oec8d2c31999-11-19 18:52:36 +00001645 * message.c (safe_print): Fix to properly display ^A, ^B, etc. and
1646 to print Delete as ^?
1647
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +00001648 * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
1649 the source directory.
1650
Theodore Ts'oa846d2f1999-11-10 15:50:24 +000016511999-11-10 <tytso@valinux.com>
1652
Theodore Ts'ocd086361999-11-10 16:00:39 +00001653 * Release of E2fsprogs 1.18
1654
16551999-11-10 <tytso@valinux.com>
1656
Theodore Ts'oa846d2f1999-11-10 15:50:24 +00001657 * problem.c (fix_problem): Support a new flag, PR_PREEN_NO which
1658 means the answer is assumed to be no in preen mode. This
1659 is now used in the PR_1_SET_IMMUTABLE code, so that in
1660 preen mode we ignore these inodes and just print a warning
1661 message.
1662
Theodore Ts'o6fdc7a31999-11-10 13:34:40 +000016631999-11-09 <tytso@valinux.com>
1664
1665 * pass1.c (e2fsck_pass1): If the filesystem does not support
1666 imagic inodes, if an inode has the imagic flag set, offer
1667 to clear the imagic flag. If a valid device/fifo/socket
1668 has the immutable flag set, call the new helper function
1669 check_immutable() to offerto clear the immutable flag.
1670
1671 * pass2.c (check_filetype): Use the new ext2_file_type() helper
1672 function instead of calculating the file_type information
1673 manually.
1674
1675 * pass3.c (e2fsck_reconnect_file): When adding a link to
1676 lost+found, calculate the filetype information so that
1677 ext2fs_link() can use the information if applicable.
1678 (get_lost_and_found): Create the /lost+found directory
1679 with the correct filetype information if applicable.
1680
1681 * util.c (ext2_file_type), e2fsck.h: New function which returns
1682 the directory entry file type information given the
1683 inode's mode bits.
1684
1685 * problem.c, problem.h: Added new problem codes PR_1_SET_IMAGIC
1686 and PR_1_SET_IMMUTABLE.
1687
Theodore Ts'o7142db01999-11-08 18:46:54 +000016881999-11-07 <tytso@valinux.com>
1689
1690 * pass4.c (e2fsck_pass4): Clear inode_imagic_map after freeing it,
1691 to prevent it from getting freed twice.
1692
16931999-11-06 <tytso@valinux.com>
1694
1695 * unix.c (main): Close the filesystem before freeing the context,
1696 so that in the event of a free()-related segmentation
1697 violation, the filesystem is properly closed and written
1698 out.
1699
17001999-10-27 <tytso@valinux.com>
1701
1702 * e2fsck.c (e2fsck_reset_context): When freeing
1703 ctx->inode_reg_map, we weren't zero'ing
1704 ctx->inode_reg_map, which could cause a segfault later on
1705 in the e2fsck run.
1706
17071999-10-26 <tytso@valinux.com>
1708
1709 * problem.h (PR_2_SPLIT_DOT): Fix excess zero in problem code (now
1710 matches the standard convention).
1711
Theodore Ts'of68aa411999-10-26 14:20:22 +000017121999-10-26 <tytso@valinux.com>
1713
Theodore Ts'o28e11941999-10-26 18:17:20 +00001714 * Release of E2fsprogs 1.17
1715
17161999-10-26 <tytso@valinux.com>
1717
Theodore Ts'of68aa411999-10-26 14:20:22 +00001718 * message.c (safe_print): Make safe_print take an char instead of
1719 an unsigned char to fix gcc warnings.
1720
Theodore Ts'oc40db6d1999-10-25 21:03:34 +000017211999-10-25 <tytso@valinux.com>
1722
Theodore Ts'oe6597041999-10-26 02:30:16 +00001723 * util.c: For NT portability, don't redefine getchar(), since
1724 stdio defines that. Instead we introduce a new
1725 abstract macro read_a_char() which is #defined to the
1726 right function as necessary.
1727
Theodore Ts'oc40db6d1999-10-25 21:03:34 +00001728 * problem.c, problem.h (PR_2_NULL_NAME): Add new problem code.
1729
1730 * pass2.c (check_dir_block): Require that the length of the
1731 directory entry be at least 12 bytes. Check to see if the
1732 filename is zero-length, and flag that as an error.
1733
Theodore Ts'o7847c1d1999-10-22 15:11:42 +000017341999-10-22 <tytso@valinux.com>
1735
Theodore Ts'o614fdfd1999-10-23 03:19:51 +00001736 * Release of E2fsprogs 1.16
1737
17381999-10-22 <tytso@valinux.com>
1739
Theodore Ts'o7847c1d1999-10-22 15:11:42 +00001740 * pass2.c (check_filetype): If the filetype filesystem feature is
1741 not set, and a directory entry has a dirent feature, offer
1742 to clear it (since 2.0 kernels will do complain will
1743 interpret it as a very large name length field).
1744
1745 * problem.c (PR_2_CLEAR_FILETYPE): Add new problem code.
1746
Theodore Ts'oaa4115a1999-10-21 19:33:18 +000017471999-10-21 <tytso@valinux.com>
1748
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +00001749 * e2fsck.8.in: Update man page to use a more standard format (bold
1750 option flags and italicized variables), as suggested by
1751 Andreas Dilger (adilger@enel.ucalgary.ca)
1752
Theodore Ts'oaa4115a1999-10-21 19:33:18 +00001753 * pass4.c (e2fsck_pass4): If an inode is set in the
1754 inode_imagic_map bitmap, don't check to see if it is
1755 disconnected from the inode tree (because it almost
1756 certainly will be). Free inode_imagic_map at the end of
1757 pass 4.
1758
1759 * pass2.c (check_dir_block, check_filetype): If the FILETYPE
1760 feature is set, check the directory entry's filetype
1761 information field, and fix/set it if necessary.
1762 (e2fsck_pass2): Free the inode_reg_map bitmap at the end
1763 of pass 2.
1764
1765 * pass1.c (e2fsck_pass1, alloc_imagic_map): Allocate and fill in
1766 information for inode_reg_map and inode_imagic_map, which
1767 indicates which inodes are regular files and AFS inodes,
1768 respectively.
1769 Since only the master superblock is written during a
1770 restart, force that superblock to be used after a restart;
1771 otherwise changes to the block group descriptors end up
1772 getting ignored.
1773
1774 * problem.c, problemP.h: If e2fsck is run -n, make def_yn variable
1775 be 0 for "no". Add support for a new flag, PR_NO_NOMSG,
1776 which supresses the problem message if e2fsck is run with
1777 the -n option.
1778
1779 * problem.c, problem.h (PR_2_SET_FILETYPE, PR_2_BAD_FILETYPE): Add
1780 new problem codes.
1781
1782 * message.c (expand_dirent_expression): Add support for %dt which
1783 prints the dirent type information.
1784
1785 * e2fsck.c (e2fsck_reset_context): Free new bitmaps (inode_reg_map
1786 and inode_imagic_map).
1787
1788 * e2fsck.h (e2fsck_t): Add new inode_reg_map and inode_magic_map
1789 to the context structure.
1790
Theodore Ts'o9ecd8be1999-10-20 18:24:31 +000017911999-09-24 <tytso@valinux.com>
1792
1793 * unix.c (PRS), util.c (ask_yn): Add #ifdef's to make
1794 e2fsprogs easier to port to non-Unix platforms.
1795
17961999-09-07 <tytso@valinux.com>
Theodore Ts'oc1faf9c1999-09-14 20:00:54 +00001797
1798 * pass3.c (adjust_inode_count): Fix bug where we didn't keep the
1799 internal and external inode counts in sync when we
1800 decremented an inode whose link count was already zero.
1801 Now we skip incrementing or decrementing both link counts
1802 if we would cause an overflow condition.
1803 (expand_dir, expand_dir_proc): Change where we update the
1804 inode block count and size files so that the block count
1805 field is updated correctly when we create an indirect block.
1806
Theodore Ts'o78cf0541999-10-20 18:29:18 +000018071999-08-05 <tytso@valinux.com>
1808
1809 * super.c (check_super_block): Check to see whether the
1810 inodes_per_group value in the superblock is insanely too
1811 high.
1812
Theodore Ts'oc1faf9c1999-09-14 20:00:54 +000018131999-08-02 <tytso@valinux.com>
1814
1815 * pass1b.c (clone_file_block): Don't clear the dup_map flag if
1816 the block also shares data with the fs metadata when
1817 the count drops to 1, since the block should still be
1818 cloned, as fs metadata isn't included in the count.
1819
18201999-07-18 Theodore Ts'o <tytso@valinux.com>
Theodore Ts'o657cb971999-07-30 23:19:10 +00001821
1822 * Release of E2fsprogs 1.15
1823
Theodore Ts'ob55199e1999-07-19 15:37:46 +000018241999-07-19 <tytso@valinux.com>
1825
1826 * unix.c (usage): Add minimalist emergency help to the usage
1827 message.
1828
Theodore Ts'o5596def1999-07-19 15:27:37 +000018291999-07-18 <tytso@valinux.com>
1830
1831 * unix.c: Add support for calculating a progress bar if the -C0
1832 option is given. The function e2fsck_clear_progbar()
1833 clears the progress bar and must be called before any
1834 message is issued. SIGUSR1 will enable the progress bar,
1835 and SIGUSR2 will disable the progress bar. This is used
1836 by fsck to handle parallel filesystem checks. Also, set
1837 the device_name from the filesystem label if it is
1838 available.
1839
1840 * e2fsck.h: Add new flags E2F_FLAG_PROG_BAR and
1841 E2F_FLAG_PROG_SUPRESS. Add new field in the e2fsck
1842 structure which contains the last tenth of a percent
1843 printed for the user.
1844
1845 * message.c (print_e2fsck_message): Add call to
1846 e2fsck_clear_progbar().
1847
1848 * pass1.c (e2fsck_pass1):
1849 * pass2.c (e2fsck_pass2):
1850 * pass3.c (e2fsck_pass3):
1851 * pass4.c (e2fsck_pass4):
1852 * pass5.c (e2fsck_pass5): Add call to e2fsck_clear_progbar when
1853 printing the resource tracking information.
1854
1855 * pass5.c (check_block_bitmaps, check_inode_bitmaps): If there is
1856 an error in the bitmaps, suppress printing the progress
1857 bar using the suppression flag for the remainder of the
1858 check, in order to clean up the display.
1859
Theodore Ts'o74033351999-07-01 03:00:47 +000018601999-06-30 <tytso@valinux.com>
1861
1862 * unix.c (check_mount): Clean up the abort message displayed when
1863 the filesystem is mounted and either stdout or stdin isn't
1864 a tty.
1865
18661999-06-25 <tytso@valinux.com>
Theodore Ts'oe72a9ba1999-06-25 15:40:18 +00001867
1868 * e2fsck.h:
1869 * pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
1870 pass1_check_directory, e2fsck_use_inode_shortcuts): Make
1871 pass1_* be private static functions, and create new
1872 function e2fsck_use_inode_shortcuts which sets and clears
1873 the inode shortcut functions in the fs structure.
1874
1875 * e2fsck.h:
1876 * pass2.c (e2fsck_process_bad_inode): Make process_bad_inode() an
1877 exported function.
1878
1879 * pass4.c (e2fsck_pass4): Call e2fsck_process_bad_inode to check
1880 if a disconnected inode has any problems before
1881 connecting it to /lost+found. Bug and suggested fix by
1882 Pavel Machek <pavel@bug.ucw.cz>
1883
18841999-06-21 <tytso@valinux.com>
Theodore Ts'o813bbb21999-06-22 03:17:45 +00001885
1886 * unix.c (main): Add missing space in the disk write-protected
1887 message.
1888
Theodore Ts'od4b0ce01999-06-18 01:09:29 +000018891999-05-22 <tytso@rsts-11.mit.edu>
1890
1891 * problem.c, problem.h (PR_0_INODE_COUNT_WRONG): Add new problem
1892 code.
1893
1894 * super.c (check_super_block): Add check to make sure the total
1895 number of inodes is sane, since this can be calculated
1896 from the number of groups times the number of inodes per
1897 group. Offer to correct it if it is incorrect.
1898
Theodore Ts'oe79d1b21999-06-18 01:06:59 +000018991999-03-19 <tytso@rsts-11.mit.edu>
1900
1901 * pass5.c (check_block_end): Fix fencepost condition where when
1902 clearing the block padding we were missing the last position
1903 in the bitmap.
1904
Theodore Ts'o75d83be1999-05-18 03:16:36 +000019051999-05-17 <tytso@rsts-11.mit.edu>
1906
1907 * unix.c (reserve_stdio_fds): Add safety check in case
1908 reserve_stdio_fds couldn't open /dev/null.
1909
Theodore Ts'o4a9f5931999-03-16 19:32:52 +000019101999-03-14 Theodore Ts'o <tytso@rsts-11.mit.edu>
1911
1912 * util.c (print_resource_track): Use mallinfo if present to get
1913 more accurate malloc statistics.
1914
1915 * pass3.c (get_lost_and_found): Check to see if lost+found is a
Theodore Ts'oc54b3c31999-07-03 07:20:06 +00001916 plain file; if so, offer to unlink it.
Theodore Ts'o4a9f5931999-03-16 19:32:52 +00001917
1918 * problem.c, problem.h (PR_3_LPF_NOTDIR): Add new problem code.
1919
19201999-03-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
1921
1922 * problem.c: Fix problem message for PR_1_BAD_GROUP_DESCRIPTORS so
1923 that the block group number is printed. Add new prompt,
1924 PROMPT_UNLINK.
1925
19261999-01-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
1927
1928 * Release of E2fsprogs 1.14
1929
Theodore Ts'o9e51eca1999-01-09 16:32:31 +000019301999-01-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
1931
1932 * message.c (safe_print): New function which prints strings,
1933 converting non-printable characters using the '^' and
1934 M-notation. This function is now used to print directory
1935 name entries and pathnames.
1936
Theodore Ts'o73f17cf1999-01-04 07:35:45 +00001937Mon Jan 4 02:28:59 1999 Theodore Y. Ts'o <tytso@mit.edu>
1938
1939 * unix.c (main): Reset the context before calling ext2fs_close(),
1940 to avoid referencing already freed memory.
1941
Theodore Ts'o556ad131998-12-19 08:10:58 +000019421998-12-15 Theodore Ts'o <tytso@rsts-11.mit.edu>
1943
1944 * Release of E2fsprogs 1.13
1945
Theodore Ts'o5a679c81998-12-03 16:40:38 +000019461998-12-03 Theodore Ts'o <tytso@rsts-11.mit.edu>
1947
1948 * Makefile.in: Updated dependencies.
1949
19501998-11-27 Theodore Ts'o <tytso@rsts-11.mit.edu>
1951
1952 * pass3.c (get_lost_and_found): If the filesystem is not opened
1953 read-only, then force /lost+found to be created if it is
1954 not present.
1955
1956 * problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen
1957 operation.
1958
Theodore Ts'o1dde43f1998-11-14 04:18:28 +000019591998-10-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
1960
1961 * unix.c (main): Move ext2fs_close() after e2fsck_free_context()
1962 since e2fsck_free_context may reference data in ctx->fs.
1963
1964 * e2fsck.c (e2fsck_reset_context): Make sure ctx->fs is non-NULL
1965 before checking ctx->fs->dblist.
1966
19671998-10-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
1968
1969 * pass1.c (e2fsck_pass1): Use the device check subroutine on
1970 FIFO's and Socket's, so that we catch bogus immutable inodes.
1971
1972 * pass2.c (process_bad_inode): Process bad socket and fifo's.
1973
1974 * problem.h, problem.c: Define new problem codes PR_2_BAD_FIFO and
1975 PR_2_BAD_SOCKET.
1976
Theodore Ts'o7f813ba1998-09-03 01:26:03 +000019771998-09-02 Theodore Ts'o <tytso@rsts-11.mit.edu>
1978
1979 * problem.c: Add PR_3_NO_DIRINFO error code.
1980
1981 * super.c (check_super_value): Rename min and max to min_val and
1982 max_val to avoid possible cpp macro conflicts.
1983
1984 * pass4.c (e2fsck_pass4): Rename max to maxgroup, to avoid
1985 possible cpp macro conflicts.
1986
1987 * pass3.c (e2fsck_pass3): Rename max to maxdirs, to avoid possible
1988 cpp macro conflicts.
1989 (check_directory): Fix logic to avoid possible core dump
1990 in the case of ext2fs_get_dir_info returning NULL. (By
1991 the time we get here, it should never happen, but...).
1992 Also simply/streamline the control flow of the function.
1993
Theodore Ts'o24fc5031998-08-26 15:23:31 +000019941998-08-17 Theodore Ts'o <tytso@rsts-11.mit.edu>
1995
1996 * unix.c (check_if_skip): Move the "not cleanly mounted" check
1997 ahead of the maximal mount and too long since checked tests.
1998 (reserve_stdio_fds): Make sure 0,1,2 file descriptors are
1999 open, so that we don't open the filesystem using the same
2000 file descriptor as stdout or stderr.
2001
Theodore Ts'of75c28d1998-08-01 04:18:06 +000020021998-08-01 Theodore Ts'o <tytso@rsts-11.mit.edu>
2003
2004 * pass2.c (e2fsck_pass2): Fix the progress accounting so that we
2005 get to 100%.
2006
2007 * pass3.c (e2fsck_pass3): Change progress accounting to be
2008 consistent with the other e2fsck passes.
2009
2010 * e2fsck.c (e2fsck_run): At the end of each pass, call the
2011 progress function with the pass number set to zero.
2012
2013 * unix.c (e2fsck_update_progress): If the pass number is zero,
2014 ignore the call, since that indicates that we just want to
2015 deallocate any progress structures.
2016
Theodore Ts'o8144d671998-07-09 05:33:18 +000020171998-07-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
2018
Theodore Ts'o4a5fa191998-07-09 05:42:45 +00002019 * Release of E2fsprogs 1.12
2020
20211998-07-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
2022
Theodore Ts'o8144d671998-07-09 05:33:18 +00002023 * unix.c (main): Fix typo in checking the incompat feature set; it
2024 should be checked against EXT2_LIB_FEATURE_INCOMPAT_SUPP.
2025
Theodore Ts'o1fad9041998-07-07 05:44:43 +000020261998-07-07 Theodore Ts'o <tytso@rsts-11.mit.edu>
2027
2028 * badblocks.c (test_disk): Don't clear the existing bad blocks
2029 list when using e2fsck -c, since it may cause blocks with
2030 marginal errors to be dropped from the bad blocks list.
2031
Theodore Ts'o874b4d21998-07-06 14:33:12 +00002032Mon Jul 6 10:32:11 1998 Theodre Ts'o <tytso@lurch.mit.edu>
2033
2034 * pass1.c (e2fsck_pass1): Use ext2fs_sb structure for
2035 compatibility with older kernels.
2036
Theodore Ts'o818180c1998-06-27 05:11:14 +000020371998-06-25 Theodore Ts'o <tytso@rsts-11.mit.edu>
2038
2039 * unix.c (e2fsck_update_progress): Remove unused variables.
2040
Theodore Ts'o9d1bd3d1998-06-10 20:45:22 +000020411998-06-10 Theodore Ts'o <tytso@rsts-11.mit.edu>
2042
2043 * pass1.c, problem.h: Change blkcnt_t to be e2_blkcnt_t to avoid
2044 collision with LFS API.
2045
2046 * pass1.c (e2fsck_pass1): Fix bug so that ext2_max_sizes is
2047 properly initialized.
2048 (e2fsck_pass1): Don't allow the the boot loader inode to
2049 be a directory (clear the inode mode field if so).
2050
Theodore Ts'oefac9a11998-05-07 05:02:00 +000020511998-05-07 Theodore Ts'o <tytso@rsts-11.mit.edu>
2052
2053 * unix.c (PRS): Added new option -C, which causes e2fsck to print
2054 progress updates so that callers can keep track of the
2055 completion progress of e2fsck. Designed for use by
2056 progress, except for -C 0, which prints a spinning report
2057 which may be useful for some users.
2058
2059 * pass5.c (e2fsck_pass5): Use a finer-grained progress reporting
2060 scheme (useful for larger filesystems).
2061
2062 * e2fsck.h: Add progress_fd and progress_pos, for use by the Unix
2063 progress reporting functions.
2064
Theodore Ts'o4c77fe51998-04-30 17:35:59 +000020651998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
2066
2067 * pass1.c (process_inode_cmp): Use EXT2_QSORT_TYPE to define the
2068 appropriate return type for comparison functions for qsort.
2069
2070 * e2fsck.h: Add #ifdef protection for unistd.h
2071
2072 * super.c: Remove header files already included by e2fsck.h
2073
Theodore Ts'o76f875d1998-04-27 01:41:13 +000020741998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
2075
2076 * dirinfo.c (e2fsck_add_dir_info): Update function to pass the old
2077 size of the memory to be resized to ext2fs_resize_mem().
2078
Theodore Ts'o7e44f241998-04-01 03:16:29 +000020791998-03-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
2080
2081 * Makefile.in: Change to use new installation directory variables
2082 convention. Fix uninstall rules to take $(DESTDIR) into
2083 account. Remove cat8dir from the installdirs target,
2084 since modern man package don't necessarily put the cat
2085 directory in /usr/man/cat?.
2086
Theodore Ts'o17dba281998-03-30 01:16:26 +000020871998-03-29 Theodore Ts'o <tytso@rsts-11.mit.edu>
2088
2089 * super.c, e2fsck.h: Always declare e2fsck_get_device_size() as an
2090 extern in e2fsck.h to prevent -Wall warnings.
2091
2092 * pass4.c (e2fsck_pass4): Remove unused variable 'j'.
2093
20941998-03-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
2095
2096 * super.c (check_super_block): Fix broken superblock sanity check
2097 when calculating blocks_per_group if s_log_frag_size !=
2098 s_log_block_size. Since we don't support fragments, this
2099 isn't a bug deal, but it's good to get it fixed.
2100
Theodore Ts'o246501c1998-03-24 16:22:38 +000021011998-03-23 Theodore Ts'o <tytso@rsts-11.mit.edu>
2102
2103 * unix.c: Fix bug in check of feature set, to make sure we can
2104 really fix this filesystem.
2105
2106 * problem.h: Make blkcount type to be of type blkcnt_t. Make the
2107 num field be a 64 bit type. Add the problem code
2108 PR_1_FEATURE_LARGE_FILES
2109
2110 * problem.c: Add table entry for the problem code
2111 PR_1_FEATURE_LARGE_FILES.
2112
2113 * pass1.c (e2fsck_pass1): A non-zero i_dir_acl field is only
2114 a problem for directory inodes. (Since it is also
2115 i_size_high now.) If there are no large_files, then
2116 clear the LARGE_FLAG feature flag. If there are
2117 large_files, but the LARGE_FLAG feature flag is not set,
2118 complain and offer to fix it.
2119 (check_blocks): Add support to deal with non-directory
2120 inodes that have i_size_high set (i.e., large_files).
2121 Don't give an error if a directory has preallocated
2122 blocks, to support the DIR_PREALLOC feature.
2123 (process_block, process_bad_block): The blockcnt variable
2124 is a type of blkcnt_t, for conversion to the new
2125 block_iterate2.
2126
2127 * pass2.c (process_bad_inode): A non-zero i_dir_acl field is only
2128 a problem for directory inodes. (Since it is also
2129 i_size_high now.)
2130
2131 * message.c (expand_inode_expression): Print a 64-bits of the
2132 inode size for non-directory inodes. (Directory inodes
2133 can only use a 32-bit directory acl size, since
2134 i_size_high is shared with i_dir_acl.) Add sanity check
2135 so that trying to print out the directory acl on a
2136 non-directory inode will print zero.
2137 (expand_percent_expression): %B and %N, which print
2138 pctx->blkcount and pctx->num, can now be 64 bit
2139 variables. Print them using the "%lld" format if
2140 EXT2_NO_64_TYPE is not defined.
2141
2142 * e2fsck.h: Add the large_flagsfield to the e2fsck context.
2143
2144 * e2fsck.c (e2fsck_reset_context): Clear the large_flags
2145 field.
2146
Theodore Ts'ob6f79831998-03-09 13:10:37 +00002147Sun Mar 8 23:08:08 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2148
2149 * pass3.c (fix_dotdot_proc):
2150 * pass2.c (check_dot, check_dotdot, check_name, check_dir_block):
2151 * message.c (expand_dirent_expression): Mask off the high eight
2152 bits of the directory entry's name_len field, so that it
2153 can be used for other purposes.
2154
Theodore Ts'o2df1f6a1998-02-27 05:03:48 +00002155Fri Feb 27 00:01:39 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2156
2157 * e2fsck.c (e2fsck_run): Since E2F_FLAG_SIGNAL_MASK doesn't
2158 include EXT2_FLAG_RESTART anymore, we need to adjust this
2159 routine so that it *does* return in the case of it seeing
2160 EXT2_FLAG_RESTART.
2161
2162 * pass1.c (e2fsck_pass1): ext2_get_next_inode() may call the group
2163 done callback function, which may set context abort
2164 flags. So we need to test the context abort flags after
2165 we call ext2_get_next_inode().
2166 (process_inodes): If we abort due out of process_inodes,
2167 do a clean exit by breaking out of the for loop instead of
2168 just returning.
2169
2170 * e2fsck.h (E2F_FLAG_SIGNAL_MASK): EXT2_FLAG_RESTART shouldn't be
2171 considered a SIGNAL mask (i.e., requiring an immediate
2172 abort of processing to restart). FLAG_RESTART just means
2173 that we want to restart once pass 1 is complete.
2174
Theodore Ts'oa02ce9d1998-02-24 20:22:23 +00002175Tue Feb 24 15:19:40 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2176
2177 * Change the progress function to return an integer; if returns 1,
2178 then the progress function is expected to have set the
2179 e2fsck context flag signalling a user abort, and the
2180 caller should also initiate a user abort.
2181
Theodore Ts'o63c49691998-02-20 05:24:59 +00002182Tue Feb 17 19:03:44 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2183
2184 * pass5.c (check_block_bitmaps, check_inode_bitmaps): Don't call
2185 end_problem_latch() unless there was actually a problem
2186 latched. Simplifies semantics of the latch processing.
2187
Theodore Ts'o43139321998-02-16 22:34:46 +00002188Mon Feb 16 17:31:44 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2189
2190 * e2fsck.h: Add new field, priv_data to the e2fsck context
2191 structure. It should be used by callers of the e2fsck
2192 functions only, and not by anything in e2fsck itself.
2193
2194Mon Feb 7 17:31:04 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2195
2196 * super.c: Instead of call ext2fs_get_device_size(), define and call
2197 e2fsck_get_device_size(). (This function may be stubbed
2198 out in special versions of e2fsck.)
2199
2200 * pass3.c, pass4.c: Remove extra calls to the progress function
2201 that weren't needed.
2202
2203 * mke2fs.8.in: Update man page to note that the format of the bad
2204 block file is the same as the one generated by badblocks.
2205
Theodore Ts'o54be2cc1998-02-01 12:58:48 +00002206Sun Feb 1 07:57:14 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2207
2208 * dirinfo.c, e2fsck.c: Don't include com_err.h; it isn't needed.
2209
2210 * e2fsck.h: Include <time.h> since it is needed
2211
2212 * super.c: If EXT2_SKIP_UUID is defined, then skip the UUID
2213 processing.
2214
Theodore Ts'o24dd4021998-02-01 00:16:40 +00002215Tue Jan 20 15:37:01 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2216
2217 * unix.c (main): In the case where the filesystem revision is too
2218 high, print the message about the superblock possibly
2219 being corrupt.
2220
2221 * e2fsck.8.in: Add expanded comments about how the -b option
2222 works.
2223
Theodore Ts'o54dc7ca1998-01-19 14:50:49 +00002224Sat Jan 17 13:02:16 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2225
2226 * e2fsck.h: If EXT2_FLAT_INCLUDES is defined, then assume all of
2227 the ext2-specific header files are in a flat directory.
2228
2229 * dirinfo.c, ehandler.c, pass1.c, pass1b.c, pass2.c, pass5.c,
2230 super.c, swapfs.c, unix.c: Explicitly cast all assignments
2231 from void * to be compatible with C++.
2232
2233Tue Jan 6 11:30:24 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2234
2235 * unix.c (sync_disk): Remove sync_disk and calls to that function,
2236 since ext2fs_close() now takes care of this.
2237
2238Mon Dec 29 14:45:42 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2239
2240 * pass1.c, pass1b.c, pass2.c, pass3.c, swapfs, badblocks.c,
2241 ehandler.c, unix.c: Change use of private to be priv_data,
2242 to avoid C++ reserved name clash.
2243
Theodore Ts'o5be8dc21997-12-01 18:24:10 +00002244Fri Nov 28 09:30:26 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2245
2246 * dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead
2247 of e2fsck_get_num_dirs, which has been removed.
2248
2249Tue Nov 25 15:54:35 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2250
2251 * Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want
2252 to compile and install flushb.
2253
Theodore Ts'o7fdfabd1997-11-24 11:51:17 +00002254Mon Nov 24 06:48:00 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2255
2256 * pass1.c (e2fsck_pass1_check_device_inode): For now, only check
2257 to make sure the extra i_blocks in a device are cleared if
2258 the immutable flag is set.
2259
2260 * util.c (print_resource_track): Fix typo which caused the
2261 time/resource tracking to print "Pass 1 :" instead of
2262 "Pass 1: ".
2263
Theodore Ts'ob8647fa1997-11-20 21:52:43 +00002264Thu Nov 20 16:02:23 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2265
2266 * pass3.c (expand_directory): Fix bug which could cause core dump
2267 when expanding the directory, and the bitmaps hadn't yet
2268 been read in. Also, only use ext2fs_write_dir_block when
2269 writing a directory block, not when writing out a fresh
2270 indirect block.
2271
Theodore Ts'o8039c481997-11-19 21:39:13 +00002272Wed Nov 19 16:15:44 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2273
2274 * pass1.c (process_bad_block): Fix bug where first_block wasn't
2275 getting incremented, which caused user to get a
2276 "Programming error?" warning if there was a bad block in a
2277 non-primary superblock/group_descriptor. Also fixed
2278 another bug so that ext2fs_bg_has_super() is consulted, to
2279 avoid problems when using a filesystem with the
2280 sparse_groups option set and there are bad blocks at the
2281 beginning of a group which doesn't have a superblock.
2282
Theodore Ts'of8188ff1997-11-14 05:23:04 +00002283Thu Nov 6 16:10:20 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2284
2285 * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c: Add calls to the
2286 progress indicator function.
2287
2288 * pass1.c (scan_callback): Add call to the progress feedback
2289 function (if it exists).
2290
2291Tue Nov 4 09:45:36 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2292
2293 * super.c (check_super_block): Skip the device size check if the
2294 get_device_size returns EXT2_EXT_UNIMPLEMENTED.
2295
2296 * iscan.c (main): Don't use fatal_error() anymore.
2297
2298 * pass1b.c, swapfs.c, badblocks.c: Set E2F_FLAG_ABORT instead of
2299 calling fatal_error(0).
2300
2301 * problem.c, pass3.c (PR_3_ROOT_NOT_DIR_ABORT,
2302 PR_3_NO_ROOT_INODE_ABORT): New problem codes.
2303
2304 * problem.c, pass2.c (PR_2_SPLIT_DOT): New problem code.
2305
2306 * problem.c, pass1.c (PR_1_SUPPRESS_MESSAGES): New problem code.
2307
2308 * problemP.h: New file which separates out the private fix_problem
2309 data structures.
2310
2311 * util.c, dirinfo.c, pass1.c, pass1b.c, pass2.c, pass5.c, super.c,
2312 swapfs.c util.c: allocate_memory() now takes a e2fsck
2313 context as its first argument, and rename it to be
2314 e2fsck_allocate_memory().
2315
Theodore Ts'o08b21301997-11-03 19:42:40 +00002316Mon Nov 3 14:35:29 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2317
Theodore Ts'o68227541997-11-04 04:25:22 +00002318 * unix.c (main): Add a special case check for the error code EROFS
2319 and display an appropriate error message for this case.
2320
Theodore Ts'o08b21301997-11-03 19:42:40 +00002321 * [lots of files]: Change ext2fs_read_inode, ext2fs_write_inode
2322 to take the e2fsck context as their first argument.
2323 Change dir_info.c routines to take an e2fsck_context,
2324 renamed them to start with e2fsck_ to avoid namespace
2325 issues, and changed them to store the directory
2326 information inside the e2fsck context.
2327 Added e2fsck_run() which calls all of the e2fsck passes in
2328 the correct order, and which handles the return of abort
2329 codes. Added abort processing, both via setjmp/longjmp
2330 and via flags in the e2fsck context. Use a flag in the
2331 e2fsck context instead of the restart_e2fsck global
2332 variable. Change uses of free and malloc to
2333 ext2fs_free_mem and ext2fs_get_mem.
2334
Theodore Ts'o291c9041997-10-31 06:17:08 +00002335Fri Oct 31 01:12:43 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2336
2337 * pass1.c, pass3.c: Rename new error codes to _ET_ in them for
2338 consistency.
2339
Theodore Ts'oc555aeb1997-10-25 04:16:53 +00002340Sat Oct 25 00:10:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2341
2342 * pass3.c (get_lost_and_found): Check error return of
2343 EXT2_FILE_NOT_FOUND instead of ENOTDIR
2344
2345 * pass1.c (pass1_check_directory): Return EXT2_NO_DIRECTORY
2346 instead of ENOTDIR
2347
Theodore Ts'o622f5f21997-10-24 04:18:21 +00002348Fri Oct 24 00:12:39 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2349
Theodore Ts'o519149f1997-10-25 03:49:49 +00002350 * unix.c (PRS): Make the variable which getopt returns into be
2351 an int, so that it won't lose on platforms where char is
2352 unsigned.
2353
Theodore Ts'o622f5f21997-10-24 04:18:21 +00002354 * pass1b.c (clone_file): Fix bug in error reporting in the case
2355 where cs.errcode is non-zero.
2356
Theodore Ts'ob2da22d1997-10-20 01:16:35 +00002357Sun Oct 19 21:12:11 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2358
Theodore Ts'o8bf191e1997-10-20 01:38:32 +00002359 * pass*.c, super.c, unix.c, util.c, e2fsck.h: Place #ifdef
2360 RESOURCE_TRACK around code which uses init_resource_track
2361 and print_resource_track. (Not all systems have timeval)
2362
Theodore Ts'ob2da22d1997-10-20 01:16:35 +00002363 * super.c: Remove excess #includes which are not necessary.
2364
2365 * e2fsck.h: Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H
2366
Theodore Ts'o1b6bf171997-10-03 17:48:10 +00002367Fri Oct 3 13:40:03 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2368
2369 * pass*.c, super.c: Massive changes to avoid using printf and
2370 com_err routines. All diagnostic messages are now routed
2371 through the fix_problem interface.
2372
2373Sat Sep 6 17:13:28 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2374
2375 * pass2.c (check_dir_block): Check for duplicate '.' and '..'
2376 entries.
2377
2378 * problem.c, problem.h: Add new problem codes PR_2_DUP_DOT and
2379 PR_2_DUP_DOT_DOT.
2380
2381Tue Sep 2 09:04:51 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2382
2383 * problem.c: Added new problem codes for some of the
2384 superblock corruption checks, and for the pass header
2385 messages. ("Pass 1: xxxxx")
2386
2387 * util.c (print_resource_track): Now takes a description
2388 argument.
2389
2390Mon Aug 25 10:23:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2391
2392 * super.c, unix.c, e2fsck.c: New files to separate out the
2393 operating-specific operations out from e2fsck.c.
2394 e2fsck.c now contains the global e2fsck context management
2395 routines, and super.c contains the "pass 0" initial
2396 validation of the superblock and global block group
2397 descriptors.
2398
2399 * pass1.c, pass2.c, pass3.c, pass4.c, pass5.c, util.c: Eliminate
2400 (nearly) all global variables and moved them to the e2fsck
2401 context structure.
2402
2403 * problem.c, problem.h: Added new problem codes PR_0_SB_CORRUPT,
2404 PR_0_FS_SIZE_WRONG, PR_0_NO_FRAGMENTS,
2405 PR_0_BLOCKS_PER_GROUP, PR_0_FIRST_DATA_BLOCK
2406
Theodore Ts'o7cf73dc1997-08-14 17:17:16 +00002407Thu Aug 14 10:55:21 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2408
2409 * message.c: Add compression for the word "Illegal"
2410
2411 * problem.c: Added entries for PR_2_BAD_CHAR_DEV and
2412 PR_2_BAD_BLOCK_DEV
2413
2414Wed Aug 13 09:55:57 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2415
2416 * pass1.c (pass1, check_device_inode), pass2.c
2417 (process_bad_inode): Use a more stringent test for a valid
2418 device.
2419
Theodore Ts'oa47b66e1997-08-10 23:02:21 +00002420Sun Aug 10 18:58:02 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2421
2422 * e2fsck.c (check_mount): Add stronger warning message about the
2423 perils of running e2fsck on a mounted filesystem.
2424
Theodore Ts'o024996c1997-06-17 05:38:35 +00002425Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2426
2427 * Release of E2fsprogs 1.11
2428
Theodore Ts'oda2e97f1997-06-12 04:28:07 +00002429Thu Jun 12 00:25:31 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2430
2431 * pass1.c (mark_table_blocks): Mark the superblock and group
2432 descriptor blocks first, so that any conflicts between
2433 these and the bitmap or inode table blocks is noticed.
2434
2435 * problem.c: Fix message printed out when a block or inode bitmap
2436 conflicts with other fs data, has the correct group number
2437 in it.
2438
Theodore Ts'o7ac02a51997-06-11 18:32:35 +00002439Tue Jun 10 12:07:37 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2440
2441 * pass2.c (pass2): Check the error return from ext2fs_dblist_iterate.
2442
Theodore Ts'of635d7f1997-05-09 02:50:16 +00002443Thu May 8 22:45:27 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2444
Theodore Ts'o583ccdc1997-05-09 03:06:31 +00002445 * e2fsck.8.in: Fix minor typos and grammer oops found by Bill
2446 Hawes (whawes@star.net).
2447
Theodore Ts'of635d7f1997-05-09 02:50:16 +00002448 * badblocks.c (read_bad_blocks_file): Pass the blocksize to the
2449 bad blocks command so that all of the filesystem gets
2450 tested in the case where the blocksize 2048 or 4096.
2451
Theodore Ts'oa29f4d31997-04-29 21:26:48 +00002452Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
2453
2454 * Release of E2fsprogs version 1.10
2455
2456Mon Apr 21 22:43:08 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2457
2458 * pass1b.c (pass1b): While scanning for inodes, simply skip inodes
2459 where ext2fs_get_next_inode returns the
2460 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE error.
2461
2462Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2463
2464 * Release of E2fsprogs version 1.09
2465
Theodore Ts'o2ecc6fe1997-04-29 17:57:00 +00002466Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2467
2468 * Release of E2fsprogs version 1.08
2469
Theodore Ts'o521e3681997-04-29 17:48:10 +00002470Thu Apr 10 13:51:16 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2471
2472 * pass1b.c (clone_file_block): If we clone a directory, we need to
2473 update the dblist entry so that we check (and correct) the
2474 right directory block.
2475
2476Sun Apr 6 09:13:12 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2477
2478 * pass1.c (process_block): Don't clear blocks references to
2479 filesystem metadata; let pass 1B handle this case.
2480
2481 * problem.c, problem.h: Add new problem, PR_1B_SHARE_METADATA.
2482
2483 * pass1b.c (pass1d): Deal with a block which is shared with
2484 filesystem metadata.
2485
2486 * e2fsck.h: Make block_illegal_map be a global variable
2487
2488Sat Apr 5 11:51:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2489
2490 * e2fsck.c, pass1.c (mark_table_blocks): Support the sparse_super
2491 feature.
2492 (get_backup_sb): New function which attempts to obtain the
2493 correct backup superblock (if possible).
2494
2495Fri Apr 4 10:46:26 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2496
2497 * e2fsck.c (main): Check the version of the library, and warn if
2498 the library is out of date; this happens generally due to
2499 users who manually install e2fsprogs.
2500
2501 * pass1.c (pass1_get_blocks): If the passed in inode number for
2502 get_blocks isn't what we're expecting pass back
2503 EXT2_ET_CALLBACK_NOT_HANDLED.
2504
Theodore Ts'o21c84b71997-04-29 16:15:03 +00002505Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso@mit.edu>
2506
2507 * Release of E2fsprogs version 1.07
2508
2509Tue Mar 11 10:31:47 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2510
2511 * icount.c: New file which implements an inode count abstraction.
2512 This significantly reduces amount of memory needed to
2513 check really large filesystems.
2514
2515 * pass1.c, pass2.c, pass3.c, pass4.c: Modified to use the icount
2516 abstraction.
2517
2518Fri Mar 7 08:28:55 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2519
2520 * dirinfo.c (dir_info_iter): New function which allows iteration
2521 over the directories in the dir_info map.
2522
2523 * pass3.c (pass3, check_directory): Speed up pass 3 by iterating
2524 over all directories in the dir_info structure, instead of
2525 iterating all inodes looking for directories, and then
2526 looking up the directories using get_dir_info().
2527
2528Sat Feb 1 11:33:43 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2529
2530 * pass1.c (pass1, process_block):
2531 * pass2.c (pass2): Use the ext2_dblist abstraction instead of
2532 manual code to manage the directory block list information.
2533
2534 * pass1.c (check_blocks), pass1b.c (pass1b), pass2.c
2535 (deallocate_inode): Call the ext2 library routine
2536 ext2_inode_has_valid_blocks() instead of
2537 inode_has_valid_blocks().
2538
2539 * swapfs.c (swap_inodes): Add check so that we don't try to call
2540 swap_inode_blocks unless the inode has valid blocks.
2541 (Otherwise a long fast symlink might cause
2542 swap_inode_blocks to erroneously get called.)
2543
2544Wed Jan 22 14:42:53 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2545
2546 * problem.c, problem.h: Added entries for PR_2_DOT_NULL_TERM and
2547 PR_2_DOT_DOT_NULL_TERM.
2548
2549 * pass2.c (check_dot, check_dot_dot): Make sure the new . and
2550 .. entries are null-terminated, since the 2.0 kernel
2551 requires this (for no good reason).
2552
2553Mon Jan 20 20:05:11 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2554
2555 * pass1.c (pass1): Set the EXT2_SF_SKIP_MISSING_ITABLE flag so
2556 that we can recover from missing inode tables.
2557
2558 * dirinfo.c (get_dir_info): If there are no directories in the
2559 dir_info abstraction, don't core dump (because dir_info is
2560 NULL).
2561
2562 * e2fsck.c (main): Don't try using the backup superblocks if there
2563 aren't any.
2564 (check_super_block): If there are illegal inode table or
2565 bitmaps, set the filesystem as being in error.
2566
2567Wed Jan 15 11:32:01 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2568
2569 * pass2.c (check_dir_block): Added check to make sure that rec_len
2570 is a a multiple of 4 (so that the directory entries are
2571 4-byte aligned).
2572
2573Sat Dec 28 12:16:32 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2574
2575 * Makefile.in (uninstall): Uninstall all programs in the PROGS
2576 line.
2577 (PROGS): Don't build and install the extend program by
2578 default.
2579
2580
2581Sat Dec 7 16:41:02 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2582
2583 * pass1.c (process_inodes): Make sure the stashed_ino variable is
2584 saved and restored as well.
2585 (pass1): For fast sym links, skip the check_blocks
2586 processing step altogether.
2587
2588Mon Dec 2 09:28:24 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2589
2590 * problem.c, message.c: New files, to completely refurbish how
2591 filesystem problems are reported to the user. The
2592 diagnostic messages are now encoded out in an easily
2593 customizable, extensible format. The messages printed out
2594 in preen mode are all on one line, and contain the device
2595 name.
2596
2597Fri Nov 29 20:26:08 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2598
2599 * swapfs.c (swap_inodes): When swapping a filesystem, ignore
2600 deleted files.
2601
2602 * pass1.c (pass1): Ignore missing inode table errors during the
2603 scan, and just skip past those inodes.
2604
2605 * pass3.c (check_root): Remove root_ino argument, and assume that
2606 the root inode must be EXT2_ROOT_INO. Move responsibility
2607 of setting the parent of the root inode in the directory
2608 inode structure to pass2().
2609
2610 * pass2.c (check_dir_block): Don't allow links to the root
2611 directory.
2612
2613 * dirinfo.c (add_dir_info): Remove last argument to add_dir_info,
2614 since the inode is no longer used.
2615
2616Tue Oct 15 00:06:49 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2617
2618 * e2fsck.c (main): If the superblock magic number is wrong, or the
2619 block group fails a sanity check, then automatically
2620 restart trying to use the backup superblocks.
2621
2622 * pass1.c (mark_table_blocks): Make the inode tables ahead of
2623 everything else; in the case where a bitmap block overlays
2624 the inode table, the inode table should take precedence.
2625
2626 * pass2.c (maybe_clear_entry): Make the deleted/unused error
2627 message fit on one line, since the error can happen during
2628 a preen pass. (We eventually need to revamp the whole
2629 e2fsck error reporting and prompting system, but that's a
2630 job for another day.)
2631
2632Mon Oct 14 22:29:49 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2633
2634 * e2fsck.c (main): Read in the list badblocks into fs->badblocks
2635 for the benefit of the inode scan functions.
2636
2637 * pass1.c (pass1): If ext2fs_get_next_inode() returns an error
2638 indicating that an inode is in a bad block, mark that
2639 inode as being used, as well as in the inode "bb" map.
2640
2641 * pass2.c (maybe_clear_entry): New function which generalizes the
2642 error cases when a directory entry needs to be cleared.
2643 (check_dir_block): If an inode is in the "bb" map, offer
2644 to clear the directory entry, since the inode is in a bad
2645 block.
2646
2647 * pass4.c (pass4): If an inode is marked as used, but is is marked
2648 in the "bb" map, don't process it as a disconnected inode.
2649
2650Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2651
2652 * Release of E2fsprogs version 1.06
2653
Theodore Ts'o5c576471997-04-29 15:29:49 +00002654Mon Oct 7 00:45:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2655
2656 * e2fsck.c (main): Print out the version number of the shared
2657 library when using the -V option.
2658
2659 * swapfs.c (swap_filesys): Change EXT2_SWAP to EXT2_FLAG_SWAP for
2660 consistency's sake.
2661
2662 * e2fsck.c (main): By setting EXT2_FLAG_MASTER_SB_ONLY, only write
2663 out the backup superblocks when we know we have a valid
2664 filesystem.
2665
2666Tue Oct 1 22:00:29 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2667
2668 * util.c (preenhalt): Make it explicit on preenhalt that running
2669 e2fsck manually means without the -a or -p flag.
2670
2671Fri Sep 27 14:41:08 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2672
2673 * pass1.c (pass1): Add support for the EXT2_BOOT_LOADER inode.
2674 (Linux/FT actually sets the mode bits, so we have to
2675 handle it specially.)
2676
2677 * e2fsck.c (check_if_skip): Print a message if the filesystem is
2678 just dirty, so that the user knows that it's about to be
2679 checked (since this will take a while).
2680
2681Mon Sep 16 17:00:01 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2682
2683 * pass4.c: If a disconnected inode is zero-length, prompt to
2684 delete it instead of connecting it to lost+found.
2685
2686Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2687
2688 * Release of E2fsprogs version 1.05
2689
Theodore Ts'o1e3472c1997-04-29 14:53:37 +00002690Fri Aug 30 20:24:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2691
2692 * pass4.c (pass4): If the user refuses to connect an unattached
2693 inode to lost+found, don't try to set i_links_count. This
2694 is bad, since if the user says yes, the inode will be
2695 marked as unused, which is not necessarily the right
2696 thing, especially since the rest of the cleanup doesn't
2697 happen here.
2698
2699 * pass2.c (deallocate_inode): Set inode_link_info[ino] when
2700 dellocating an inode. (Not strictly necessary, but...)
2701
2702 * pass4.c (pass4): Add "bonehead" explanation to the "programming
2703 error" message.
2704
2705Tue Aug 27 11:26:32 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2706
2707 * e2fsck.c (PRS,main): Added new options -s and -S. -s will
2708 byte-swap the filesystem so that it is normalized. -S
2709 will byte-swap the filesystem regardless of its current
2710 byte-order.
2711
2712 * swapfs.c: New file, which will byte-swap a filesystem.
2713
2714Tue Aug 20 09:41:37 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2715
2716 * pass1.c (pass1): Change handling on files with non-zero dtime
2717 and non-zero i_link_count; before we treated them as
2718 deleted file per botched ext2 0.3c kernel behavior. We
2719 now clear dtime instead.
2720
2721Mon Aug 19 23:33:57 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2722
2723 * e2fsck.c (main): If e2fsck sets the clean bit, even if
2724 nothing else is changed, make sure FSCK_NONDESTRUCT is
2725 set (since after all having the filesystem set to
2726 invalid is an error. :-)
2727
2728Fri Aug 9 10:25:13 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2729
2730 * pass1.c (process_block): Make sure that meta data doesn't get
2731 accidentally set in the dir_blocks array (which could
2732 happen in some error condtions).
2733
2734 * pass1.c (pass1):
2735 * pass2.c (process_bad_inode): Check for fragments in a
2736 OS-independent fashion.
2737
2738Thu Aug 8 15:20:54 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2739
2740 * e2fsck.c (check_if_skip): Close the filesystem when skipping the
2741 cleanup for the filesystem.
2742
2743Mon Jul 22 22:03:28 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2744
2745 * e2fsck.c: Improve corrupt_msg, so that it's less confusing.
2746
Theodore Ts'o62c06f71997-04-29 14:34:47 +00002747Thu May 16 11:12:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2748
2749 * Release of E2fsprogs version 1.04
2750
2751Wed May 15 21:41:29 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2752
2753 * e2fsck.c (relocate_hint): Issue a hint that the user may wish to
2754 try "e2fsck -b 8193" before allowing e2fsck to relocate
2755 inode table blocks.
2756
2757 * Makefile.in (e2fsck): Build e2fsck statically or dynamically
2758 depending on the option to configure. Added targets for
2759 e2fsck.static and e2fsck.shared for people who want to
2760 build a static or shared variant manually.
2761
Theodore Ts'o7f88b041997-04-26 14:48:50 +00002762Wed Mar 27 00:33:40 1996 <tytso@rsts-11.mit.edu>
2763
2764 * Release of E2fsprogs version 1.03
2765
2766Tue Mar 26 12:03:42 1996 <tytso@rsts-11.mit.edu>
2767
2768 * e2fsck.c (show_stats): Don't use floating point to display
2769 percentage of non-contiguous files, as different libc
2770 handle result truncation differently, and this causes the
2771 test suite to bomb out depending on which libc you are
2772 using.
2773
2774 * util.c (allocate_memory): Fix error message to omit extraneous
2775 %%s.
2776
2777Tue Mar 5 03:50:40 1996 <tytso@rsts-11.mit.edu>
2778
2779 * pass4.c (pass4):
2780 * pass2.c (check_dir_block):
2781 * pass1.c (pass1): Add support for dynamic first inode revision.
2782
2783Wed Feb 14 16:27:30 1996 <tytso@rsts-11.mit.edu>
2784
2785 * pass3.c (check_root): Fix spelling typo
2786
2787Mon Feb 5 22:30:30 1996 <tytso@rsts-11.mit.edu>
2788
2789 * e2fsck.c (check_super_block): If the superblock fails certain
2790 internal consistency checks, exit with a fatal error after
2791 printing the "superblock is corrupt message".
2792
Theodore Ts'o74becf31997-04-26 14:37:06 +00002793Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
2794
2795 * Release of E2fsprogs version 1.02
2796
2797Wed Dec 15 21:24:26 1996 <tytso@rsts-11.mit.edu>
2798
2799 * pass1.c (process_block): Check to see if a file is "fragmented".
2800 i.e., non-contiguous. Note that any file which is larger
2801 than the block group is guaranteed to be non-contiguous.
2802 We may want to use a different hueristic for deciding
2803 whether or not a file is "fragmented".
2804
2805 * e2fsck.c (show_stats): Print statistics of how many
2806 non-contiguous files are on the system.
2807
2808Fri Dec 15 19:19:47 1995 <tytso@rsts-11.mit.edu>
2809
2810 * badblocks.c (read_bad_blocks_file, test_disk): Fold
2811 functionality of test_disk() (which runs badblocks) into
2812 read_bad_blocks_file(); test_disk() now calls
2813 read_bad_blocks_file() with a NULL bad_blocks_file
2814 argument.
2815
2816Mon Nov 20 18:30:10 1995 <tytso@rsts-11.mit.edu>
2817
2818 * e2fsck.c (check_mount): Use #if defined(__linux__) instead of
2819 #if defined(linux). The latter won't work if we're
2820 compiling -ansi.
2821
Theodore Ts'o297f47a1997-04-26 14:25:20 +00002822Mon Oct 30 20:31:17 1995 <tytso@rsts-11.mit.edu>
2823
2824 * e2fsck.c (check_mount): For Linux systems, the check to see if
2825 the root is mounted read-only has to be done for all
2826 filesystems, not just for the root filesystem, due to the
2827 way that some /etc/rc scripts are set up.
2828
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002829Thu Oct 26 12:05:30 1995 <tytso@rsts-11.mit.edu>
2830
2831 * Makefile.in (install): Strip programs when they are installed.
2832 (e2fsck): Build e2fsck statically.
2833
2834Wed Oct 25 21:18:16 1995 <tytso@rsts-11.mit.edu>
2835
2836 * util.c (preenhalt): Preenhalt now takes an argument, which is an
2837 ext2fs_filsys; this allows it to set the EXT2_ERROR_FS
2838 flag in the superblock in cases where preenhalt is called.
2839 All calls to preenhalt() were changed to either
2840 preenhalt(fs) or preenhalt(NULL) in a few cases where the
2841 fs pointer was not available. (Most notable, for block
2842 read/write errors.)
2843
2844Mon Sep 4 21:41:03 1995 Remy Card <card@bbj>
2845
2846 * ehandler.c:
2847 util.c: Include <sys/time.h> before <sys/resource.h>. BSD needs it.
2848
2849Mon Sep 4 10:14:49 1995 <tytso@rsts-11.mit.edu>
2850
2851 * e2fsck.c (show_stats): Show statistics about how many inodes
2852 have indirect, doubly indirect, and triply indirect
2853 blocks. Allow up to 8 digits for statistics, instead of
2854 merely 6, so things look pretty for large filesystems.
2855
2856 * pass1.c (pass1): Keep statistics about indirect, doubly
2857 indirect, and triply indirect blocks.
2858
2859 * pass1.c (unwind_pass1): Clear the above statistics when unwinding
2860 pass 1.
2861
2862Fri Aug 18 15:17:10 1995 Theodore Y. Ts'o <tytso@dcl>
2863
2864 * util.c, ehandler.c: Move #include of <sys/resource.h> after
2865 #include of "e2fsck.h", since sys/resource.h may depend on
2866 sys/time.h, which is #included in e2fsck.h.
2867
2868Thu Aug 17 22:33:37 1995 <tytso@rsts-11.mit.edu>
2869
2870 * e2fsck.c (check_mount): Use the new ext2fs_check_if_mounted()
2871 function to determine if the device is mounted.
2872
2873 * e2fsck.c (main): Add better error messages if ext2fs_open()
2874 fails.
2875
2876Wed Aug 16 16:25:02 1995 <tytso@rsts-11.mit.edu>
2877
2878 * pass1.c (check_blocks): If we're clearing a directory, clear
2879 pb.is_dir so we don't do the following check of making
2880 sure the directory size matches; this is pointless, since
2881 we've already cleared the inode.
2882
2883Fri Aug 11 09:08:54 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2884
2885 * pass1.c (bad_primary_block): New function, called by
2886 process_bad_block, which explains the facts of life to the
2887 user when a block in the primary superblock or primary
2888 group descriptors is bad.
2889
2890 * pass2.c (check_dot): Handle the case where the first directory
2891 entry is used, but not ".".
2892
2893 * pass2.c (check_dotdot): Handle the case where the second directory
2894 entry is used, but is not "..".
2895
2896Thu Aug 10 10:05:10 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2897
2898 * e2fsck.c (check_super_block): Get the size of the physical
2899 device and if it is smaller than the reported size of the
2900 filesystem, report an error.
2901
2902Sat Aug 12 03:39:18 1995 Remy Card <card@bbj>
2903
2904 * e2fsck.c (check_if_skip): Print the number of allocated files and
2905 blocks on clean filesystems.
2906
2907Fri Aug 11 14:15:36 1995 Remy Card <card@bbj>
2908
2909 * e2fsck.8: Updated date and version number.
2910
2911Thu Aug 10 14:26:01 1995 Remy Card <card@bbj>
2912
2913 * pass1.c (check_blocks): Check that directory size matches *exactly*
2914 the count of allocated blocks.
2915
2916Wed Aug 9 21:21:24 1995 Theodore Y. Ts'o <tytso@dcl>
2917
2918 * pass1b.c (pass1d): Free the shared[] array when we're done with
2919 it to avoid a memory leak.
2920
2921 * pass1.c (unwind_pass1): Use ext2fs_free_block_bitmap to free the
2922 block_dup_map.
2923
2924 * pass2.c (process_bad_inode): When clearing the inode, make sure
2925 the pathname is freed, to prevent a memory leak.
2926
2927 * pass5.c (check_inode_bitmaps): Free free_array and dir_array
2928 when we're finished with them.
2929 (check_block_bitmaps): Free free_array when we're finished
2930 with them.
2931
2932 * Makefile.in (e2fsck, flushb): Use $(LD) instead of $(CC) when
2933 linking the executable.
2934
2935 * pass2.c (process_bad_inode): Even on OS's that don't support the
2936 fragment fields, make sure the Linux equivalent fields are
2937 set to zero. If an OS wants to reuse these fields, which
2938 is probably a bad idea (although we may get desperate in
2939 the future) this code will have to be changed.
2940
2941 * pass1.c (dir_block_cmp): If the block numbers are equal, compare
2942 on the inode field, and then blockcnt field. This is just
2943 to keep the ordering of dir_blocks the same on all
2944 platforms when there are more than on missing directory
2945 blocks, which are indicated directories with holes, which
2946 are indicated with the block number being set to zero.
2947
2948Sun Aug 6 15:40:58 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2949
2950 * pass1.c (check_blocks, process_block): check_blocks() modified
2951 to call the ext2fs_block_iterate() with BLOCK_FLAG_HOLE if
2952 the inode is a directory. process_block() now checks to
2953 see if a directory has a "hole", or missing block. If so,
2954 this fact is recorded in the directory block list so that
2955 the problem can be resolved in pass #2.
2956
2957 * pass2.c (allocate_dir_block): Added allocate_dir_block() to
2958 allocate new blocks for directories with "holes". Called
2959 out of check_dir_block if a block in the directory block
2960 list is zero.
2961
2962 * pass3.c (get_lost_and_found): Move location of free(block) to
2963 prevent possible memory leak.
2964
2965Sat Aug 5 12:42:22 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2966
2967 * pass2.c (check_dir_block): Use a automatic, fixed-saize array
2968 instead of alloca() --- alloca is not portable! Check to
2969 make sure the filename is not longer than EXT2_NAME_LEN,
2970 and offer to fix it by truncating it, since it should
2971 never happen.
2972
2973 * e2fsck.c (PRS): Use malloc() instead of alloca() --- alloca() is
2974 not portable!! In any case putenv() in some systems must
2975 take a static character array or malloc()'ed memory;
2976 passing memory allocated using alloca() to putenv() is not
2977 advisable.
2978
2979 * pass2.c (check_dot, check_dotdot): Use malloc() instead of
2980 alloca() --- alloca() is not portable!!!
2981
2982Tue Jul 18 20:04:02 1995 <tytso@rsx-11.mit.edu>
2983
2984 * pass1b.c (pass1c):
2985 * pass3.c (check_root, get_lost_and_found):
2986 * pass2.c (check_dir_block): Use ext2fs_{read,write}_dir_block
2987 to read/write the directory block.
2988
2989Mon Jul 17 04:00:56 1995 <tytso@rsx-11.mit.edu>
2990
2991 * util.c (ask_yn): Apply patch supplied by Peter A. Zaitcev to
2992 make sure VMIN and VTIME are set correct.
2993
2994Fri Jul 14 19:26:29 1995 <tytso@rsx-11.mit.edu>
2995
2996 * pass1.c (mark_block_used): Change to be an inline function.
2997 Assume that the block validity checks are already done,
2998 and use the fast variant of the bitmap functions.
2999
3000Thu Jul 13 08:10:55 1995 <tytso@rsx-11.mit.edu>
3001
3002 * pass5.c (check_block_bitmaps, check_inode_bitmaps): Check the
3003 bounds of the bitmaps in advance, and then use the fast
3004 variant of e2fs_test_{block,inode}_bitmap.
3005
3006 * pass1.c (mark_block_used): Use ext2_fast_mark_block_bitmap since
3007 the bounds checking has already been done earlier.
3008
3009Wed Jul 12 02:22:46 1995 <tytso@rsx-11.mit.edu>
3010
3011 * pass1.c (pass1): Allocate and free the block_illegal_map, which
3012 is used for shortcut processing in process_block.
3013 (mark_table_blocks): Initialize block_illegal_map with the
3014 filesystem blocks.
3015 (describe_illegal_block): New helper function that
3016 describes why a block is illegal.
3017 (process_block): Use block_illegal_map as a shortcut
3018 to determine whether a block is bad. Use
3019 describe_illegal_block to print out why the block is illegal.
3020
3021Mon Jun 12 19:11:06 1995 Theodore Y. Ts'o (tytso@dcl)
3022
3023 * flushb.c: Don't include <linux/fs.h> if it doesn't exist.
3024
3025 * scantest.c: Don't include <linux/fs.h>, <getopt.h>, or
3026 <mntent.h> if they don't exist. (Mostly so that "make
3027 depend" works.)
3028
3029 * pass1.c, pass1b.c, pass3.c, badblocks.c: Include <errno.h> (if
3030 it exists).
3031
3032 * e2fsck.c, scantest.c: Don't include <getopt.h> if it doesn't
3033 exist.
3034
3035Mon Jun 12 08:37:49 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3036
3037 * pass2.c (process_bad_inode, check_for_zero_long,
3038 check_for_zero_char): Change long to u32, and char to u8.
3039
3040Sun Jun 11 15:05:57 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3041
3042 * util.c (inode_has_valid_blocks):
3043 * pass2.c (process_bad_inode):
3044 * pass1.c (pass1, check_blocks, pass1_check_directory): Use
3045 LINUX_S_IS* instead of S_IS*.
3046
3047 * e2fsck.h: Don't #include <sys/stat.h>
3048
3049 * flushb.c (main): Add #ifdef BLKFLSBUF around ioctl. (Although
3050 this program is pretty much useless if BLKFLSBUF isn't
3051 supported.)
3052
3053 * e2fsck.c, badblocks.c: Add #include <errno.h>, since errno is
3054 used.
3055
3056Thu Jun 8 12:31:19 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
3057
3058 * pass2.c (check_dot, check_dotdot, check_dir_block): Use alloca
3059 to allocate space for file names instead of using fixed size buffers.
3060 (process_bad_inode): Only check inode frag fields if
3061 HAVE_EXT2_FRAGS is defined (by configure).
3062 * pass1.c (pass1): Only check the inode frag fields if
3063 HAVE_EXT2_FRAGS is defined (by configure).
3064
3065 * e2fsck.c (check_mount): Only check for a mounted filesystem if
3066 HAVE_MNTENT_H is defined (by configure).
3067 (PRS): Use alloca to allocate the new path string, instead of
3068 having a fixed size buffer (which was the wrong size anyway).
3069 (PRS): Only support the -F (flush) option if the BLKFLSBUF ioctl
3070 is defined.
3071
3072 * e2fsck.h: Only include <linux/fs.h> if HAVE_LINUX_FS_H is
3073 defined (by configure).
3074
3075 * Makefile.in: Rewritten to conform to GNU coding standards and
3076 support separate compilation directories.
3077
3078Thu Apr 6 15:04:36 1995 Remy Card <card@bbj.ibp.fr>
3079
3080 * pass1.c (pass1): Test the mode in reserved inodes (must be zero).
3081
Theodore Ts'of3db3561997-04-26 13:34:30 +00003082Sat Mar 11 13:12:16 1995 Theodore Y. Ts'o <tytso@localhost>
3083
3084 * pass1.c (unwind_pass1): Clear the file type statistics counter
3085 when pass 1 needs to be restarted from scratch.
3086
3087 * pass1.c (handle_fs_bad_blocks): Fix bug where bitmap blocks were
3088 being reallocated to blocks in the next block group,
3089 instead of the current block grup.
3090
3091 * pass1.c (pass1, check_blocks): Set inode_link_info[ino] whenever
3092 inode.i_links_count is set.
3093
3094Tue Feb 14 01:38:04 1995 Theodore Y. Ts'o (tytso@rt-11)
3095
3096 * pass1.c (process_block): Add checks for if the block is
3097 trepassing on a superblock or group descriptor table.
3098
3099Sat Dec 31 00:52:11 1994 <tytso@rsx-11.mit.edu>
3100
3101 * main.c (corrupt_msg): Extend the message which is printed out
3102 when the superblock is corrupt, to include the suggestion
3103 of using the -b option to specify an alternate superblock.
3104
3105Thu Nov 24 09:29:58 1994 Theodore Y. Ts'o (tytso@rt-11)
3106
3107 * badblocks.c (read_bad_blocks_file): If we are adding or
3108 replacing bad blocks in the bad blocks inode, sanity check
3109 the bad block inode first, and clear out any illegal blocks.
3110
3111 * pass2.c (check_name): Don't bomb out if the attempt to get the
3112 pathname of the containing directory returns an error; the
3113 directory may be too badly damaged to expect that
3114 ext2fs_get_pathname will always succeed. Use "???" if the
3115 pathname can't be obtained (it's only for a printf to the
3116 user anyway).
3117
3118 The name of the containing directory and the bad filename
3119 were incorrectly interchanged in the user message. Fixed.
3120
3121 * pass2.c (check_name, check_dir_block): Use a common static
3122 string for the unknown pathname.
3123
3124Mon Nov 7 22:30:54 1994 Remy Card <card@bbj>
3125
3126 * Fixed lots of printf formats to make sure that block and inode
3127 numbers are printed as unsigned integers.
3128
3129Mon Oct 24 14:10:46 1994 (tytso@rsx-11)
3130
3131 * pass5.c (check_block_end): Fix calculation of how the last block
3132 in the block bitmap should be calculated.
3133
3134Wed Sep 7 10:01:13 1994 (tytso@rsx-11)
3135
3136 * pass1b.c (pass1_dupblocks): Fix declaration of dup_inode_map to
3137 be an ext2fs_inode_bitmap, and free it properly.
3138
3139 * e2fsck.h
3140 * e2fsck.c (main): Folded in Remy Card's changes to add a revision
3141 level to the superblock.
3142
3143Wed Aug 17 22:00:20 1994 Remy Card (card@bbj)
3144
3145 * e2fsck.c (usage): Fixed bogus usage message.
3146
3147Wed Aug 17 11:21:45 1994 Theodore Y. Ts'o (tytso@rt-11)
3148
3149 * pass1.c (process_bad_block): Fixed bug so that blocks in the
3150 backup superblocks and group descriptors are handled gracefully.
3151