Whamcloud - gitweb
rs_bitmap.c:
[tools/e2fsprogs.git] / RELEASE-NOTES
1 E2fsprosg 1.11 (June 17, 1997)
2 ==============================
3
4 Fixed e2fsck to detect (previously ignored) conflicts between the
5 superblock or block group descriptors and block bitmaps, inode
6 bitmaps, and inode tables.
7
8 Fixed bug in e2fsck so that when the message printed out when a block
9 or inode bitmap conflicts with other data, it has the correct group
10 number.
11
12 Fixed bug in e2fsck and mke2fs where the blocksize wasn't being passed
13 to badblocks.  This meant that not all of the filesystem was being
14 tested for bad blocks! 
15
16 Fixed an array boundary overrun case which cropped up in
17 ext2fs_badblocks_list_test when a user tried running "mke2fs -c 
18 -b 4096".
19
20 Adjusted the number of columns printed by mke2fs when displaying the
21 superblock backups to avoid running over 80 columns when making a
22 really filesystem.
23
24 Fixed up the man pages for e2fsck, debugfs, badblocks, chattr,
25 dumpe2fs, fsck, mke2fs, and tune2fs (typos and other minor grammar
26 fixes), thanks to some suggestions from Bill Hawes (whawes@star.net).
27
28 Programmer's notes:
29 -------------------
30
31 Fixed install rule in lib/ss so that ss_err.h is actually getting
32 installed.
33
34 Fixed bug in ext2fs_copy_bitmap; the destination bitmap wasn't getting
35 bassed back to the caller.
36
37 Fixed bug in ext2fs_inode_scan_goto_blockgroup; it had not been
38 setting the current inode number (which meant this function wasn't
39 working at all).
40
41 Fixed bug in ext2fs_resize_generic_bitmap; it had not be zeroing all
42 blocks in the bitmap when increasing the size of the bitmap.
43
44 Changed the initial number of blocks allocated by ext2fs_init_dblist()
45 to be more realistic.
46
47 Added a new function ext2fs_allocate_group_table, which sets up the
48 group descriptor information (and allocates inode and block bitmaps,
49 and inode tables for a particular group).  The function was created by
50 factoring out code form ext2fs_allocate_tables().
51
52 Added a new function ext2fs_move_blocks which takes a bitmap of the
53 blocks to be moved, and moves them to another location on the
54 boardboard.
55
56 Make the unix_io channel's io_channel_flush implementation calls sync()
57 to to flush the kernel buffers to disk.
58
59 Added a new function ext2fs_dblist_count returns the number of
60 directory blocks in dblist.
61
62
63 E2fsprogs 1.10 (April 24, 1997)
64 ===============================
65
66 Mke2fs once again defaults to creating revision #0 filesystems, since
67 people were complaining about breaking compatibility with 1.2 kernels.
68 Warning messages were added to the mke2fs and tune2fs man pages that
69 the sparse superblock option isn't supported by most kernels yet (1.2
70 and 2.0 both don't support parse superblocks.)
71
72 Added new flag to mke2fs, -R <raid options>, which allows the user to
73 tell mke2fs about the RAID configuration of the filesystem.  Currently
74 the only supported raid option is "stride" which specifies the width
75 of the RAID stripe.
76
77 Fixed bug in e2fsck where pass1b would bomb out if there were any
78 blocks marked bad in the inode table.
79
80 Fixed rare bug in mke2fs where if the user had a very unlucky number
81 of blocks in a filesystem (probability less than .002) the resulting
82 filesystem would be corrupt in the last block group.
83
84 Fixed bug where if e2fsck tried to allocate a block to fix a
85 filesystem corruption problem and the filesystem had no free blocks,
86 ext2fs_new_block() would loop forever.
87
88 The configure script now checks explicitly to see if "-static" works,
89 since that can't be assumed to be true --- RedHat doesn't install
90 libc-static by default.
91
92 Fixed bug in libext2's block iterator functions where under some
93 cirmcustances, file with holes would cause the bcount parameter to the
94 callback function to be incorrect.  This bug didn't affect any of
95 e2fsprogs programs, but it was discovered by Paul Mackerras, the
96 author of the PPC boot loader.
97
98 Removed use of static variables to store the inode cache in libext2fs.
99 This caused problems if more than one filesystem was accessed via
100 libext2fs (static variables in libraries are generally a bad idea).
101 Again, this didn't affect e2fsprogs programs, but it was discovered by
102 Paul Mackerras.
103
104 Fixed minor bugs and version code drift to assure that e2fsprogs 1.10
105 will compile cleanly with 1.2.13 kernels (even with a.out shared
106 libraries!)
107
108 Programmer's notes:
109 -------------------
110
111 Added new functions to duplicate an ext2 filesystem handle, and its
112 associated substructure.  New functions: ext2fs_dup_handle(),
113 ext2fs_copy_dblist(), ext2fs_badblocks_copy(), ext2fs_copy_bitmap().
114 Other structures, such as the io_channel and the inode_cache, now have
115 a ref count so that they only get freed when they are no longer used
116 by any filesystem handle.  (These functions were added as part of the
117 development effort for an ext2 resizer).
118
119 E2fsprogs 1.09 (April 14, 1997)
120 ===============================
121
122 Fixed bug in mke2fs (really in lib/ext2fs/initialize.c) which was
123 accidentally introduced in the 1.08 release.  The overhead calculation
124 was accidentally removed, which caused ext2fs_initialize() to not
125 notice when the filesystem size needed to be adjusted down because
126 there wasn't enough space in the last block group.
127
128 Fixed bug in version parsing library routine; it was always parsing
129 the library version string, instead of using the passed-in string.
130
131 Clarified chattr man page.
132
133 E2fsprogs 1.08 (April 10, 1997)
134 ===============================
135
136 E2fsck 1.07 was very slow when checking very large filesystems with a
137 lot of files that had hard links (i.e., news spools).  This was fixed
138 by seriously revamping the icount abstraction.  Added a formal test
139 suite for the icount abstraction.
140
141 Debugfs now has a "-l" option to the "ls" command, which lists the
142 inode number, permissions, owner, group, size, and name of the files
143 in the directory.
144
145 Fix a bug in e2fsck where when a directory had its blocks moved to
146 another location during the pass 1b processing, the directory block
147 list wasn't updated, so pass 2 wouldn't check (and correct) the
148 correct directory block.
149
150 E2fsck will now treat inodes which contain blocks which are claimed by
151 the filesystem metadata by treating them as multiply claimed blocks.
152 This way, the data in those blocks can be copied to a new block during
153 the pass 1b--1d processing.
154
155 E2fsck will attempt to determine the correct superblock number and
156 display it in the diagnostic and warning messages if possible.
157
158 Add support for a new (incompatible) feature, "sparse_super".  This
159 feature reduces the number of blocks which contain copies of backup
160 superblocks and block group descriptors.  (It is only an incompatible
161 feature because of a bug in ext2_free_blocks.)  mke2fs and tune2fs now
162 support a new -s option; e2fsck will recognize filesystems built with
163 this feature turned on.
164
165 E2fsck now checks the library to make sure is the correct version,
166 using new library functions.  (This helps to diagnose incorrectly
167 installed e2fsprogs distributions.)
168
169 Dumpe2fs now prints more information; its now prints the the
170 filesystem revision number, the filesystem sparse_super feature (if
171 present), the block ranges for each block group, and the offset from
172 the beginning of the block group.
173
174 Mke2fs now distributes the inode and block bitmap blok so that the
175 won't be concentrated in one or two disks in RAID/striping setups.
176 Also, if the user chooses a 2k or 4k block group, mke2fs will try to
177 choose the largest blocks per group that be chosen.  (For 2k blocks,
178 you can have up to 16384 blocks/group; for 4k blocks, you can have up
179 to 32768 blocks/group.)  Previously mke2fs would not allow
180 specification of more than 8192 blocks per group, even if you were
181 using a 2k or 4k block group.
182
183 Programmer's notes:
184 -------------------
185
186 Added a new function ext2fs_create_icount2() which takes a "hint"
187 argument.  This hint argument presets the icount array with the list
188 of inodes which actually need to be in the icount array.  This really
189 helps to speed up e2fsck.
190
191 Added a new function ext2fs_icount_validate() which checks the rep
192 invariant for the icount structure.  This is used mostly for testing.
193
194 The error mesasage given when a bad inode number is passed to
195 test_generic_bitmap to reflect EXT2FS_TEST_ERROR (instead of
196 EXT2FS_UNMARK_ERROR).
197
198 Added a new function ext2fs_set_dir_block which sets the block of a
199 dblist entry, given the directory inode and blockcnt.
200
201 Added a new function ext2fs_get_library_version() which returns the
202 current library version, and ext2fs_parse_version_string() which
203 returns a version number based on a e2fsprogs version string.
204
205 The icount functions will return EINVAL if the passed in inode number
206 is out of bounds.
207
208 E2fsprogs 1.07 (March 9, 1997)
209 ==============================
210
211 E2fsck is now uses much less memory when checking really large
212 filesystems (or rather, filesystems with a large number of inodes).
213 Previously a filesystem with 1 million inodes required 4 megabytes of
214 memory to store inode count statistics; that storage requirement has
215 now been reduced to roughly half a megabyte.
216
217 E2fsck can now properly deal with bad blocks appearing inside the
218 inode table.  Instead of trying to relocate the inode table (which
219 often failed because there wasn't enough space), the inodes in the bad
220 block are marked as in use.
221
222 E2fsck will automatically try to use the backup superblocks if the
223 primary superblocks have a bad magic number or have missing meta-data
224 blocks (or meta-data blocks which are out of range).
225
226 E2fsck's pass 3 has been made more efficient; most noticeable on
227 filesystems with a very large number of directories.
228
229 Completely revamped e2fsck's system of printing problem reports.  It
230 is now table driven, to make them more easily customizeable and
231 extendable.  Error messages which can be printed out during preen mode
232 are now one line long.
233
234 Fixed e2fsck's filesystem swapping code so that it won't try to swap
235 fast symbolic links or deleted files.
236
237 Fixed e2fsck core dumping when fixing a filesystem which has no
238 directories (not even a root directory).
239
240 Added a check to e2fsck to make sure that the length of every
241 directory entry is a multiple of 4 (since the kernel complains if it
242 isn't).
243
244 Added a check to e2fsck to make sure that a directory entry isn't a
245 link to the root directory, since that isn't allowed.
246
247 Added a check to e2fsk to now make sure the '.' and '..' directory
248 entries are null terminated, since the 2.0 kernel requires it.
249
250 Added check to write_bitmaps() to make sure the superblock doesn't get
251 trashed if the inode or block bitmap is marked as being block zero.
252
253 Added checking of the new feature set fields in the superblock, to
254 avoid dealing with new filesystem features that this package wasn't
255 set up to handle.
256
257 Fixed a fencepost error in ext2fs_new_block() which would occasionally
258 try to allocate a block beyond the end of a filesystem.
259
260 When the UUID library picks a random IEEE 802 address (because it
261 can't find one from a network card), it sets the multicast bit, to
262 avoid conflicting with a legitimate IEEE 802 address.
263
264 Mke2fs now sets the root directory's owner to be the real uid of the
265 user running mke2fs.  If the real uid is non-zero, it also sets
266 the group ownership of the root directory to be the real group-id of
267 the user running mke2fs.
268
269 Mke2fs now has more intelligent error checking when it is given a
270 non-existent device.
271
272 When badblocks is given the -vv option, it now updates the block that
273 it is currently testing on every block.
274
275 Fixed a bug in fsck where it wouldn't modify the PATH envirnoment
276 currently correctly if PATH wasn't already set.
277
278 Shared libraries now built with dependencies.  This allows the shared
279 library files to be used with dlopen(); it also makes the transition
280 to libc 6 easier, since ld.so can tell which libc a particular shared
281 library expects to use.
282
283 Programmer's notes:
284 -------------------
285
286 Added new abstraction (defined in dblist.c) for maintaining a list of
287 blocks which belongs to directories.  This is used in e2fsck and other
288 programs which need to iterate over all directories.
289
290 Added new functions which test to see if a contiguous range of blocks
291 (or inodes) are available.  (ext2fs_*_bitmap_range).
292
293 Added new function (ext2_inode_has_valid_blocks) which returns true if
294 an inode has valid blocks.  (moved from e2fsck code).
295
296 Added new function (ext2fs_allocate_tables) which allocates the
297 meta-data blocks as part of initializing a filesystem.  (moved from
298 mke2fs code).
299
300 Added a new I/O manager for testing purposes.  It will either allow a
301 program to intercept I/O requests, or print debugging messages to
302 trace the activity of a program using the I/O manager.
303
304 The badblocks_list functions now store the bad blocks in a sorted
305 order, and use a binary search to speed up badblocks_list_test.
306
307 The inode scan function ext2fs_get_next_inode() may now return a soft
308 error returns: MISSING_INODE_TABLE and BAD_BLOCK_IN_INODE_TABLE in
309 those cases where part of an inode table is missing or there is a bad
310 block in the inode table.  
311
312 Added a new function (ext2fs_block_iterate2) which adds new arguments to
313 the callback function to return a pointer (block and offset) to the
314 reference of the block.
315
316 Added new function (ext2fs_inode_scan_goto_blockgroup) which allows an
317 application to jump to a particular block group while doing an inode
318 scan.
319
320 The badblocks list functions were renamed from badblocks_* to
321 ext2fs_badblocks_*.  Backwards compatibility functions are available
322 for now, but programs should be modified to use the new interface.
323
324 Some of the library functions were reorganized into separate files to
325 reduce the size of some programs which statically link against the
326 ext2 library.
327
328 Put in some miscellaneous fixes for the Alpha platform.
329
330
331 E2fsprogs 1.06 (October 7, 1996)
332 ================================
333
334 Fixed serious bug in e2fsck: if the block descriptors are bad, don't
335 smash the backup copies in ext2fs_close().  (The problem was that when
336 e2fsck -p discovered the problem, while it was closing the filesystem
337 and exiting, it was also blowing away the backup superblocks on the
338 disk, which was less than friendly.)  We now make it the case that we
339 only write out the backup superblock and the back block descriptors if
340 the filesystem is completely free from problems.
341
342 Fixed a bug in block_interate in the lib/ext2fs library which caused
343 e2fsck to fail on GNU Hurd-created filesystems.
344
345 Add support for Linux/FT's bootloader, which actually uses
346 EXT2_BOOT_LOADER, and sets its mode bits which caused e2fsck to want
347 to clear the inode.
348
349 Add support for the "A" (no atime update) attribute.  (Note: this
350 attribute is not yet in production kernels.)
351
352 The test suite is not automatically run when doing a "make all" from
353 the top level directory.  Users should manually run "make check" if
354 they wish to run the test suite.
355
356 Upon a preenhalt(), make the printed message more explicit that
357 running e2fsck "MANAULLY" means without the -p or -a options.
358
359 In e2fsck, if a disconnected inode is zero-length, offer to clear it
360 instead of offering to connect it to lost+found.
361
362 In e2fsck, if a filesystem was just unmounted uncleanly, and needs
363 e2fsck to be run over it, change e2fsck to explicitly display this
364 fact.
365
366 For dumpe2fs and e2fsck, cause the -V option to print out which
367 version of the ext2fs library is actually getting used.  (This will
368 help detect mismatches of using a 1.06 utility with a 1.05 library,
369 etc.)
370
371 Programmers' notes:
372 -------------------
373
374 EXT2_SWAP_BYTES was changed to EXT2_FLAG_SWAP_BYTES, which better fits
375 the naming convention.
376
377 In ext2fs_initialize(), make sure the description for the inode bitmap
378 is correctly initialize.
379
380 Fixed minor type typo in ext2fs_allocate_generic_bitmap();
381
382 E2fsprogs 1.05 (September 7, 1996)
383 ==================================
384
385 Add support for new fields in the ext2 superblock --- volume name,
386 volume UUID, and last mounted field.  Dumpe2fs displays these fields,
387 tune2fs and mke2fs allows you to set them.  E2fsck will automatically
388 generate a UUID for those volumes that don't have them.  
389
390 Put in support for e2fsck to recognize HURD specific ext2 features ---
391 most notably, the translator block.  The e2fsprogs tools will now use
392 the creator_os field in the superblock to correctly handle different
393 OS-specific variants of the ext2 filesystem.
394
395 E2fsck now fixes inodes which have a the deletion time set, but which
396 have a non-zero i_link_count field by offering to clear the deletion
397 time.  Previously e2fsck assumed that the inode was deleted (per 0.3c
398 ext2 kernel behavior) and offered to unlink the file.
399
400 If e2fsck sets the clean bit, but nothing else, set the exit code
401 FSCK_NONDESTRUCT.  After all, e2fsck did fix a filesystem error --- it
402 set the filesystem valid bit when it was previously cleared.  :-) This
403 was needed to make the HURD fsck driver happy.
404
405 If the  user  refuses to attach an  unattached  inode, e2fsck  will no
406 longer set the inode's link count.  Otherwise, the  inode would end up
407 getting marked as unused, which might cause loss of data later.
408
409 Make the message issued by e2fsck when the superblock is corrupt less
410 confusing for users.  It now mentions that another reason for the
411 "corrupt superblock" message might be that the partition might not be
412 an ext2 filesystem at all (it might swap, msdos filesystem, ufs, etc.)
413
414 Make the libext2 library more robuest so that e2fsck won't coredump on
415 an illegal superblock where the blocksize is zero.  (f_crashdisk is
416 the test case).
417
418 By default, create filesystems where the default checkinterval is 6
419 months (180 days).  Linux servers can be robust enough that 20 reboots
420 can be a long, long time.
421
422 Added configure flag --enable-old-bitops, which forces the bitops to
423 use the old (native) bitmask operations.  By default on the sparc
424 platform, the standard ext2 bit ordering is now used.
425
426 Added a new feature to e2fsck to byte-swap filesystems; this can be
427 used to convert old m68k filesystems to use the standard byte-order
428 storage for the superblock, inodes, and directory blocks.  This
429 function is invoked by using the '-s' option to e2fsck.
430
431 Debugfs's "dump" command has been enhanced so that it writes out the
432 exact size of the file so that the nulls at the end of the file are
433 eliminated.  The command also accept a new "-p" option which will
434 attempt preserve to preserve the ownernship, permissions, and
435 file modification/access times.
436
437 Debugfs has two new options, -f and -R.  The -R option allows the user
438 to execute a single debugfs command from the command line.  The -f
439 option allows the user to specify a "command file" containing debugfs
440 commands which will get executed.
441
442 Dumpe2fs now pretty prints the check interval, instead of just
443 printing the check interval as a number of seconds.
444
445 Fix bugs in debugfs: the params command when no filesystem is opened
446 no longer causes a core dump.  It is now possible to unlink a file
447 when a pathame containing a '/' is specified.
448
449 Tune2fs has a new -C option which sets the number of times the
450 filesystem has been mounted.
451
452 Fix the chattr '-v' option so that it actually works.  Chattr was
453 being buggy about the -v option parsing.
454
455 Programmers' notes:
456 -------------------
457
458 The directory lib/uuid contains a set of library routines to generate
459 DCE compatible UUIDs.  
460
461 Extended ext2fs_namei() to handle symbolic links.  Added new function
462 ext2fs_nami_follow() which will follow last symbolic link in the case
463 where the pathname points to a sym link.
464
465 The ext2fs_block_iterate function will now return the HURD translator
466 block, if present.  The new flag BLOCK_FLAG_DATA_ONLY will cause the
467 iterator to return data blocks only.  The ext2fs.h file now defines
468 constants BLOCK_COUNT_IND, BLOCK_COUNT_DIND, BLOCK_COUNT_TIND, and
469 BLOCK_COUNT_TRANSLATOR, which are the magic values passed in the block
470 count field of the iterator callback function.
471
472 The test script driver now takes an optional second argument, which is
473 the test case to be run.  This allows you to run a test case without
474 needing to run the entire test suite.
475
476 On Linux ELF systems, install the .so files in the correct places
477 (/usr/lib).  The .so files must be stored in the same directory as the
478 .a files.
479
480 Fixed miscellaneous HURD compilation issues with header file being
481 included in the right order.
482
483 Fixed debugfs so that it resets optind to zero, not one, since setting
484 optind to zero is more correct.
485
486
487 E2fsprogs 1.04 (May 16, 1996)
488 =============================
489
490 First "official" (1.03 was a limited release only) to support building
491 e2fsprogs under Linux 2.0 kernels (as well as late model 1.3 and 1.99
492 kernels).
493
494 This package includes a RPM specs file, that it can be built using the
495 RedHat Package Manager.
496
497 E2fsck now prints a hint that if there are lots of incorrectly located
498 inode bitmaps, block bitmaps, and inode table blocks, the user might
499 want to try using e2fsck -b 8193 first, to see if that fares any
500 better.
501
502 For ext2 filesystem written with the hurd, debugfs will now print out
503 the translator field when printing an inode structure.
504
505 Lots of miscellaneous linking/installation cleanups:
506
507   Libraries are now linked using a relative pathname, instead of
508   relying on -L working correct.  It doesn't, in many cases, including
509   current versions of GNU ld.  This guarantees that the build tree is
510   linking with the right libraries, instead of the ones installed in
511   /usr/lib.
512
513   Header files, man pages, and the et/ss shell scripts are now
514   generated using a custom substitution script, instead of relying on
515   the configure script.  This prevents needless recompilation of
516   files; in addition, the custom substitution script is much faster.
517
518   e2fsck may now be linked dynamically, by using the
519   --enable-dynamic-e2fsck flag to configure.  This is not recommended,
520   since it increases e2fsck's dependence on other files, but some
521   people need to save disk space, and other critical programs on their
522   systems were being linked dynamically anyway.
523
524   Programs such as fsck which didn't need to be linked against
525   libext2fs (or mke2fs which didn't need to be linked against libe2p)
526   only link against libraries they actually need.  Otherwise, those
527   programs would require the presense of libraries that otherwise
528   could be removed from a rescuse diskette.
529
530   The ss include files are now installed correctly so they can
531   actually be used by another package.
532
533   If the profiling libraries are built, they are now installed on a
534   "make install-libs".
535
536
537 E2fsprogs 1.03 (March 27, 1996)
538 ===============================
539
540 Change the m68k bit numbering for bitmasks to match the bit numbering
541 used by all other ext2 implementations.  (This change was requested by
542 the m68k kernel development team.)
543
544 Support (in-development) filesystem format revision which supports
545 (among other things) dynamically sized inodes.
546
547 Fixed a bug in the ext2 library so that an intelligent error is
548 returned if mke2fs is run with a ridiculously small number of blocks
549 for a partition.
550
551 Fixed a bug in the ext2 library which required that the device be
552 openable in read/write mode in order to determine its size.  This
553 caused e2fsck -n to require read/write access when it was not
554 previously necessary.
555
556 Fixed a bug in e2fsck which casued it to occasionally fail the test
557 suite depending on which version of the floating point library it was
558 using.
559
560 Fixed a bug in e2fsck so that it now halts with a fatal error when
561 certain superblock consistency checks fail.  Previously it continued
562 running e2fsck, with some potential confusing/damaging consequences.
563
564 Added new flag to fsck which allows the root to be checked in parallel
565 with other filesytems.  This is not the safest thing in the world to
566 do, but some system administrators really wanted it.
567
568 Fixed -Wall flames in lib/ss.
569
570
571 E2fsprogs 1.02 (January 16, 1996)
572 =================================
573
574 Fix to allow e2fsprogs to be compiled on recent 1.3 (pl45+) kernels.
575
576 Change e2fsck to print statistics of how many non-contiguous files are
577 on the system.  Note that a file which is larger than 8k blocks, it is
578 guaranteed to be non-contiguous.
579
580 In mke2fs, print a warning message if a user tries to format a whole
581 disk (/dev/hda versus /dev/hda1).  If a user really wants to format a
582 whole disk, the -F (force) option forces mke2fs to format a whole disk
583 as a filesytem.
584
585 Fix a bug in fsck where in some cases it might start checking
586 partitions in the next pass before it finishes checking partitions in
587 the current pass.  This still won't cause two partitions on the same
588 disk will be checked, so it's rarely a problem in real life.
589
590 Patch lsattr so that it won't hang when checking a named pipe.
591
592 Minor compilation fixes:
593         * Fix the order of libraries that were linked in debugfs.
594         * Allow the sources to be compiled with -ansi turned on.