Whamcloud - gitweb
Lots of small random portability fixes to make e2fsprogs build
[tools/e2fsprogs.git] / lib / ext2fs / ChangeLog
1 2002-02-12  Theodore Tso  <tytso@valinux.com>
2
3         * Makefile.in (tst_badblocks): Add some extra .o files when
4                 linking the debugging program tst_badblocks which are
5                 needed if we aren't compiling with inline functions enable.
6
7         * kernel-list.h (__inline__): On non-gcc and non-Watcom compilers,
8                 define away __inline__ since it may not be supported.
9
10         * kernel-jbd.h (jbd_debug): For systems that don't do STDC, use a
11                 stripped down jbd_debug that doesn't use variadic
12                 arguments.  This will cause warnings under AIX, but things
13                 should still build.
14
15 2002-02-03  Theodore Tso  <tytso@thunk.org>
16
17         * Release of E2fsprogs 1.26
18
19 2002-02-03  Theodore Tso  <tytso@valinux.com>
20
21         * mkdir.c (ext2fs_mkdir): Change to use ext2fs_inode_alloc_stats2
22                 so that the number of directories in use is adjusted
23                 appropriately.
24
25         * alloc_stats.c (ext2fs_inode_alloc_stats2): Add new function
26                 which optionally will modify the number of directories
27                 count.
28
29 2002-01-03  Theodore Tso  <tytso@mit.edu>
30
31         * dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
32                 Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
33                 which will return deleted directory entries.
34                 ext2fs_dir_iterate2 takes a new callback function which
35                 is identical with the one used by
36                 ext2fs_dblist_dir_iterate().  If the directory entry is
37                 deleted, the callback function will be called with the
38                 entry paraemter set to DIRENT_DELETED_FILE.
39
40         * Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
41                 ext2fs_block_alloc_stats): New functions which update
42                 block/inode allocation statistics in the bitmaps, block
43                 group descriptors, and superblock.
44
45         * mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
46                 expanddir.c (expand_dir_proc), bb_inode.c
47                 (clear_bad_block_proc, set_bad_block_proc,
48                 ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
49                 Update to use new block/inode allocation statistics.
50
51 2001-12-24  Theodore Tso  <tytso@mit.edu>
52
53         * ismounted.c (is_swap_device): New function used by
54                 ext2fs_check_if_mounted and ext2fs_check_mount_point which
55                 determines whether or not the specified device is a swap
56                 device by using /proc/swaps.  More bulletproofing for
57                 idiotic/careless system administrators!
58
59         * ext2fs.h, openfs.c (ext2fs_open), initialize.c
60                 (ext2fs_initialize), mkdir.c (ext2fs_mkdir): Add a new
61                 field to struct_ext2_filsys, umask.  This field is
62                 initialize to 022, and affects ext2fs_mkdir in the obvious
63                 way.  (In the future umask should also affect new file
64                 creation routines, but the fileio functions don't
65                 currently support this yes.)
66
67         * ismounted.c (check_mntent_file): Stat all of the entries in
68                 /etc/mtab and/or /proc/mounts in order to catch dim-witted
69                 system administrators who might have created alias
70                 devices.
71  
72 2001-12-23  Theodore Tso  <tytso@mit.edu>
73
74         * Makefile.in, jfs_user.h: Move linux/jbd.h to
75                 ext2fs/kernel-jbd.h, to avoid using the system header
76                 file version of hbd.h when using diet glibc (since it
77                 forcibly adds /usr/include to the beginning of the
78                 include search path.)
79
80         * kernel-jbd.h, kernel-list.h, jfs_compat.h: Move files from
81                 include/linux directory.
82
83 2001-12-16  Theodore Tso  <tytso@mit.edu>
84
85         * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap),
86                 ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr),
87                 fileio.c (ext2fs_file_write): Fix gcc -Wall nits
88
89         * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
90                 linux/jbd.h
91
92 2001-12-03  Theodore Tso  <tytso@mit.edu>
93
94         * unix_io.c (unix_open): Make sure the ulimit workaround works
95                 regardless of the version of glibc which is used to
96                 compild e2fsprogs.
97
98 2001-11-26  Theodore Tso  <tytso@mit.edu>
99
100         * unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
101                 trying to unset the filesize limit if at all possible,
102                 if a block device is getting opened.  (The filesize limit
103                 shouldn't be applied against writes to a block device, but
104                 starting in 2.4.10, the kernel is doing this.)
105         
106 2001-11-05  Theodore Tso  <tytso@mit.edu>
107
108         * mkjournal.c (ext2fs_add_journal_inode): When creating a .journal
109                 file on adding a journal to an already-mounted filesystem,
110                 try to clear the ext2 file attributes on an already
111                 existing .journal file so that we don't fail if on a
112                 partially added journal to the filesystem.
113
114         * ext2_fs.h: Define a new ext2 file attribute, EXT2_NOTAIL_FL,
115                 which signals that a particular inode should not have the
116                 last bits of data (the "tail") be merged with another
117                 file.  This is necessary to keep LILO happy.
118
119 2001-09-20  Theodore Tso  <tytso@thunk.org>
120
121         * Release of E2fsprogs 1.25
122
123 2001-09-16  Theodore Tso  <tytso@mit.edu>
124
125         * ext2_ext_attr.h: Remove unneeded #include of <linux/config.h>
126                 which was breaking the build on the Hurd.  (Addresses
127                 Debian bug #112414).
128
129 2001-09-13  Theodore Ts'o  <tytso@mit.edu>
130
131         * ismounted.c (check_mntent_file): We now validate the entry in
132                 /etc/mtab to make sure the filesystem is really mounted,
133                 since some broken distributions (read: Slackware) have
134                 buggy boot scripts that don't initialize /etc/mtab before
135                 checking non-root filesystems.  (Slackware also doesn't
136                 check the root filesystem separately, and reboot if the
137                 root filesystem had changes applied to it, which is
138                 dangerous and broken.)   
139
140 2001-09-02  Theodore Tso  <tytso@thunk.org>
141
142         * Release of E2fsprogs 1.24a
143
144 2001-08-30  Theodore Tso  <tytso@thunk.org>
145
146         * Release of E2fsprogs 1.24
147
148 2001-08-30  Theodore Tso  <tytso@valinux.com>
149
150         * getsize.c (ext2fs_get_device_size): Back out BLKGETSIZE64
151                 changes, since the ioctl number has been reused by another
152                 unofficial patch.
153
154 2001-08-15  Theodore Tso  <tytso@valinux.com>
155
156         * Release of E2fsprogs 1.23
157
158 2001-08-05  Theodore Tso  <tytso@valinux.com>
159
160         * alloc.c (ext2fs_new_inode, ext2fs_new_block): Use the fast
161                 version of the bitmap test routines to speed up these
162                 routines.  (At some point I may want to make these
163                 routines use the find_first_bit functions, but that will
164                 add a lot of complexity since it means that these
165                 functions will have to break the bitmap abstraction
166                 boundary.  It's not clear it's worth it.)
167
168         * mkjournal.c (mkjournal_proc): Remember the last block allocated
169                 to speed up ext2fs_new_block().
170
171 2001-07-29  Theodore Tso  <tytso@valinux.com>
172
173         * finddev.c (scan_dir): Fix memory leak; we weren't calling
174                 closedir() when exiting the function in all cases.
175
176 2001-07-27  Theodore Tso  <tytso@valinux.com>
177
178         * mkjournal.c (ext2fs_create_journal_superblock): Set the first
179                 block usable in the journal for external journals to be 2
180                 or 3, depending on the blocksize, so that the existing
181                 kernel code does the right thing.
182
183         * getsize.c (ext2fs_get_device_size): Add support for the
184                 BLKGETSIZE64 ioctl.  (Ioctl defined by unofficial patches
185                 from Ben LaHaise, but it's likely this interface won't
186                 change.)
187
188         * mkjournal.c (ext2fs_add_journal_device): Use the correct block
189                 when writing the journal superblock, too.  (Oops! Needed
190                 to make 1k filesystems with external journal to work.)
191
192 2001-07-26  Theodore Tso  <tytso@valinux.com>
193
194         * mkjournal.c (ext2fs_add_journal_device): Use the correct block
195                 to find the journal superblock if the blocksize is 1024.
196
197 2001-07-21  Theodore Tso  <tytso@valinux.com>
198
199         * ext2_err.et.in (EXT2_ET_LOAD_EXT_JOURNAL): Add new error code
200
201 2001-07-20  Theodore Tso  <tytso@valinux.com>
202
203         * ext_attr.c (ext2fs_write_ext_attr): When writing the extended
204                 attribute block, set the filesystem changed bit.
205
206         * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
207                 Comment out these functions since we're not using them.
208
209 2001-07-10  Theodore Tso  <tytso@valinux.com>
210
211         * closefs.c (write_primary_superblock): After writing changes to
212                 the primary superblock, update the original superblock
213                 copy so we don't have to re-write those changes in the
214                 future.
215                 (ext2fs_flush): Clear the superblock dirty flag after
216                 we've flushed out changes to disk.
217
218 2001-07-07  Theodore Tso  <tytso@valinux.com>
219
220         * bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx
221                 to avoid register conflicts when compiling in PIC mode.
222
223 2001-07-04  Theodore Tso  <tytso@valinux.com>
224
225         * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
226                 Add new functions (C and in i386 assembler) which quickly
227                 find bits set in a bitmask.
228
229 2001-06-23  Theodore Tso  <tytso@valinux.com>
230
231         * Makefile.in, ext_attr.c, ext2_attr.c, ext2fs.h: Add new files
232                 ext2_ext_attr.h and ext_attr.c for extended attributes
233                 support.
234
235         * Release of E2fsprogs 1.22
236
237 2001-06-22  Theodore Tso  <tytso@valinux.com>
238
239         * mkjournal.c (ext2fs_add_journal_inode): Move close of file
240                 descriptor so that adding a journal to a mounted
241                 filesystem doesn't die.  (Fixes a bug accidentally
242                 introduced in e2fsprogs 1.21.)
243
244         * mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
245                 HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
246                 fchflags without defining UF_NODUMP.  (Addresses Debian
247                 bug #101361)
248
249         * flushb.c: Use platform independent method of defining the
250                 BLKFLSBUF and FDFLUSH ioctl's.  Also include sys/mount.h
251                 since on newer glibc's BLKFLSBUF is defined there.
252
253         * bitops.h: The C language versions of ext2fs_swab16/32 need to be
254                 included if EXT2FS_ENABLE_SWAPFS is defined, since we need
255                 to support byte swapping even if we don't support the
256                 conversion functions.  (Fixes Debian bug #101686).
257
258         * dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2
259                 since the byte-swapping code all assumes the
260                 ext2_dir_entry structure.  (It's a question of whether or
261                 not name_len should be byte-swapped or not, and whether
262                 it's a 16 bit or 8 bit field.)
263
264 2001-06-15  Theodore Tso  <tytso@valinux.com>
265
266         * Release of E2fsprogs 1.21
267
268 2001-06-15  Theodore Tso  <tytso@valinux.com>
269
270         * Makefile.in: Fix bug in installation of ext2_types.h.  It is a
271                 file which is generated and is therefore found in the
272                 build directory, not source directory.
273
274         * ismounted.c (check_mntent_file): Use a test file in / to check
275                 to see if the root filesystem is mounted read-only.  This
276                 protects against the case where /etc might not be on /, as
277                 well as the case where /etc/mtab doesn't exist.  (Both are
278                 should-never happen scenarios, but you never know...)
279
280 2001-06-14  Theodore Tso  <tytso@valinux.com>
281
282         * ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.
283                 Remove unneeded #pragma argsused, since the arguments are
284                 always used.
285
286 2001-06-13  Theodore Tso  <tytso@valinux.com>
287
288         * ext2_types.h.in: If linux/types.h has been defined, then don't
289                 try to redefine the typedefs.
290
291         * Makefile.in (HFILES): Add ext2_types.h to the list of files
292                 which should be installed.
293
294         * ismounted.c (check_mntent_file): Work around GNU hurd brain
295                 damage.  Addresses Debian bug #100304.
296
297         * Makefile.in: Limit some .o files from being included into the
298                 library if --disable-debugfs, --disable-swapfs,
299                 --disable-imager, or --disable-resizer are used.
300
301 2001-06-12  Theodore Tso  <tytso@valinux.com>
302
303         * inode.c, tst_iscan.c: Stop using the compatibility badblocks
304                 function, and use the ext2fs_badblocks_* functions
305                 instead.
306
307 2001-06-11  Theodore Tso  <tytso@valinux.com>
308
309         * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
310                 ext2fs_mark_generic_bitmap and
311                 ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal
312                 functions.  (This saves space and doesn't significantly
313                 change the speed of e2fsck on a P-III.)
314
315         * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c,
316                 inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only
317                 include the byte-swapping logic if ENABLE_SWAPFS is turned
318                 on or if we're on a big-endian machine.
319         
320         * initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to
321                 set EXT2_FLAG_SWAP_BYTES, instead of using
322                 ext2fs_native_flag.
323         
324         * native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
325                 autoconf to determine whether or not return
326                 EXT2_FLAG_SWAP_BYTES.
327
328 2001-06-10  Theodore Tso  <tytso@valinux.com>
329
330         * Makefile.in: Remove the dependence on the libe2p library.
331
332         * mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags
333                 with direct usage of the ioctl/fchflags so that we don't
334                 have to depend on the libe2p library.
335
336 2001-06-08  Theodore Tso  <tytso@valinux.com>
337
338         * ext2_types.h.in: Use unsigned ints in favor of unsigned longs
339                 when trying to find a 32-bit wide type.
340
341         * icount.c (insert_icount_el): Fix the code used to estimate the
342                 size of the new icount array to be more intelligent, to
343                 avoid reallocating the array too many times.  Thanks to
344                 Enrique Perez-Terron for pointing this out.
345
346 2001-06-02  Theodore Tso  <tytso@valinux.com>
347
348         * valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks
349                 for a symlink to determine whether it is a fast symlink.
350
351 2001-06-01  Theodore Tso  <tytso@valinux.com>
352
353         * Makefile.in, dosio.c, ext2_fs.h, ext2_types.h.in, ext2fs.h:
354                 Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in.
355
356 2001-05-25  Theodore Tso  <tytso@valinux.com>
357
358         * Release of E2fsprogs 1.20
359
360 2001-05-25  Theodore Tso  <tytso@valinux.com>
361
362         * ismounted.c: More cleanups for ismounted.c, some from Andreas,
363                 some to clean up Andreas's patches.  Use strncpy instead
364                 of strcpy to save the root's mountpoint.  Clean up #ifdef
365                 structure.  Remove uneeded variable in testing/debug driver.
366
367 2001-05-24  Andreas Dilger  <adilger@turbolinux.com>
368
369         * ismounted.c: Add check for root device which doesn't depend on
370                 /etc/fstab or /proc/mounts to be correct.  Don't call
371                 endmntent() before we are done with mnt struct.
372
373 2001-05-23  Theodore Tso  <tytso@valinux.com>
374
375         * ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error
376                 code.
377
378 2001-05-21  Theodore Tso  <tytso@valinux.com>
379
380         * ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to
381                 make room for pre-existing usage of
382                 EXT2_FEATURE_COMPAT_EXT_ATTR.  Add flag EXT2_INDEX_FL with
383                 the same codepoint as EXT2_BTREE_FL.
384
385 2001-05-20  Theodore Tso  <tytso@valinux.com>
386
387         * ext2fs.h: #include <> instead of "" for ext2fs and et header
388                 files, since they will be installed in /usr/include
389
390 2001-05-14  Theodore Tso  <tytso@valinux.com>
391
392         * alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
393                 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
394                 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
395                 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
396                 expanddir.c, ext2_fs.h, fileio.c, finddev.c, flushb.c,
397                 freefs.c, get_pathname.c, getsize.c, icount.c, imager.c,
398                 initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
399                 link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c,
400                 newdir.c, nt_io.c, openfs.c, read_bb.c, read_bb_file.c,
401                 rs_bitmap.c, rw_bitmaps.c, swapfs.c, test_io.c,
402                 tst_badblocks.c, tst_byteswap.c, tst_getsize.c,
403                 tst_iscan.c, unix_io.c, unlink.c, valid_blk.c, version.c,
404                 write_bb_file.c, ext2_fs.h: Moved file from include/linux.
405                 Adjust all files in this directroy to include this file.
406
407         * mkjournal.c (ext2fs_create_journal_superblock): Remove redundant
408                 code.
409
410 2001-05-05  Theodore Tso  <tytso@valinux.com>
411
412         * fileio.c (ext2fs_file_read): Factored out common code and
413                 cleaned up function.  Fixed a bug where if there was an
414                 error reading from the disk, the number of bytes read
415                 wasn't reliably set.  (Fixes Debian bug #79163)
416                 (ext2fs_file_write): Factored out common code and made
417                 function more efficient; if writing a full block, don't
418                 bother to do a read-modify-write cycle.
419
420 2001-05-04  Theodore Tso  <tytso@valinux.com>
421
422         * dirblock.c (ext2fs_read_dir_block): Check for an directory
423                 record length which isn't a multiple four, and treat that
424                 as an invalid.  Scan the directory and return an error
425                 (EXT2_ET_DIR_CORRUPTED) if the directory records are
426                 corrupted.
427                 (ext2fs_write_dir_block): If while byte-swapping the
428                 directory block, if there's an error, abort and return
429                 EXT2_ET_DIR_CORRUPTED.
430
431 2001-05-02  Theodore Tso  <tytso@valinux.com>
432
433         * ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add
434                 image_header field in the ext2_filsys structure
435
436         * block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind): 
437         * inode.c (ext2fs_read_inode): 
438         * rw_bitmaps.c (read_bitmaps): 
439         * openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
440
441         * imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make
442                 sure the full bitmap is saved.
443
444 2001-05-01  Theodore Tso  <tytso@valinux.com>
445
446         * e2image.h (struct ext2_image_hdr): Add space for the device name
447                 in the image header.
448
449         * dir_iterate.c (ext2fs_process_dir_block): Add a double-check to
450                 make sure the rec_len is a multiple of 4, to prevent
451                 bus-errors on architectures which care about mis-aligned
452                 pointer references.
453
454 2001-04-25  Theodore Tso  <tytso@valinux.com>
455
456         * getsize.c (ext2fs_get_device_size): Use an unsigned long to
457                 query the device sizes using the BLKGETSIZE ioctl.
458
459 2001-04-16  Theodore Tso  <tytso@valinux.com>
460
461         * ismounted.c (check_mntent): Check /proc/mounts on Linux systems
462                 before checking /etc/mtab.  The EXT2_MF_READONLY flag is
463                 now set from the /etc/mtab options field for all
464                 filesystems, not just the root filesystem.  Add debugging
465                 code to make it easier to test ext2fs_check_if_mounted().
466
467         * mkjournal.c (ext2fs_create_journal_superblock): Add safety
468                 check; return an error if there's an attempt to create a
469                 journal less than 1024 filesystem blocks.
470
471         * ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
472                 EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
473
474 2001-02-20  Theodore Tso  <tytso@valinux.com>
475
476         * bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly
477                 inline functions.
478
479         * tst_byteswap.c: New function to test the byteswap functions.
480                 Add to regression test suite.
481
482 2001-02-08  Theodore Tso  <tytso@valinux.com>
483
484         * e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
485
486 2001-02-07  Theodore Tso  <tytso@valinux.com>
487
488         * mkjournal.c (ext2fs_create_journal_superblock): Fix the setting
489                 of s_first for external devices to always be 1, since
490                 jsb->s_first is always relative to the start of the
491                 journal superblock.  Use htonl(1) when setting s_nr_users.
492
493 2001-01-17  Theodore Ts'o  <tytso@valinux.com>
494
495         * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
496                 device number of the filesystem (instead of the journal)
497                 was being dropped into s_journal_dev.
498
499 2001-01-15  Theodore Ts'o  <tytso@valinux.com>
500
501         * initialize.c (ext2fs_initialize): Add support for initializing
502                 the ext2 superblock for external journal devices.  This
503                 basically means we don't bother to allocate any block
504                 group descriptors.
505
506         * openfs.c (ext2fs_open): Only open external journal devices if
507                 the new flag EXT2_FLAG_JOURNAL_DEV_OK is passed to
508                 ext2fs_open.  When opening such devices, don't try to read
509                 the block group descriptors, since they're not there.
510
511         * ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code 
512         
513         * mkjournal.c: Export a new function,
514                 ext2fs_create_journal_superblock(), which allocates and
515                 returns a buffer containing a journal superblock.  This is
516                 needed by mke2fs to create an external journal.  Rewrote
517                 ext2fs_add_journal_device() so that it no longer creates
518                 the external journal, but rather adds a filesystem to an
519                 existing external journal.  It handles all of the UUID
520                 manipulation.
521
522         * ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported
523                 by the library.  Define the EXT2_FLAG_JOURNAL_DEV_OK.
524                 Changed function prototype for ext2fs_add_journal_device().
525                 
526 2001-01-14  Theodore Ts'o  <tytso@valinux.com>
527
528         * closefs.c (ext2fs_flush): Don't write out anything beyond the
529                  primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is
530                  listed.
531
532 2001-01-12  Theodore Ts'o  <tytso@valinux.com>
533
534         * imager.c: Fix gcc -Wall complaints and a series of bugs where
535                 retval wasn't set correctly.  (Thanks to Andreas Dilger
536                 for pointing this out.)
537
538 2001-01-11    <tytso@snap.thunk.org>
539
540         * flushb.c (ext2fs_sync_device): New function which centralizes
541                 all of the places which might try to use the BLKFLSBUF
542                 or FDFLUSH ioctls (and usually failing to define them
543                 since the system header files don't usually do this for
544                 us, and we're trying to avoid usage of kernel include
545                 files now).
546
547 2001-01-10    <tytso@snap.thunk.org>
548
549         * alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c, 
550                 bmove.c, brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c, 
551                 dir_iterate.c, expanddir.c, ext2fs.h, ext2fsP.h, fileio.c,
552                 finddev.c, get_pathname.c, icount.c, inode.c, irel.h, 
553                 irel_ma.c, ismounted.c, link.c, lookup.c, mkdir.c, 
554                 mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
555                 tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to
556                 ext2_ino_t, to protect applications that attempt to
557                 compile -D_FILE_OFFSET_BITS=64, since this inexplicably
558                 changes ino_t(!?).  So we use ext2_ino_t  to avoid an
559                 unexpected ABI change.
560
561 2001-01-05    <tytso@snap.thunk.org>
562
563         * dirblock.c (ext2fs_read_dir_block): Fix a potential case where
564                 we may overrun allocated memory in case of a corrupted
565                 filesystem (or an e2fsck test case :-) when byte-swapping
566                 the directory block.
567
568         * ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
569
570         * mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
571                 complaints including a missing return 0 at the end of
572                 ext2fs_add_journal_device.
573
574 2001-01-03    <tytso@snap.thunk.org>
575
576         * Makefile.in: Link in libe2p when creating libext2fs as a shared
577                 library, since mkjournal.c now references fsetflags().
578
579         * mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas
580                 Dilger's changes (with fixups) to allow on-line creation
581                 of a journal file.
582
583         * ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
584                 EXT2_FLAG_SUPER_ONLY, which the close routines to only
585                 update the superblock, and not the group descriptors.
586
587 2000-12-30  Andreas Dilger  <adilger@turbolinux.com>
588
589         * ismounted.c: add ext2fs_check_mount_point() function, which will
590                 optionally return the mount point of a device if mounted
591
592 2000-12-14  Andreas Dilger  <adilger@turbolinux.com>
593
594         * mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
595                 ext2fs_add_journal_inode()
596
597 2001-01-01    <tytso@snap.thunk.org>
598
599         * ext2fs.h: Remove definition of ext2fs_sb.  Note: this may break
600                 source (but not binary) compatibility of some users of the
601                 ext2 library.  They should just simply do a global search
602                 and replace of struct ext2fs_sb with struct
603                 ext2_super_block, and use their own private copy of
604                 ext2_fs.h if they aren't already.
605
606         * closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c:
607                 Replace use of ext2fs_sb with ext2_super_block.
608
609 2000-12-31    <tytso@snap.thunk.org>
610
611         * ext2fs.h: Cleaned up header file by removing definitions of
612                 feature flags that might not have been defined in older
613                 ext2 header files.  Now that we're using our own
614                 include/linux/ext2fs.h header file, this can never happen.
615
616         * jfs_dat.h: Removed old header file which is no longer needed.
617
618 2000-12-13  Theodore Ts'o  <tytso@valinux.com>
619
620         * closefs.c (ext2fs_update_dynamic_rev): New function suggested
621                 by Andreas Dilger to update the filesystem revision to
622                 EXT2_DYNAMIC_REV.
623
624         * swapfs.c (ext2fs_swap_super): Add byte swapping for the journal
625                 fields.
626
627 2000-12-09    <tytso@snap.thunk.org>
628
629         * ext2fs.h, mkjournal.c (ext2fs_add_journal_inode,
630                 ext2fs_add_journal_device): Add a new argument to the APIs
631                 of these function, which is a flags word.  This is used to
632                 allow the creation of a V1 superblock for those folks who
633                 are using ext3 0.3b in production.  Note, the user-land
634                 interface for getting at this flag won't be documented, as
635                 the V1 superblock is deprecated.
636
637         * mkjournal.c (init_journal_superblock): Sync Stephen's changes
638                 which creates a V2 superblock instead of a V1 superblock.
639
640 2000-11-21    <tytso@snap.thunk.org>
641
642         * test_io.c (test_write_blk, test_write_byte): Fix typos pointed
643                 out by Andreas Dilger.
644
645 2000-11-05    <tytso@snap.thunk.org>
646
647         * imager.c (ext2fs_image_{inode,super,bitmap}_{read,write},
648                 ext2_fs.h, Makefile.in: New file that has routines that
649                 save ext2fs metadata to a file.
650
651         * ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
652
653         * e2image.h: New file which defines the file format for the ext2
654                 image file.  (Saved copy of ext2 metadata to a file as a
655                 saving throw against worst-case damage.)
656
657 2000-11-01    <tytso@snap.thunk.org>
658
659         * inode.c (ext2fs_flush_icache): Add new function
660                 ext2fs_flush_icache() which flushes the internal inode
661                 cache.  Applications which modify the inode table blocks
662                 directly must call this function.
663
664 2000-10-26    <tytso@snap.thunk.org>
665
666         * mkjournal.c: Add #include of netinet/in.h, since Solaris
667                 requires it for ntohl().
668
669         * ext2_io.h (io_channel_write_byte): Add new interface to allow
670                 callers to write specific byte ranges.  This is an
671                 optional interface, which not all IO channels may
672                 implement.
673
674         * unix_io.c (unix_write_byte):
675         * test_io.c (test_write_byte): Add implementation of the
676                 write_byte function.
677
678         * closefs.c (write_primary_superblock, ext2fs_flush): Add a new
679                 function which writes the primary superblock.  If the IO
680                 channel supports writing raw bytes directly, only fields
681                 which were modified are written to the disk.  This makes
682                 it safe(r) to use utilities like tune2fs on a mounted
683                 filesystem. 
684
685         * freefs.c (ext2fs_free): Free the original superblock if it is
686                 available. 
687
688         * openfs.c (ext2fs_open): Store a copy of the original superblock
689                 when opening it.
690
691         * ext2fs.h: Add a field to store the original superblock in the
692                 ext2 context structure.
693
694 2000-10-24    <tytso@snap.thunk.org>
695
696         * llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we
697                 don't need to use llseek).
698
699 2000-10-24    <tytso@valinux.com>
700
701         * Makefile.in, ext2fs.h, jfs_dat.h, mkjournal.c: Add functions for
702                 creating an ext3 journal on a filesystem.
703
704 2000-08-21    <tytso@valinux.com>
705
706         * ext2_err.et.in (EXT2_JOURNAL_NOT_BLOCK): Add new error code.
707
708 2000-08-22    <tytso@valinux.com>
709
710         * unix_io.c: Make massive changes to support a multiple block
711                 writethrough cacheing.
712
713         * ext2_io.h: Added flags field to the io_channel structure.
714
715 2000-08-19    <tytso@valinux.com>
716
717         * finddev.c, ext2fs.h, Makefile.in: Add new file, finddev.c, which
718                 provides the function ext2fs_find_block_device().  This
719                 function returns the pathname to a block device, given its
720                 device number.
721
722 2000-07-13    <tytso@valinux.com>
723
724         * Release of E2fsprogs 1.19
725
726 2000-07-07  Theodore Ts'o  <tytso@valinux.com>
727
728         * ext2fs.h (EXT2_LIB_FEATURE_INCOMPAT_SUPP): Add
729                 EXT3_FEATURE_INCOMPAT_RECOVER (aka needs_recovery) to the
730                 list of filesystem flags supported by the library.
731
732 2000-07-04  Theodore Ts'o  <tytso@valinux.com>
733
734         * ext2fs.h: Update to include latest journalling additions to the
735                 superblock.
736
737         * dll/jump.funcs: Add new jumptable entries for
738                 ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
739                 ext2fs_badblocks_equal.
740
741         * tst_badblocks.c: Update test program to test
742                 ext2fs_read_bb_FILE2 and ext2fs_write_FILE.
743
744         * write_bb_file.c (ext2fs_write_bb_FILE): New function which
745                 writes out bad blocks list to a file.
746
747         * read_bb_file.c (ext2fs_read_bb_FILE2): Add new function which
748                 changes the callback function to take two additional
749                 arguments; a private blind pointer supplied by the caller,
750                 and pointer to a char * containing a pointer to the
751                 invalid string.
752
753         * badblocks.c (ext2fs_badblocks_equal): Add new function which
754                 returns true if two badblocks list are equal.
755
756         * Makefile.in: Remove explicit link of -lc in the shared library.
757                 (It shouldn't be necessary, and is harmful in some cases).
758
759 2000-06-10  Theodore Ts'o  <tytso@valinux.com>
760
761         * getsize.c (main): Add debugging code under #ifdef DEBUG
762
763 2000-05-27  Theodore Ts'o  <tytso@valinux.com>
764
765         * mkdir.c (ext2fs_mkdir): Read the parent directory's inode
766                 earlier, so that if there's an error reading it, we can
767                 more cleanly back out of the operation.
768
769 2000-05-25    <tytso@snap.thunk.org>
770
771         * getsize.c (ext2fs_get_device_size): Use open64() instead of
772                 open() if it exists.  Under linux, manually define the
773                 ioctl for BLKGETSIZE if it isn't already defined and it's
774                 safe to do so.
775
776         * unix_io.c (unix_open): Use open64() instead of open() if it
777                 exists. 
778
779         * llseek.c: Simplify header includes of unistd.h.  If lseek64 is
780                 available (and prototypes are defined) use it in
781                 preference to llseek.
782
783         * Makefile: Add hack dependency rule so that parallel makes work
784                 correctly. 
785
786 2000-05-18  Theodore Ts'o  <tytso@valinux.com>
787
788         * ext2fs.h: Add appropriate ifdef's to support C++ compilation.
789
790 2000-04-03  Theodore Ts'o  <tytso@valinux.com>
791
792         * block.c: Readibility tweak in conditionals involving
793                 ctx->fs->flags.
794
795         * ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine
796                 how to define __s64 and __u64.  Turn off "compression is
797                 experimental" warning if the cpp macro
798                 I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is defined.
799
800 2000-02-11    <tytso@snap.thunk.org>
801
802         * ext2fs.h: Define EXT2FS_COMPRESSED_BLKADDR and HOLE_BLKADDR.
803                 Conditionally include Compression as a supported type if
804                 ENABLE_COMPRESSION (via --enable-compression) is turned on.
805
806         * swapfs.c (ext2fs_swap_super): Swap the compression usage bitmap.
807
808 2000-02-08    <tytso@snap.thunk.org>
809
810         * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
811                 ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
812                 ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap):
813                 Change to return the previous state of the bit that is
814                 being marked or unmarked.  For speed optimization.
815         
816 2000-02-02  Theodore Ts'o  <tytso@valinux.com>
817
818         * getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
819
820         * swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not
821                 needed any more; we know it will always be i_generation.
822                 Add support for swapping the high bits of the uid and gid.
823
824 1999-11-19    <tytso@valinux.com>
825
826         * mkdir.c (ext2fs_mkdir): Only update the parent's inode link
827                 counts if the link was successful.  Patch suggested by
828                 jeremy@goop.org.
829
830         * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
831                 the source directory.
832
833 1999-11-10    <tytso@valinux.com>
834
835         * Release of E2fsprogs 1.18
836
837 1999-11-08    <tytso@valinux.com>
838
839         * Makefile.in (tst_badblocks): Add freefs.o to the object list,
840                 since ext2fs_badblocks_list_free was moved to freefs.c.
841
842         * tst_badblocks.c: Use the newer badblocks API names.  Add
843                 duplicate blocks to the test inputs to test dealing with
844                 adding blocks which are already in the badblocks list.
845
846         * badblocks.c (ext2fs_badblocks_list_add): If appending to the end
847                 of the list, use a shortcut O(1) operations instead of an
848                 O(n) operation.  (Idea suggested by David Beattie.)
849
850         * freefs.c (ext2fs_free): Use ext2fs_badblocks_list_free() instead
851                 of badblocks_list_free(), to save a procedure call.
852
853 1999-10-26    <tytso@valinux.com>
854
855         * Release of E2fsprogs 1.17
856
857 1999-10-26    <tytso@valinux.com>
858
859         * ext2fs.h: Add kludge to deal with the fact that egcs cpp doesn't
860                 seem to handle ~0UL the same way as they used to.
861
862 1999-10-25    <tytso@valinux.com>
863
864         * nt_io.c (_OpenNtName): Open the device using
865                 FILE_SYNCHRONOUS_IO_NONALERT instead of
866                 FILE_SYNCHRONOUS_IO_ALERT
867                 (nt_open): At the end of the device open routine, unlock 
868                 the drive but do not dismount it.
869
870         * initialize.c (CREATOR_OS): Use __GNU__ instead of __gnu__ to
871                 detect the Hurd OS.
872
873 1999-10-22    <tytso@valinux.com>
874
875         * Release of E2fsprogs 1.16
876
877 1999-10-22    <tytso@valinux.com>
878
879         * mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link().
880
881         * link.c (ext2fs_link): This call now uses the low three bits of
882                 the flags parameter to pass the directory filetype
883                 information; it will set the directory entry FILETYPE
884                 information if the filesystem supports it.
885
886         * newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock
887                 option is set, then create the '.' and '..' entries with
888                 the filetype set to EXT2_FT_DIR.
889
890 1999-09-24    <tytso@valinux.com>
891
892         * nt_io.c: New file which supports I/O under Windows NT.
893
894 1999-09-07    <tytso@valinux.com>
895
896         * ext2fs.h: Add new fields for journalling and define new
897                 feature bits used by newer filesystems: IMAGIC_INODES,
898                 HAS_JOURNAL, RECOVER.
899
900         * expanddir.c (ext2fs_expand_dir, expand_dir_proc): Change where
901                 we update the inode block count and size files so that the
902                 block count field is updated correctly when we create an
903                 indirect block.
904
905 1999-07-18  Theodore Ts'o  <tytso@valinux.com>
906
907         * Release of E2fsprogs 1.15
908
909 1999-06-23    <tytso@valinux.com>
910
911         * swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3
912                 kernels that use i_generation instead of i_version.  Patch
913                 supplied by Jon Bright <sircus@sircus.demon.co.uk>.
914
915 1999-06-21    <tytso@valinux.com>
916
917         * dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
918                 directory entry before calling the callback function.
919                 This should prevent some core dumps of insufficiently
920                 paranoid callback functions.
921
922 1999-05-29    <tytso@rsts-11.mit.edu>
923
924         * ext2fs.h: Add feature definition for AFS IMAGIC inodes.
925
926         * fileio.c (ext2fs_file_open): Remove obsolete comment stating
927                 that we don't handle writing yet (we do).  Fixed bug where
928                 we weren't allocating a big enough buffer for ext2_bmap.
929
930 1999-05-03    <tytso@rsts-11.mit.edu>
931
932         * openfs.c (ext2fs_open): Check to make sure that the number of
933                 blocks per group is not zero --- if so, it must be a bad
934                 superblock!
935
936 1999-01-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
937
938         * Release of E2fsprogs 1.14
939
940 1999-01-07  Theodore Ts'o  <tytso@rsts-11.mit.edu>
941
942         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if
943                 the inode number is zero; if it's zero, return
944                 EXT2_ET_BAD_INODE_NUM.
945
946 1998-12-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
947
948         * initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead
949                 of EXT2_FIRST_INO to ensure compatibility with Linux 1.2
950                 header files.
951
952 Mon Jan  4 02:32:09 1999  Theodore Y. Ts'o  <tytso@mit.edu>
953
954         * llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the
955                 non-Linux case to use EINVAL by default, unless it isn't
956                 defined, in which case we use EXT2_ET_INVALID_ARGUMENT
957                 instead.
958
959 1998-12-15  Theodore Ts'o  <tytso@rsts-11.mit.edu>
960
961         * Release of E2fsprogs 1.13
962
963 1998-12-03  Theodore Ts'o  <tytso@rsts-11.mit.edu>
964
965         * Makefile.in: Updated dependencies.
966
967 1998-09-22  Theodore Ts'o  <tytso@rsts-11.mit.edu>
968
969         * initialize.c (ext2fs_initialize): Make sure that we allocate
970                 enough inodes so that we can make a valid filesystem.
971
972 1998-09-02  Theodore Ts'o  <tytso@rsts-11.mit.edu>
973
974         * rw_bitmaps.c: Fixed signed/unsigned warnings.
975
976         * fileio.c (ext2fs_file_set_size): Remove unneeded extern from the
977                 function declaration.
978
979         * dblist.c (make_dblist): Add safety check in case the dblist
980                 pointer passed in is null (in which case, assign it to
981                 fs->dblist).  Fixed some signed/unsigned warnings.
982
983         * bmap.c: Make addr_per_block be of type blk_t to avoid
984                 signed/unsigned warnings.
985
986         * namei.c (ext2fs_follow_link): Remove uneeded extern from the
987                 function declaration.
988
989         * get_pathname.c (get_pathname_proc): Use return value from
990                 ext2fs_get_mem, instead of checking if &gp->name is
991                 NULL.
992
993         * dir_iterate.c (ext2fs_process_dir_block): 
994         * dblist_dir.c (ext2fs_dblist_dir_iterate): Remove uneeded extern
995                 from the function declaration.
996
997         * block.c (ext2fs_block_iterate2): If the read_inode call fails,
998                 return the error directly instead of jumping to the
999                 cleanup routine, since we don't need to do any cleanup.
1000
1001         * alloc_table.c (ext2fs_allocate_group_table): Make this
1002                 function take a dgrp_t for its group argument.
1003
1004         * ext2fs.h: Make dgrp_t an __u32 type, and make
1005                 fs->desc_group_count be of type dgrp_t.
1006
1007 1998-07-27  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1008
1009         * badblocks.c (ext2fs_badblocks_list_add): Use a bigger increment
1010                 than 10 blocks when we need to expand the size of the
1011                 badblocks list.
1012
1013 1998-07-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1014
1015         * Release of E2fsprogs 1.12
1016
1017 1998-06-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1018
1019         * closefs.c (ext2fs_flush): Update the s_block_group_nr field as
1020                 appropriate for all of the block group copies, so that
1021                 it's clear where the beginning of the filesystem is on the
1022                 disk.  (For when the partition table gets scrod.)
1023
1024         * ext2fs.h: Change the name of the feature from
1025                 EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE to
1026                 EXT2_FEATURE_INCOMPAT_FILESIZE (to match with the kernel).
1027
1028 1998-06-18  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1029
1030         * inode.c (get_next_blockgroup): Fix bug where if
1031                 get_next_blockgroup() is called early because of a missing
1032                 inode table in a block group, the current_inode counter
1033                 wasn't incremented correctly.
1034
1035 1998-06-16  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1036
1037         * read_bb.c (ext2fs_read_bb_inode): Make function more robust
1038                 against a completely trashed bad block inode.
1039
1040 1998-06-10  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1041
1042         * alloc_tables.c (ext2fs_allocate_group_table): Fix bug so that if
1043                 the stride length hits a bad value, we retry the block
1044                 allocation starting at the beginning of the block group.
1045
1046         * ext2fs.h, bb_inode.c, block.c, bmove.c, dir_iterate.c,
1047                 expanddir.c, ext2fsP.h, read_bb.c: Change blkcnt_t to be
1048                 e2_blkcnt_t to avoid collision with LFS API.
1049
1050 1998-05-01  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1051
1052         * initialize.c (ext2fs_initialize): Initialize s_inodes_count in a
1053                 way that avoids overflows on disk sizes greater than 4GB.
1054
1055 1998-04-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1056
1057         * ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the
1058                 return type for comparison functions for qsort.
1059
1060         * dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function
1061                 declaration.
1062
1063 1998-04-26  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1064
1065         * ext2fs.h, bitops.h: Add support for the Watcom C compiler to do
1066                 inline functions.
1067
1068         * ext2fs.h, dosio.c: Use asm/types.h instead of linux/types.h to
1069                 evade a potential problem with glibc's header files trying
1070                 to spike out linux/types.h.
1071
1072         * ext2fs.h (ext2fs_resize_mem): Change the function prototype to
1073                 include the old size of the memory, which is needed for
1074                 some braindamaged memory allocation systems that don't
1075                 support realloc().
1076
1077         * badblocks.c (ext2fs_badblocks_list_add):
1078           bb_inode.c (clear_bad_block_proc):
1079           dblist.c (ext2fs_add_dir_block):
1080           icount.c (insert_icount_el):
1081           irel_ma.c (ima_put):
1082           rs_bitmap.c (ext2fs_resize_generic_bitmap): Update functions to
1083                   pass the old size of the memory to be resized to
1084                   ext2fs_resize_mem(). 
1085
1086 1998-03-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1087
1088         * Makefile.in: Change to use new installation directory variables
1089                 convention.  Fix uninstall rules to take $(DESTDIR) into
1090                 account.
1091
1092 1998-03-29  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1093
1094         * ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform
1095                 with 32 bit longs, then we need to manually define __s64
1096                 and __u64, since the current kernel header files don't
1097                 define these if __STRICT_ANSI__ is defined.  This is a
1098                 problem if we are compiling with full GCC warnings, since
1099                 we do need 64 bit support.
1100         
1101         * Makefile.in (OBJS): Remove bmove.o from files to be built,
1102                 since we're not using ext2fs_move_blocks() and there
1103                 is some question as to its usefulness in its current
1104                 form.
1105
1106         * bmap.c (block_bmap): Remove unused function.
1107
1108         * bmove.c (process_block): Fix -Wall warning.
1109
1110 1998-03-23  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1111
1112         * block.c (ext2fs_block_iterate3): Make the ref_offset field
1113                 contain the offset into the inode.i_blocks array when
1114                 ref_block is zero.  Since we haven't done a formal
1115                 release of e2fsprogs since block_iterate2 was first
1116                 introduced, I removed block_iterate2, and renamed
1117                 block_iterate3 to be block_iterate2.
1118
1119         * bb_inode.c, bmove.c, dblist_dir.c, dir_iterate.c,
1120                 expanddir.c, ext2fs.h, ext2fsP.h, read_bb.c: Change
1121                 use of block_iterate and block_iterate2 to
1122                 block_iterate2 with the new prototype for the
1123                 interator function.  (using blkcnt_t forr blockcount)
1124
1125 1998-03-21  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1126
1127         * ext2fs.h: Add new superblock fields (s_algorithm_usage_bitmap, 
1128                 s_prealloc_blocks, s_prealloc_dir_blocks).  Added
1129                 conditional defines of new features COMPAT_DIR_PREALLOC,
1130                 RO_COMPAT_LARGE_FILE RO_COMPAT_BTREE_DIR,
1131                 INCOMPAT_COMPRESSION, INCOMPAT_DIRNAME_SIZE.  Changed
1132                 the library to declare that we support COMPAT_DIR_PREALLOC, 
1133                 INCOMPAT_DIRNAME_SIZE, RO_COMPAT_LARGE_FILE.
1134
1135         * fileio.c: Rename function ext2fs_file_llseek to be
1136                 ext2fs_file_lseek, which is more accurate.
1137
1138         * block.c: Add new function ext2fs_block_iterate3 which calls
1139                 the iterator function with the blockcount argument of
1140                 type blkcnt_t.  This version of the function is
1141                 allowed to handle large files; the other fucntions are
1142                 not.
1143
1144         * ext2fs.h: Add new type blkcnt_t
1145
1146         * ext2_err.et.in: Add error code EXT2_ET_FILE_TOO_BIG
1147
1148         * block.c (ext2fs_block_iterate2): Fix bug where the block count
1149                 field wasn't getting correctly incremented for sparse
1150                 files when the indirect or doubly-indirect block
1151                 specified in the inode was zero.
1152
1153 Sun Mar  8 22:42:47 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1154
1155         * unlink.c (unlink_proc): 
1156         * lookup.c (lookup_proc): 
1157         * link.c (link_proc): 
1158         * get_pathname.c (get_pathname_proc): 
1159         * dir_iterate.c (ext2fs_process_dir_block): Mask off high 8 bits
1160                 from dirent->name_len, so it can be used for other
1161                 purposes.
1162
1163         * ext2fs.h: Add definition of EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE,
1164                 and indicate that we have support for this incompatible
1165                 option.
1166
1167 Mon Feb 23 08:46:33 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1168
1169         * ext2_err.et.in: Added new error code, EXT2_ET_CANCEL_REQUESTED.
1170
1171 Fri Feb 20 23:58:01 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1172
1173         * dblist.c (ext2fs_get_num_dirs): Improve the estimation of the
1174                 number of directories when the block group information is
1175                 unreliable.
1176
1177 1998-02-20  Theodore Y. Ts'o  <tytso@edt.mit.edu>
1178
1179         * inode.c (ext2fs_get_next_inode): Always do the check to see if the
1180                 inode table is missing so that we catch the case where the
1181                 first block group is missing.
1182
1183         * getsize.c, ismounted.c, unix_io.c: #include errno.h since it's
1184                 needed.
1185
1186 Mon Feb 16 16:16:00 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1187
1188         * ext2_io.h, ext2fs.h: Protect against being included multiple times.
1189
1190         * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
1191
1192         * test_io.c (test_flush): Add a debugging printf when the flush
1193                 method is called.
1194
1195         * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
1196                 read in, return right away.
1197
1198 Sun Feb  1 08:20:24 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1199
1200         * bitops.h: Don't try to do i386 inline asm functions if the
1201                 compiler isn't GCC.
1202
1203         * ext2fs.h: If EXT2_FLAT_INCLUDES is defined, #include e2_types.h,
1204                 instead of linux/types.h, and e2_bitops.h instead of
1205                 ext2fs/bitops.h.
1206
1207         * icount.c, version.c: Don't #include <et/com_err.h>, as it isn't
1208                 necessary. 
1209
1210 Sat Jan 17 13:13:31 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1211
1212         * inode.c (ext2fs_open_inode_scan): Initialize the group variables
1213                 so that we don't need to call get_next_blockgroup() the
1214                 first time around.  Saves a bit of time, and prevents us
1215                 from needing to assign -1 to current_group (which is an
1216                 unsigned value).
1217
1218         * icount.c (insert_icount_el): Cast the estimated number of inodes
1219                 from a float to an ino_t.
1220
1221         * alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
1222                 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
1223                 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
1224                 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
1225                 expanddir.c, ext2fs.h, fileio.c, freefs.c,
1226                 get_pathname.c, getsize.c, icount.c, initialize.c,
1227                 inline.c, inode.c, irel_ma.c, ismounted.c, link.c,
1228                 lookup.c, mkdir.c, namei.c, native.c, newdir.c,
1229                 openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
1230                 rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
1231                 tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c,
1232                 valid_blk.c, version.c: If EXT2_FLAT_INCLUDES is
1233                 defined, then assume all of the
1234                 ext2-specific header files are in a flat directory.
1235
1236         * block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
1237                 all assignments from void * to be compatible with C++.
1238
1239 Tue Jan  6 11:28:15 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1240
1241         * closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
1242                 make sure the contents of the disk are flushed to disk.
1243
1244 Mon Dec 29 14:39:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1245
1246         * dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
1247                 avoid C++ namespace clash.
1248
1249         * bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
1250                 avoid C++ namespace clash.
1251
1252         * ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
1253                 irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
1254                 ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
1255                 unlink.c: Change private to be priv_data (to avoid C++
1256                 namespace clash)
1257
1258 Fri Nov 28 09:26:31 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1259
1260         * dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more
1261                 paranoid about validating the directory counts from the
1262                 block group information.
1263
1264         * all files: Don't include stdlib.h anymore; include it in
1265                 ext2_fs.h, since that file requires stdlib.h
1266
1267 Thu Nov 20 16:07:38 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1268
1269         * expanddir.c (ext2fs_expand_dir): Check to make sure the block
1270                 bitmap is loaded, and return an error if it is not.
1271                 (expand_dir_proc): Only use ext2fs_write_dir_block when
1272                 writing a directory block, not when writing out a fresh
1273                 indirect block.
1274
1275 Tue Nov 11 22:46:45 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1276
1277         * Makefile.in, tst_getsize.c: Added new file which is used to test
1278                 the ext2fs_get_device_size function.
1279
1280         * ext2_err.et.in (EXT2_ET_UNIMPLEMENTED): Added new error code.
1281
1282 Sun Nov  2 20:36:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1283
1284         * ext2fs.h: Make ext2fs_get_mem take an unsigned argument.
1285
1286         * fileio.c (ext2fs_file_get_size, ext2fs_file_set_size,
1287                 ext2fs_file_get_fs): New functions added.
1288
1289
1290 Fri Oct 31 12:16:52 1997    <tytso@EDT.MIT.EDU>
1291
1292         * bitops.c (ext2fs_warn_bitmap, ext2fs_warn_bitmap2): Don't call
1293                 com_err if OMIT_COM_ERR is defined.
1294
1295 Thu Oct 30 11:33:57 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1296
1297         * Rename new error codes to _ET_ in them for consistency.
1298
1299 Sat Oct 25 00:06:58 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1300
1301         * [all files, basically]: Added definition of ext2fs_get_mem, 
1302                 ext2fs_free_mem, and ext2fs_resize_mem in ext2fs.h, and
1303                 changed all library routines to use these wrapper functions.
1304
1305         * dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND
1306                 instead of the system error messages.
1307         
1308         * ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
1309                 EXT2_DB_NOT_FOUND
1310
1311         * ext2fs.h: Added function declarations and constants for bmap.c
1312                 and fileio.c.
1313
1314         * ext2_err.et.in: Added new error messages EXT2_FILE_RO and
1315                 EXT2_ET_MAGIC_EXT2_FILE
1316
1317         * Makefile.in: Added files bmap.c and fileio.c, and temporarily
1318                 commented out brel_ma.c and irel_ma.c
1319
1320         * bmap.c: New file which maps a file's logical block number to its
1321                 physical block number.
1322
1323         * fileio.c: New file which implements simple file reading and
1324                 writing primitives.
1325
1326         * alloc.c (ext2fs_alloc_block): New function which allocates a
1327                 block, zeros it, and updates the filesystem accounting
1328                 records appropriately.
1329
1330 Wed Oct 22 16:47:27 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1331
1332         * ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
1333                 EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL,
1334                 EXT2_INODE_ALLOC_FAIL, EXT2_NOT_DIRECTORY
1335
1336         * Change various library files to use these functions instead of
1337                 EINVAL, ENOENT, etc.
1338
1339 Mon Oct 20 19:32:40 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1340
1341         * llseek.c: Check HAVE_LLSEEK_PROTOTYPE to see whether or not we
1342                 need to declare llseek().
1343
1344 Sun Oct 19 18:56:22 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1345
1346         * Rename io.h to be ext2_io.h (avoid namespace collisions)
1347
1348         * Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
1349
1350 Fri Oct  3 13:35:59 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1351
1352         * llseek.c (ext2fs_llseek): Fix type error for ext2fs_llseek()
1353
1354         * icount.c (ext2fs_icount_validate): 
1355         * bmove.c (process_block): Fix lint error in type for fprintf().
1356
1357 Mon Sep 15 11:45:09 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1358
1359         * inode.c (ext2fs_check_directory): Add support for the callback
1360                 to return the error code EXT2_ET_CALLBACK_NOTHANDLED.
1361
1362 Thu Sep  4 12:28:22 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1363
1364         * bitmaps.c (ext2fs_set_bitmap_padding): New function which sets the
1365                 padding of the bitmap to be all one's.
1366
1367 Wed Sep  3 14:27:30 1997  Theodore Y. Ts'o  <tytso@edt.mit.edu>
1368
1369         * llseek.c: Added missing semicolon to glibc fixup declaration of
1370         llseek().
1371
1372         * bmove.c: Add #include of errno.h
1373
1374 Sat Aug 23 22:47:46 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1375
1376         * Makefile.in (ELF_SO_VERSION): Bump version to be 2.4 since we've
1377                 added a new field to the io_channel (app_data).
1378
1379         * io.h: Add a new element to the io_channel structure, app_data.
1380
1381         * initialize.c, openfs.c: Set io->app_data to point at the
1382                 filesystem handle.
1383
1384 Thu Aug 14 08:14:17 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1385
1386         * io.h: Change the prototype of ext2fs_llseek() to use int's
1387                 instead of unsigned int's.
1388
1389         * llseek.c: Change to allow PIC and !HAVE_LLSEEK.  Add a prototype
1390                 to make life easer for GNU Libc 2.
1391
1392         * rw_bitmaps.c: On the PowerPC, the big-endian variant of the ext2
1393                 filesystem has its bitmaps stored as 32-bit words with bit
1394                 0 as the LSB of each word.  Thus a bitmap with only bit 0
1395                 set would be, as a string of bytes, 00 00 00 01 00 ...  To
1396                 cope with this, we byte-reverse each word of a bitmap if
1397                 we have a big-endian filesystem, that is, if we are *not*
1398                 byte-swapping other word-sized numbers.
1399
1400 Mon Aug 11 03:30:48 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1401
1402         * dosio.c: New file to do DOS/BIOS disk accesses.
1403
1404         * namei.c (open_namei): Make pathlen be of type size_t.
1405
1406         * llseek.c: Always #include stdlib.h since it's need to define
1407                 size_t.  
1408
1409         * io.h: Use errcode_t for magic numbers.
1410
1411         * icount.c (get_icount_el): Use size_t where appropriate
1412         
1413         * dupfs.c (ext2fs_dup_handle): 
1414         * dblist.c (dir_block_cmp): Use size_t where appropriate.
1415
1416         * read_bb.c (ext2fs_read_bb_inode): 
1417         * cmp_bitmaps.c (ext2fs_compare_inode_bitmap): Use blk_t, ino_t
1418                 and size_t where appropriate.
1419
1420         * closefs.c (ext2fs_flush): Use dgrp_t instead of int where
1421                 appropriate.
1422
1423         * openfs.c (ext2fs_open): 
1424         * check_desc.c (ext2fs_check_desc): Use blk_t instead of int where
1425                 appropriate.
1426
1427         * rw_bitmaps.c (read_bitmaps): 
1428         * irel_ma.c: 
1429         * inode.c (ext2fs_write_inode): 
1430         * initialize.c (ext2fs_initialize):
1431         * brel_ma.c: Fix to make be 16-bit safe.
1432
1433         * link.c (ext2fs_link): 
1434         * unlink.c (ext2fs_unlink):
1435         * lookup.c (lookup_proc): 
1436         * ismounted.c (ext2fs_check_if_mounted): 
1437         * block.c (xlate_func): Add #pragma argsused for Turbo C.
1438
1439 Sun Aug 10 10:05:22 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1440
1441         * block.c (ext2fs_block_iterate2): Use retval which is a errcode_t
1442                 type.
1443
1444         * bitmaps.c (make_bitmap): Use size_t instead of int where
1445                 appropriate.
1446
1447         * bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
1448
1449         * alloc.c (ext2fs_new_inode): Use ino_t instead of int for the
1450                 group number.
1451
1452         * get_pathname.c: Use ino_t instead of int where appropriate.
1453
1454         * ext2fs.h: Make the magic structure element be errcode_t instead
1455                 of int.
1456
1457         * alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
1458                 bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
1459                 cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c
1460                 dirblock.c dupfs.c expanddir.c freefs.c get_pathname.c
1461                 icount.c initialize.c inline.c inode.c irel_ma.c link.c
1462                 llseek.c lookup.c mkdir.c namei.c newdir.c read_bb.c
1463                 read_bb_file.c rs_bitmap.c rw_bitmaps.c swapfs.c 
1464                 test_io.c tst_badblocks.c tst_iscan.c unix_io.c unlink.c
1465                 valid_blk.c version.c: Add an #ifdef for HAVE_UNISTD_H
1466
1467 Tue Jun 17 01:33:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1468
1469         * unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno
1470                 is zero, then return EXT2_IO_LLSEEK_FAILED.
1471
1472         * ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
1473
1474         * Release of E2fsprogs 1.11
1475
1476 Mon Jun 16 23:53:06 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1477
1478         * dblist.c (ext2fs_dblist_count): Added new function which returns
1479                 the number of directory blocks in dblist.
1480
1481 Sat Jun 14 01:39:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1482
1483         * unix_io.c (unix_flush): Make the io_channel flush function do a
1484                 fsync to flush the kernel buffers to disk.
1485
1486 Wed Jun 11 18:25:31 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1487
1488         * inode.c (ext2fs_inode_scan_goto_blockgroup): Fix bug; the
1489                 current inode number wasn't being set by the
1490                 goto_blockgroup function.
1491
1492 Mon Jun  9 10:45:48 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1493
1494         * bmove.c (ext2fs_move_blocks): New function which takes a bitmap
1495                 of blocks which need to be moved, and moves those blocks
1496                 to another location in the filesystem.
1497
1498         * rs_bitmap.c (ext2fs_resize_generic_bitmap): When expanding a
1499                 bitmap, make sure all of the new parts of the bitmap are
1500                 zero. 
1501
1502 Sun Jun  8 16:24:39 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1503
1504         * bitmaps.c (ext2fs_copy_bitmap): Fix bug; the destination bitmap
1505                 wasn't being returned to the caller.
1506
1507         * alloc_tables.c (ext2fs_allocate_group_table): Add new function
1508                 ext2fs_allocate_group_table() which sets the group tables
1509                 for a particular block group.  The relevant code was
1510                 factored out of ext2fs_allocate_tables().
1511
1512         * dblist.c (make_dblist): Adjust the initial size of the directory
1513                 block list to be a bit more realistic (ten plus twice the
1514                 number of directories in the filesystem).
1515
1516 Thu May  8 22:19:09 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1517
1518         * badblocks.c (ext2fs_badblocks_list_test): Fix bug where
1519                 ext2fs_badblocks_list_test would test the list (and exceed
1520                 array boundaries) if there were no bad blocks on the bad
1521                 blocks list.  (Showed up when user tried: mke2fs -c -b 4096).
1522
1523 Thu Apr 24 12:16:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
1524
1525         * Release of E2fsprogs version 1.10
1526
1527 Thu Apr 24 10:13:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
1528
1529         * alloc_tables.c (ext2fs_allocate_tables): Correctly place the
1530                 inode and block bitmaps based on the RAID 0 stride
1531                 parameter (which is passed by mke2fs).
1532
1533         * ext2fs.h: Add "stride" parameter to ext2_filsys, to be used by
1534                 mke2fs to communicate the stride length to
1535                 ext2fs_allocate_tables()
1536
1537 Wed Apr 23 21:50:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
1538
1539         * initialize.c (ext2fs_initialize): Fix to compile under Linux 1.2
1540                 systems.  (We can't assume that the new filesystem types
1541                 are supported.)
1542
1543 Wed Apr 23 18:40:53 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1544
1545         * alloc_tables.c (ext2fs_allocate_tables): Make sure that we
1546                 allocate the inode and block bitmaps inside block group at
1547                 all times.
1548
1549 Mon Apr 21 00:06:28 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1550
1551         * alloc.c (ext2fs_new_block): Fix bug where if goal==0 and the
1552                 filesystem has no free blocks, ext2fs_new_block would loop
1553                 forever.
1554
1555         * dupfs.c (ext2fs_dup_handle): Duplicate an ext2 filesystem handle
1556
1557         * freefs.c (ext2fs_free_inode_cache): Decrement refcount and only
1558                 free if refcount goes to zero.
1559
1560         * inode.c (create_icache): Initialize refcount to 1.
1561
1562         * ext2fsP.h: Added refcount to ext2_inode_cache
1563
1564         * dblist.c (ext2fs_copy_dblist): New function to copy a directory
1565                 block list.
1566
1567         * badblocks.c (ext2fs_badblocks_copy): New function to copy a
1568                 badblocks structure.
1569
1570 Sun Apr 20 23:19:51 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1571
1572         * bitmaps.c (ext2fs_copy_bitmap): New function to copy a bitmap.
1573
1574         * unix_io.c, test_io.c (unix_open, test_open): Initialize the
1575                 refcount to 1.
1576                 (unix_close, test_close): Decrement the refcount and only
1577                 close the io_channel if the refcount goes to 0.
1578
1579         * io.h: Add refcount to the io_channel structure.  Add new macro
1580                 interface io_channel_bumpcount() to bump the refcount.
1581
1582 Thu Apr 17 20:25:03 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1583
1584         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Use the inode
1585                 cache in the filesystem handle, instead of the inode cache
1586                 in a static variable.
1587
1588         * freefs.c: Added static function to free the inode cache (called by
1589                 ext2fs_free). 
1590
1591         * ext2fsP.h: Added definition of the ext2_inode_cache structures.
1592
1593         * ext2fs.h: Added pointer to the inode_cache structure.
1594
1595         * block.c (block_iterate_ind, block_iterate_dind, 
1596                 block_iterate_tind): If there are holes in the indirect,
1597                 doubly indirect, or triply indirect blocks, increment the
1598                 block count field automatically.
1599
1600 Thu Apr 17 12:23:38 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1601
1602         * Release of E2fsprogs version 1.09
1603
1604 Mon Apr 14 20:38:56 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1605
1606         * version.c (ext2fs_parse_version_string): Check the passed in
1607                 version string (instead of the hard-coded one).
1608
1609         * alloc_tables.c (ext2fs_allocate_tables): If the last block is
1610                 greater filesystem size, clamp it to prevent allocating a
1611                 block or inode bitmap beyond the filesystem.
1612
1613         * initialize.c (ext2fs_initialize): Fix bug where the metatdata
1614                 overhead calculation was accidentally removed.
1615
1616 Fri Apr 11 18:56:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1617
1618         * Release of E2fsprogs version 1.08
1619
1620 Thu Apr 10 13:15:15 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1621
1622         * dblist.c (ext2fs_set_dir_block): New function which sets the
1623                 block of a dblist entry, given the directory inode and
1624                 blockcnt.
1625
1626 Sat Apr  5 12:42:42 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1627
1628         * alloc_tables.c (ext2fs_allocate_tables): Allocate the bitmap and
1629                 inode bitmaps at staggered locations across the block
1630                 groups, to avoid concentrating the bitmaps on a small
1631                 number of disks when using striped RAID arrays.
1632
1633         * initialize.c (ext2fs_initialize): By default, choose the maximum
1634                 possible number of blocks per group (based on the size of
1635                 the bitmaps in the blocksize).
1636
1637 Fri Apr  4 11:28:16 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1638
1639         * initialize.c (ext2fs_initialize): Add support for
1640                 EXT2_COMPAT_SPARSE_SUPER feature.
1641
1642         * closefs.c (ext2fs_bg_has_super): New function to determine
1643                 whether or a particular block group should have a
1644                 superblock and block group descriptor.  Used for the
1645                 EXT2_COMPAT_SPARSE_SUPER feature is turned on.
1646                 (ext2fs_flush):  Check ext2fs_bg_has_super to see whether
1647                 or not the superblock should be written out for the block
1648                 group. 
1649
1650         * ext2fs.h (EXT2_COMPAT_SPARSE_SUPER): Define compatibility flag
1651                 for sparse duplicate superblocks.
1652
1653         * version.c (ext2fs_get_library_version): New function which
1654                 returns the library version.
1655
1656         * version.c (ext2fs_parse_version_string): New function which
1657                 parses a version string and returns a version number,
1658                 so application programs can compare version numbers as
1659                 integers.
1660
1661 Wed Mar 26 00:43:52 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1662
1663         * icount.c (ext2fs_create_icount): Change function so that it also
1664                 takes a new argument which contains a "hint" icount
1665                 structure.  This "hint" icount allows the create function
1666                 to set up the sorted list in advance.  This reduces
1667                 significantly the amount of data moving needed to insert
1668                 these inodes into the list later.
1669         
1670         * icount.c (ext2fs_icount_validate): New function which validates
1671                 that the icount structure's rep invariant.
1672
1673         * icount.c (get_icount_el): Completely revamped implementation
1674                 to subsume put_icount_el().  Put_icount_el() used to
1675                 use an O(N) implementation to insert in the middle
1676                 of the icount list.  It now uses a O(ln N) to search
1677                 for where the icount should be inserted, and then uses
1678                 a memcpy to move the list down (instead of a for loop).
1679         
1680         * icount.c (ext2fs_icount_fetch, ext2fs_icount_store,
1681                 ext2fs_icount_increment, ext2fs_icount_decrement): Check
1682                 to see if the inode is within bounds; if it isn't, return
1683                 EINVAL.
1684
1685         * bitops.h (ext2fs_test_generic_bitmap): Fix error message given
1686                 when a bad inode number is passed to test_generic_bitmap
1687                 to be EXT2FS_TEST_ERROR instead of the wrong
1688                 EXT2FS_UNMARK_ERROR.
1689
1690 Wed Mar 12 13:32:05 1997  Theodore Y. Ts'o  <tytso@mit.edu>
1691
1692         * Release of E2fsprogs version 1.07
1693
1694 Sun Mar  2 16:46:18 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1695
1696         * Makefile.in (ELF_VERSION): Change version to be 2.2
1697
1698 Tue Feb 11 14:54:02 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1699
1700         * alloc.c (ext2fs_get_free_blocks): Change routine to use
1701                 ext2fs_fast_test_block_bitmap_range().
1702
1703         * bitops.h (ext2fs_fast_test_block_bitmap_range,
1704                 ext2fs_test_block_bitmap_range: New inline functions which
1705                 test to see whether a contiguous range of blocks is
1706                 available.
1707
1708 Thu Feb  6 10:00:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1709
1710         * badblocks.c (ext2fs_badblocks_list_create): Rename sybmols to use
1711                 use ext2fs_badblocks_* instead of badblocks_*
1712
1713         * bb_compat.c: New file which translates between old badblocks_*()
1714                 names to ext2fs_badblocks_*()
1715
1716         * unlink.c (ext2fs_unlink): New file, moved ext2fs_unlink() from
1717                 link.c (since e2fsck doesn't use ext2fs_unlink()).
1718
1719         * rs_bitmap.c (ext2fs_resize_generic_bitmap): New file, contains
1720                 bitmap resizing routine moved from bitmaps.c, since e2fsck
1721                 doesn't need to use this function.
1722
1723         * lookup.c (ext2fs_lookup): Moved ext2fs_lookup to its own file,
1724                 since e2fsck only needs ext2fs_lookup.
1725
1726 Mon Feb  3 10:11:40 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1727
1728         * inode.c (ext2fs_open_inode_scan): Set fs->badblocks if it is not
1729                 already set; this is needed so that programs like dump
1730                 which use the inode scan functions will deal with
1731                 filesystems that have bad blocks in the inode table.
1732
1733 Sun Feb  2 00:17:36 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1734
1735         * ext2fs.h (struct_badblocks_list, struct_badblocks_iterate): 
1736                 Moved to ext2fsP.h, since it doesn't need to be part of
1737                 the public interface.
1738
1739         * dir_iterate.c: Move ext2_dir_iterate out of namei.c.
1740
1741 Sat Feb  1 10:14:55 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1742
1743         * dblist.c (ext2fs_get_num_dirs): New file, which implements a
1744                 directory block list abstraction.  (Code moved from
1745                 e2fsck).
1746
1747         * ext2fs.h, inode.c: Moved definition of ext2_struct_inode_scan to
1748                 to inode.c (since no one else should be peeking inside it!)
1749
1750         * valid_blk.c (ext2_inode_has_valid_blocks): New function.
1751
1752         * openfs.c (ext2fs_open): Check the feature set in the ext2
1753                 superblock, and refuse to open filesystems if they contain
1754                 incompatible features.  (Can be overriden with the
1755                 EXT2_FLAG_FORCE 
1756
1757 Sun Jan 12 11:31:46 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1758
1759         * block.c (ext2fs_block_iterate2): Added new function
1760                 ext2fs_block_iterate2 which changes the function
1761                 signature of the callback function to include the
1762                 referencing block and offset.
1763
1764         * inode.c (ext2fs_inode_scan_goto_blockgroup): Added new function
1765                 ext2fs_inode_scan_goto_blockgroup which allows an
1766                 application to jump to a particular block group while
1767                 doing an inode scan.
1768
1769 Wed Jan  1 23:50:12 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1770
1771         * dirblock.c: Include string.h, since we use memcpy().
1772
1773 Tue Dec  3 12:27:29 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1774
1775         * getsize.c (ext2fs_get_device_size): The ioctl BLKGETSIZE returns
1776                 a long not an int; this doesn't matter on i386 machines,
1777                 but it does on Alpha's.
1778         
1779 Fri Nov 29 20:57:37 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1780
1781         * inode.c (ext2fs_write_inode, ext2fs_read_inode): If the inode
1782                 table pointer is NULL, then return an error indicating
1783                 that the inode table is missing.
1784                 (get_next_blockgroup, get_next_blocks,
1785                 ext2fs_get_next_inode): Don't treat a missing inode table
1786                 as permanent error.  Return MISSING_INODE_TABLE, but as an
1787                 advisory error code, much like BAD_BLOCK_IN_INODE_TABLE.
1788
1789         * rw_bitmaps.c (ext2fs_write_block_bitmap,
1790                 ext2fs_write_inode_bitmap): If the inode or block bitmap
1791                 block is zero, then don't write out the inode or block
1792                 bitmap.  The idea here is to avoid stomping on the
1793                 superblock.
1794                 (read_bitmaps): If the inode or block bitmap block is
1795                 zero, then fill in that portion of the inode or block
1796                 bitmap with all zeros.
1797
1798         * inode.c (ext2fs_get_next_inode): Fix bug in handling of bad
1799                 blocks in inode table when the inode table size is
1800                 non-standard (and can therefore span blocks).
1801
1802 Tue Oct 29 20:13:14 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1803
1804         * alloc.c (ext2fs_new_block): Fix fencepost error in
1805                 ext2fs_new_block; make sure we don't try to allocate the
1806                 first block beyond the end of the filesystem.
1807
1808 Mon Oct 14 11:00:48 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1809
1810         * inode.c (check_for_inode_bad_blocks): New function called by
1811                 get_next_blocks() to avoid reading in bad blocks marked in
1812                 fs->badblocks.  Inodes located in bad blocks are returned
1813                 by ext2fs_get_next_inode() returns the error code 
1814                 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE.
1815         
1816         * alloc_tables.c (ext2fs_allocate_tables): New function which
1817                 performs the part of mke2fs's job of allocating the 
1818                 filesystem tables.
1819
1820         * test_io.c (test_close): IO manager which is used for testing
1821                 purposes.
1822
1823 Sun Oct 13 04:31:57 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1824
1825         * inode.c (ext2fs_get_next_inode): Separate out the function of
1826                 setting up for a new block group to get_next_blockgroup().
1827                 Separate out the function of reading in blocks of the
1828                 inode table to get_next_blocks().
1829
1830         * ext2fs.h: Add the badblocks list to the ext2_filsys entry
1831
1832         * badblocks.c (badblocks_list_add, badblocks_list_test): Add
1833                 blocks to the badblock list in sorted order.  This allows
1834                 badblocks_list_test to be coded using a binary search for
1835                 speed.
1836
1837 Tue Oct  8 02:02:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1838
1839         * Release of E2fsprogs version 1.06
1840
1841 Mon Oct  7 00:44:17 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1842
1843         * ext2fs.h, block.c, closefs.c, dirblock.c, inode.c, native.c,
1844                 open.c: Change EXT2_SWAP to EXT2_FLAG_SWAP for
1845                 consistency's sake.
1846         
1847         * closefs.c (ext2fs_flush): If the flag EXT2_MASTER_SB_ONLY is
1848                 set, then only write out the master superblock.
1849
1850 Sun Oct  6 21:45:26 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1851
1852         * block.c (ext2fs_block_iterate): Fixed bug which caused
1853                 block_iterate to fail to handle HURD created filesystems;
1854                 it tested the inode translator field before the inode was
1855                 loaded.
1856
1857 Tue Sep 17 14:08:24 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1858
1859         * initialize.c (ext2fs_initialize): Make sure the description for
1860                 the inode bitmap is set correctly.
1861
1862         * bitmaps.c (ext2fs_allocate_generic_bitmap): Fix minor type typo.
1863
1864 Thu Sep 12 15:23:07 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1865
1866         * Release of E2fsprogs version 1.05
1867
1868 Sat Sep  7 07:36:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1869
1870         * initialize.c: Override the kernel's idea of default
1871                 checkinterval from 0 (never) to 180 days.
1872
1873 Wed Aug 28 03:20:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1874
1875         * namei.c (ext2fs_namei_follow): New function which follows
1876                 symbolic link (if any) at the target.
1877
1878 Tue Aug 27 01:48:43 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1879
1880         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Add support
1881                 for shortcut function fs->read_inode() and fs->write_inode().
1882                 Added inode_cache to reduce CPU time spent in doing
1883                 byte swapping.
1884
1885         * swapfs.c (ext2fs_swap_super): Swap the new fields in a V2
1886                 superblock.
1887
1888         * namei.c (ext2fs_follow_link): New function.
1889                 (ext2fs_namei): Extended to have support for chasing
1890                 symbolic links.  ext2fs_namei() still returns an inode
1891                 which is a symbolic link.  Symbolic links are only chased
1892                 while resolving the containing directory.  To chase
1893                 symbolic links of the final result, use
1894                 ext2fs_follow_link().
1895
1896 Mon Aug 26 23:46:07 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1897
1898         * ext2_err.et.in: Added new error code EXT2_ET_SYMLINK_LOOP.
1899
1900         * bitops.h (ext2fs_set_bit, ext2fs_celar_bit): Use asm inlines
1901                 provided by Pete A. Zaitcev (zaitcev@lab.sun.mcst.ru).
1902
1903 Thu Aug 22 00:40:18 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1904
1905         * initialize.c (ext2fs_initialize): On systems where the byte
1906                 order is not i386 compatible, set the swap_byte flag.
1907
1908         * inode.c (inocpy_with_swap): Check to see if inode contains a
1909                 fast symlink before swapping the inode block fields.  This
1910                 required adding a new argument to inocpy_with_swap to
1911                 determine whether the mode field is in host order or not.
1912
1913 Wed Aug 21 00:45:42 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1914
1915         * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit): On
1916                 the sparc, if EXT2_STD_BITOPS set, use the standard
1917                 i386-compatible bitmask operations, instead on the
1918                 non-standard native bitmask operators.
1919
1920 Fri Aug  9 11:11:35 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1921
1922         * block.c (ext2fs_block_iterate): Cause block iterator to return
1923                 the HURD translator block (along with everything else).
1924                 If the flag BLOCK_FLAG_DATA_ONLY is passed to the block
1925                 iterator, then don't return any meta data blocks
1926                 (including the HURD translator).
1927
1928 Wed Jul 17 17:13:34 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1929
1930         * gen_uuid.c: New file, which generates DCE-compatible UUIDs.
1931
1932         * uuid.c: New file, containing UUID utility functions.
1933
1934 Tue Jul 16 10:19:16 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1935
1936         * ext2fs.h: Add a definition of the "real" ext2 superblock.
1937
1938 Fri May 24 14:54:55 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1939
1940         * ext2fs.h: Fix erroneous ino_t type used in block_bitmap type.
1941
1942 Sun May 19 15:39:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1943
1944         * openfs.c (ext2fs_open): If the blocksize in the superblock is
1945                 zero, return the error EXT2_ET_CORRUPT_SUPERBLOCK, since
1946                 that's a basic value that must be correct for the rest of
1947                 the library to work.
1948
1949         * ext2_err.et.in (EXT2_ET_CORRUPT_SUPERBLOCK): Added new error
1950                 code.
1951
1952 Thu May 16 11:12:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
1953
1954         * Release of E2fsprogs version 1.04
1955
1956 Wed Mar 27 00:33:40 1996    <tytso@rsts-11.mit.edu>
1957
1958         * Release of E2fsprogs version 1.03
1959
1960 Tue Mar 26 12:06:32 1996    <tytso@rsts-11.mit.edu>
1961
1962         * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit):
1963                 Change the m68k bit numbering for bitmasks to match with
1964                 the bit numbering used by all other ext2 implementations.
1965
1966 Thu Mar  7 03:37:00 1996    <tytso@rsts-11.mit.edu>
1967
1968         * inode.c (ext2fs_get_next_inode, ext2fs_close_inode_scan, 
1969         ext2fs_open_inode_scan): Support dynamically-sized inodes.
1970
1971 Wed Mar  6 12:26:29 1996    <tytso@rsts-11.mit.edu>
1972
1973         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Support
1974                 dynamically-sized inodes.
1975
1976         * openfs.c (ext2fs_open): Allow dynamic revision filesystem to be
1977                 loaded.
1978
1979 Tue Mar  5 03:49:37 1996    <tytso@rsts-11.mit.edu>
1980
1981         * initialize.c (ext2fs_initialize): Catch an error condition where
1982                 the passed in size is *really* too small.
1983
1984         * alloc.c (ext2fs_new_inode): 
1985         * ext2fs.h (EXT2_FIRST_INODE): Add support for dynamic revision to
1986                 get first inode.
1987
1988 Wed Feb 21 15:56:17 1996    <tytso@rsts-11.mit.edu>
1989
1990         * getsize.c (ext2fs_get_device_size): Open the device read-only
1991                 when trying to determine its size.
1992
1993 Wed Jan 31 11:06:08 1996    <tytso@rsts-11.mit.edu>
1994
1995         * Release of E2fsprogs version 1.02
1996
1997 Sat Dec  9 09:57:50 1995    <tytso@rsts-11.mit.edu>
1998
1999         * rw_bitops.c (ext2fs_write_block_bitmap):
2000         * bitops.c (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
2001         * bitops.h (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
2002                 Rename {test,set,clear}_bit to ext2fs_{test,set,clear}_bit, 
2003                 to avoid conflicts with with kernel include files.  Also
2004                 rename ADDR and CONST_ADDR to EXT2FS_ADDR and
2005                 EXT2FS_CONST_ADDR. 
2006
2007 Thu Oct 26 12:09:16 1995    <tytso@rsts-11.mit.edu>
2008
2009         * ext2_err.et: Updated message in EXT2_ET_BASE to say version 0.5c
2010
2011         * swapfs.c (ext2fs_swap_super): Put an #ifdef check around
2012                 s_def_resuid and s_def_resgid for backwards compatibility.
2013
2014 Fri Oct 20 23:33:31 1995    <tytso@rsts-11.mit.edu>
2015
2016         * bitops.h: Added #ifdef's for Sparc.
2017
2018 Wed Sep  6 22:14:46 1995    <tytso@rsts-11.mit.edu>
2019
2020         * getsize.c: #include <sys/ioctl.h> under Linux to pick up ioctl()
2021                 declaration
2022
2023         * closefs.c: #include <string.h> to pick up memset() declaration
2024
2025 Mon Sep  4 21:45:29 1995  Remy Card  <card@bbj>
2026
2027         * Makefile.in: Added support for BSD shared libraries.
2028
2029         * initialize.c (ext2fs_initialize): Correctly set the s_creator_os
2030                 flag.
2031
2032 Mon Sep  4 09:55:30 1995    <tytso@rsts-11.mit.edu>
2033
2034         * unix_io.c (unix_open): Add a double check; if the passed in name
2035                 is NULL, return EXT2_ET_BAD_DEVICE_NAME.
2036
2037         * ext2_err.et (EXT2_ET_BAD_DEVICE_NAME): Added new error code
2038
2039 Wed Aug 16 15:44:10 1995    <tytso@rsts-11.mit.edu>
2040
2041         * inode.c (ext2fs_check_directory): Use LINUX_S_ISDIR instead of
2042                 S_ISDIR.
2043
2044 Tue Aug 15 13:08:36 1995    <tytso@rsts-11.mit.edu>
2045
2046         * getsize.c (ext2fs_get_device_size): Add support for reading the
2047                 partition size from a BSD disk label.
2048
2049 Thu Aug 10 09:33:26 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
2050
2051         * getsize.c (ext2fs_get_device_size): New function that determins
2052                 the size of a device.  Used by mke2fs and e2fsck.
2053
2054 Sat Aug 12 03:09:54 1995  Remy Card  <card@bbj>
2055
2056         * Makefile.in (install): Install static libraries in $(ulibdir)
2057                 (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
2058
2059 Wed Aug  9 17:04:23 1995  Theodore Y. Ts'o  <tytso@dcl>
2060
2061         * bitmaps.c (ext2fs_free_inode_bitmap, ext2fs_free_block_bitmap):
2062                 Move these functions to freefs.c.
2063
2064         * closefs.c (ext2fs_flush): If swapping blocks, clear the group
2065                 descriptors shadow memory to keep purify quiet.  (This
2066                 also has the nice benefit that the unused portion of the
2067                 shadow descriptors are zeroed out.)
2068
2069         * dirblock.c (ext2fs_write_dir_block): We need to use
2070                 dirent->rec_len *before* it's byteswapped to find the
2071                 location of the next directory structure!
2072
2073         * alloc.c (ext2fs_new_inode): Fix bug which could potentially
2074                 cause ext2fs_new_inode to loop infinitely if we're trying
2075                 to allocate an inode in group #0 and there are no free
2076                 inodes at all in the system.
2077
2078         * closefs.c: #include <errno.h> if it exists.
2079
2080 Sun Aug  6 13:27:50 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
2081
2082         * ext2fs.h (BLOCK_FLAG_HOLE): Added new definition for
2083                 BLOCK_FLAG_APPEND.  Added documentation for the block
2084                 interator flags.
2085
2086 Sat Aug  5 11:44:05 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
2087
2088         * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
2089                 installation directories correctly.
2090
2091 Tue Jul 18 09:27:38 1995    <tytso@rsx-11.mit.edu>
2092
2093         * namei.c (process_dir_block): 
2094         * mkdir.c (ext2fs_mkdir): 
2095         * expanddir.c (expand_dir_proc): Use ext2fs_{read,write}_dir_block
2096                 to read/write the directory block.
2097
2098         * dirblock.c (ext2fs_read_dir_block), ext2fs_write_dir_block): New
2099                 file containing functions for reading and writing
2100                 directory blocks (byte swapping if necesssary)
2101
2102         * block.c (block_iterate_ind, block_iterate_dind, 
2103                 block_iterate_tind): Byte swap the block addresses if
2104                 EXT2_SWAP_BYTES is set (and swap them back before writing
2105                 them out.)
2106
2107         * inode.c (inocpy_with_swap): New function.
2108         (ext2fs_get_next_inode, ext2fs_read_inode, ext2fs_write_inode):
2109                 Call inocpy_with_swap if EXT2_SWAP_BYTES if set.
2110
2111         * closefs.c (ext2fs_flush): If EXT2_SWAP_BYTES is set, then swap
2112                 the superblock and group descriptors before writing it out.
2113
2114         * openfs.c (ext2fs_open): If the magic number is byte-swapped,
2115                 then set the EXT2_SWAP_BYTES and byte-swap the superblock
2116                 and group descriptors.
2117
2118         * swapfs.c (ext2fs_swap_super, ext2fs_swap_group_desc): New functions
2119                 to desp ext2 filesystem structures.
2120
2121         * bitops.c (set_bit, clear_bit, test_bit): Use modifications
2122                 supplied by Pete A. Zaitcev so that the C language
2123                 versions of these functions are more portable.  They will
2124                 now work on both little and big endian systems, and the
2125                 assumption that 32-bit integers are used is gone.
2126
2127         * bitops.h (ext2_swab16, ext2_swab32): Added new functions for
2128                 doing byte swapping.
2129
2130         * ext2fs.h (EXT2_SWAP_BYTES): Add new flag which indicates that
2131                 byte swapping should take place.
2132
2133 Sun Jul 16 06:21:43 1995    <tytso@rsx-11.mit.edu>
2134
2135         * Makefile.in, cmp_bitmaps.c (ext2fs_compare_block_bitmap_end,
2136                 ext2fs_compare_inode_bitmap_end): Added new file
2137                 containing routines to compare bitmaps.
2138
2139         * ext2_err.et (EXT2_ET_NEQ_BLOCK_BITMAP, EXT2_ET_NEQ_INODE_BITMAP): 
2140                 Added new error codes.
2141
2142 Sat Jul 15 04:23:37 1995    <tytso@rsx-11.mit.edu>
2143
2144         * inode.c (ext2fs_get_next_inode): Don't check scan->inode_buffer;
2145                 if the magic number is correct, it will be allocated.
2146
2147 Fri Jul 14 19:02:59 1995    <tytso@rsx-11.mit.edu>
2148
2149         * block.c (block_iterate_ind, block_iterate_dind, 
2150                 block_iterate_tind): Don't recompute block_nr each loop;
2151                 just increment it!  Factor check of BLOCK_FLAG_APPEND out
2152                 of the loop.  Factor mask of BLOCK_CHANGED into changed
2153                 variable out of the loop.  (block_iterate_ind, in
2154                 particular, gets called a lot, so every little
2155                 optimization helps.)
2156
2157 Thu Jul 13 08:02:45 1995    <tytso@rsx-11.mit.edu>
2158
2159         * block.c (block_iterate_ind, block_iterate_dind, 
2160                 block_iterate_tind): Precompute limit of loop to speed up
2161                 block_iterate_ind and company.
2162
2163         * bitops.h (ext2fs_fast_mark_block_bitmap, 
2164                 ext2fs_fast_unmark_block_bitmap, ext2fs_fast_test_block_bitmap,
2165                 ext2fs_fast_mark_inode_bitmap, ext2fs_fast_unmark_inode_bitmap,
2166                 ext2fs_fast_test_inode_bitmap): Add fast version of these
2167                 functions, which don't do range checking.
2168
2169         * bitops.h (ext2fs_get_block_bitmap_start, 
2170                 ext2fs_get_inode_bitmap_start, ext2fs_get_block_bitmap_end,
2171                 ext2fs_get_inode_bitmap_end): Add new accessor functions
2172                 which return the start and end points of the bitmaps.
2173
2174 Tue Jul 11 18:59:41 1995    <tytso@rsx-11.mit.edu>
2175
2176         * llseek.c (ext2_llseek): If the offset is small enough, use lseek
2177                 instead of llseek.  The errno if the offset is too large
2178                 and lseek is not supported should be EINVAL, not -EINVAL.
2179
2180 Thu Jun 15 23:43:02 1995  Remy Card  <card@bbj>
2181
2182         * Makefile.in: Added support for ELF shared libraries.
2183                 Fixed typos in the compilation rules.
2184                 (distclean): Added Makefile.
2185
2186         * llseek.c (llseek): New function, if llseek() does not exist in the
2187         C library.
2188         (ext2_llseek): Changed to call llseek().
2189
2190 Mon Jun 12 08:29:07 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
2191
2192         * ext2fs.h: Use __u32 to define blk_t, instead of unsigned long.
2193
2194 Sun Jun 11 15:02:54 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
2195
2196         * mkdir.c (ext2fs_mkdir): Use LINUX_S_IFDIR instead of S_IFDIR.
2197
2198         * ext2fs.h (LINUX_S_IFDIR): Define a linux specific versions of
2199                 the S_*, which are normally defined in <sys/stat.h>.  This
2200                 allows us to compile e2fsprogs on a non-Linux system,
2201                 which may have a different value for S_IFDIR.
2202
2203 Sat Jun 10 23:47:05 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
2204
2205         * bitops.c (clear_bit, set_bit): Remove calls to cli() and sti();
2206                 this is a user-mode application!
2207
2208 Thu Jun  8 13:13:22 1995  Miles Bader  <miles@churchy.gnu.ai.mit.edu>
2209
2210         * llseek.c: Put the include of <linux/unistd.h> inside the #ifdef
2211         __linux__ so that non-linux systems won't see it.
2212
2213         * alloc.c: Include <errno.h> if possible.
2214         * badblocks.c: Ditto.
2215         * bb_inode.c: Ditto.
2216         * bitmaps.c: Ditto.
2217         * block.c: Ditto.
2218         * expanddir.c: Ditto.
2219         * get_pathname.c: Ditto.
2220         * initialize.c: Ditto.
2221         * inode.c: Ditto.
2222         * llseek.c: Ditto.
2223         * mkdir.c: Ditto.
2224         * namei.c: Ditto.
2225         * newdir.c: Ditto.
2226         * openfs.c: Ditto.
2227         * rw_bitmaps.c: Ditto.
2228         * unix_io.c: Ditto.
2229
2230         * Makefile.in: Rewritten to conform to GNU coding standards and
2231         support separate compilation directories.
2232
2233 Thu May 11 04:13:12 1995    <tytso@rsx-11.mit.edu>
2234
2235         * initialize.c (ext2fs_initialize): Don't allow more than one
2236                 bitmaps's worth of inodes in a group.
2237
2238 Sat Mar 11 14:07:11 1995  Theodore Y. Ts'o  <tytso@localhost>
2239
2240         * llseek.c (ext2_llseek): Added error checking to the llseek()
2241                 compat code to protect against overflow.  This only
2242                 applies to 1.0 and early 1.1 kernels, which don't support
2243                 the llseek() system call.
2244
2245 Thu Nov 24 16:29:00 1994  Theodore Y. Ts'o  (tytso@rt-11)
2246
2247         * unix_io.c (unix_open): Initialize the read_error and write_error
2248                 io_channel pointers to be null.
2249
2250         * bb_inode.c (clear_bad_block_proc): If an illegal block number is
2251                 found, clear it but don't try to update the filesystem
2252                 accounting information, since that's hopeless anyway.
2253
2254         * block.c (bloblock_iterate_ind, bloblock_iterate_dind,
2255         bloblock_iterate_tind): Check to see if the indirect blocks are
2256                 valid before trying to read them.
2257
2258         * ext2_err.et (EXT2_ET_BAD_IND_BLOCK, EX2_ET_BAD_DIND_BLOCK,
2259         EXT2_ET_BAD_TIND_BLOCK): Add new error codes.
2260
2261         * bitops.h (ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
2262         ext2fs_test_block_bitmap, ext2fs_mark_inode_bitmap,
2263         ext2fs_unmark_inode_bitmap, ext2fs_test_inode_bitmap):  If an
2264                 illegal block or inode number is passed in, return instead
2265                 of trying to test, set, or clear the bit.
2266
2267 Mon Nov  7 21:32:33 1994  Remy Card  <card@bbj>
2268
2269         * Makefile: Added a dummy install target in case shared libraries
2270                 are not built.
2271
2272 Mon Oct 24 14:11:44 1994    (tytso@rsx-11)
2273
2274         * bitmaps.c (ext2fs_allocate_block_bitmap): Fix calculation of how
2275                 the real last block of the bitmap should be calculated.
2276
2277 Wed Sep  7 10:05:36 1994    (tytso@rsx-11)
2278
2279         * bitmaps.c (ext2fs_fudge_inode_bitmap_end, 
2280                 ext2fs_fudge_block_bitmap_end, ext2fs_clear_inode_bitmap,
2281                 ext2fs_clear_block_bitmap, ext2fs_free_inode_bitmap,
2282                 ext2fs_free_block_bitmap): Add magic number checking for
2283                 the inode and block bitmaps.
2284
2285         * bitmaps.c (ext2fs_allocate_block_bitmap): Fix to set the correct
2286                 magic number for a block bitmap instead of an inode bitmap.
2287
2288         * inode.c (ext2fs_close_inode_scan, ext2fs_get_next_inode):  Add
2289                 magic number checking for the inode_scan structure.
2290
2291         * badblocks.c (badblocks_list_free, badblocks_list_add, 
2292                 badblocks_list_test, badblocks_list_iterate_begin,
2293                 badblocks_list_iterate, badblocks_list_iterate_end): Add
2294                 magic number checking for the badblocks_list and
2295                 badblocks_iterate structures.
2296
2297         * ext2_err.et (EXT2_ET_MAGIC_UNIX_IO_CHANNEL): 
2298         * unix_io.c (unix_open, unix_close, unix_set_blksize, unix_read_blk,
2299                 unix_write_blk, unix_flush): Add magic number checking
2300                 both for io_channel structure and unix_private_data
2301                 structure.
2302
2303         * openfs.c (ext2fs_open): Add check for io_manager structure's
2304                 magic number.
2305
2306         * rw_bitmaps.c (ext2fs_write_inode_bitmap, ext2fs_write_block_bitmap,
2307                 ext2fs_read_inode_bitmap, ext2fs_read_block_bitmap,
2308                 ext2fs_read_bitmaps, ext2fs_write_bitmaps): 
2309         * read_bb.c (ext2fs_read_bb_inode): 
2310         * read_bb_file.c (ext2fs_read_bb_FILE): 
2311         * newdir.c (ext2fs_new_dir_block): 
2312         * namei.c (ext2fs_dir_iterate, ext2fs_lookup, ext2fs_namei): 
2313         * link.c (ext2fs_link, ext2fs_unlink): 
2314         * inode.c (ext2fs_open_inode_scan, ext2fs_read_inode,
2315                 ext2fs_write_inode, ext2fs_get_blocks, 
2316                 ext2fs_check_directory): 
2317         * get_pathname.c (ext2fs_get_pathname): 
2318         * expanddir.c (ext2fs_expand_dir): 
2319         * block.c (ext2fs_block_iterate): 
2320         * bitmaps.c (ext2fs_allocate_inode_bitmap, 
2321                 ext2fs_allocate_block_bitmap): 
2322         * bb_inode.c (ext2fs_update_bb_inode): 
2323         * alloc.c (ext2fs_new_inode,ext2fs_new_block,ext2fs_get_free_blocks): 
2324         * check_desc.c (ext2fs_check_desc): 
2325         * closefs.c (ext2fs_close, ext2fs_flush): 
2326         * freefs.c (ext2fs_free): Add check for ext2_filsys magic number.
2327
2328         * Makefile:
2329         * ext2fs.h:
2330         * openfs.c:
2331         * check_desc.c (ext2fs_check_desc): Move ext2fs_check_desc from
2332         openfs.c into its own file.
2333
2334         * ext2fs.h (EXT2_CHECK_MAGIC): Added macro for checking for
2335         structure magic numbers.
2336
2337         * closefs.c (ext2fs_flush): Folded in Remy Card's changes to clear
2338         the EXT2_VALID_FS flag in the backup superblock blocks, so that if
2339         someone uses the -b option to specify the use of the backup
2340         superblock --- this usually means that the main superblock is
2341         toast.  :-)
2342
2343         * ext2fs.h: 
2344         * ext2_err.et (EXT2_ET_REV_TOO_HIGH): 
2345         * openfs.c (ext2fs_open): Folded in Remy Card's changes to add a
2346         revision level to the superblock.
2347
2348 Sun Aug 21 00:50:08 1994  Theodore Y. Ts'o  (tytso@rt-11)
2349
2350         * ext2fs.h:
2351         * bitmaps.c:
2352         * bitops.c
2353         * bitops.h:
2354         * openfs.c:
2355         * initialize.c: Completely revamped the inode and block bitmap
2356         structures, so that they can be better chance of being extensible
2357         in a shared library.  They are now their own type, instead of
2358         being a char *.  Also, the function signatures of
2359         ext2fs_test_block_bitmap, ext2fs_mark_block_bitmap,
2360         ext2fs_unmark_block_bitmap, ext2fs_test_inode_bitmap,
2361         ext2fs_mark_inode_bitmap, and ext2fs_unmark_inode_bitmap were
2362         changed to eliminate the ext2_filsys argument, since it is no
2363         longer necessary.
2364
2365 Wed Aug 17 21:46:44 1994  Remy Card  (card@bbj)
2366
2367         * unix_io.c (unix_read_blk and unix_write_blk): use the llseek
2368         system call if available.
2369
2370         * llseek.c: new file.  This is the stub calling the llseek system
2371         call which allows supports for 2GB+ file systems.
2372
2373         * initialize.c (ext2fs_initialize): Ext2fs_initialize now stores
2374         the creator operating system.
2375
2376 Wed Aug 17 10:03:24 1994  Theodore Y. Ts'o  (tytso@rt-11)
2377
2378         * initialize.c (ext2fs_initialize): Ext2fs_initialize now sets up
2379         the group descriptor statistics in addition to everything else.
2380         This relieves mke2fs of the responsibility of doing it.
2381
2382         * bitops.c, bitops.h: Add assembly inline functions for the 68000.
2383         Added a new #define, _EXT2_HAVE_ASM_BITOPS_ to control whether or
2384         not the generic C function equivalents should be included or not.
2385
2386         * openfs.c (ext2fs_open): If a superblock is specified, then use
2387         the backup group descriptors that go along with this superblock,
2388         instead of using the primary group descriptors.  This allows
2389         e2fsck to recover filesystems where the primary group descriptors
2390         have been trashed.
2391
2392