Whamcloud - gitweb
Fix asm_types.h type conflicts
[tools/e2fsprogs.git] / lib / ext2fs / ChangeLog
1 2006-04-09  Theodore Ts'o  <tytso@mit.edu>
2
3         * ext2_types.h.in, Makefile.in, tst_types.c: Use the asm_types.h
4                 file to define the __[us]{8,16,32,64} types.  Add a
5                 tst_types program to make sure the types are correct.
6
7 2006-04-04  Theodore Ts'o  <tytso@mit.edu>
8
9         * mkjournal.c (ext2fs_add_journal_inode): If the filesystem is
10                 opened in exclusive mode, then device will be busy by
11                 definition, so don't return -EBUSY.  This caused mke2fs -j
12                 to fail on the 1.39-WIP (29-Mar-2006) release.  (Addresses
13                 Debian Bug: #360652)
14
15 2006-03-29  Theodore Ts'o  <tytso@mit.edu>
16
17         * bitops.h (ext2fs_set_bit, ext2fs_clear_bit): Fix the constraints
18                 so that GCC knows that the ext2fs_set/clear_bit reads and
19                 writes the data.
20
21 2006-03-25  Theodore Ts'o  <tytso@mit.edu>
22
23         * Makefile.in: Check the bitfield operations much more carefully,
24                 and arrange to have tst_bitops run from "make check"
25
26         * tst_bitops.c: Enahce tst_bitops program so that it is much more
27                 thorough in testing bit optations.
28         
29         * bitops.h: Add new functions ext2fs_fast_set_bit() and
30                 ext2fs_fast_clear_bit() and make the x86 functions 32-bit
31                 clear.  Change the fast inode and block mark/unmark
32                 functions to use ext2fs_fast_set/get_bit()
33
34 2006-03-18  Theodore Ts'o  <tytso@mit.edu>
35
36         * ext2fs.h (EXT2_FLAG_EXCLUSIVE): Define new flag which requests
37                 that the io_channel be opened in exclusive mode.
38
39         * openfs.c (ext2fs_open2), initialize.c (ext2fs_initialize): If
40                 EXT2_FLAG_EXCLUSIVE is passed to ext2fs_open or
41                 ext2fs_initialize, then pass IO_FLAG_EXCLUSIVE to the
42                 io_channel open routine.
43
44         * ext2_io.h (IO_FLAG_EXCLUSIVE), unix_io.c (unix_open): Add new
45                 io_channel open flag, IO_FLAG_EXCLUSIVE, which requests
46                 that the device be opened in exclusive (O_EXCL) mode.
47
48         * ext2fs.h: Fix documentation so that BLOCK_FLAG_TRAVERSE is
49                 BLOCK_FLAG_DEPTH_TRAVERSE.  (Addresses Debian Bug #351268)
50
51 2006-03-17  Theodore Ts'o  <tytso@mit.edu>
52
53         * initialize.c (calc_reserved_gdt_blocks): Fix a signed vs
54                 unsigned problem which caused mke2fs -O resize_inode to
55                 bomb out on large filesystems.  (Addresses Debian Bug
56                 #346580)
57
58         * ext2_fs.h (EXT2_IOC_GETVERSION_NEW, EXT2_IOC_SETVERSION_NEW,
59                 EXT2_IOC_GROUP_EXTEND, EXT2_IOC_GROUP_ADD): Add ioctl
60                 definitions
61
62 2005-12-10  Theodore Ts'o  <tytso@mit.edu>
63
64         * Makefile.in: Add a dependency to make sure that the
65                 subdirectories are created before creating all of the
66                 object files.
67
68 2005-12-10  Theodore Ts'o  <tytso@mit.edu>
69
70         * res_gdt.c (ext2fs_create_resize_inode): Fix type-punning warning.
71
72         * read_bb_file.c (ext2fs_read_bb_FILE): Use a data structure
73                 instead of stuffing a function pointer dirctly into a void
74                 pointer, since that isn't portable.
75
76         * mkjournal.c (ext2fs_add_journal_inode): Fix possiblely
77                 uninitialized use of variable warning.
78
79         * initialize.c (calc_reserved_gdt_blocks): Fix signed vs. unsigned
80                 type complaint.
81
82         * ext2fs.h: Make the type of the 'now' field to be time_t to avoid
83                 gcc -Wall complaints.
84
85         * bitops.h (ext2fs_find_first_bit_set): Fix signed vs unsigned
86                 type error.
87
88         * tst_badblocks.c (file_test_invalid): Add test which confirms
89                 proper detection of invalid block numbers in
90                 ext2fs_read_bb_FILE().
91
92 2005-11-20  Theodore Ts'o  <tytso@mit.edu>
93
94         * bitops.h: We no longer have the sparc assembly code in the
95                 header file any more, so we shouldn't set
96                 _EXT2_HAVE_AS_BITOPS_.  This would break compiles on the
97                 sparc architectures when using gcc.
98         
99 2005-11-13  Theodore Ts'o  <tytso@mit.edu>
100
101         * ext2fs.h: Add #include <string.h> since the inline functions use
102                 memcpy().  (Addresses Sourceforge Bug #1251062)
103
104 2005-11-09  Theodore Ts'o  <tytso@mit.edu>
105
106         * Fix a bug when writing an external journal device on an big
107                 endian machine (such as a S/390), where when the number of
108                 block groups is zero, we never end up writing out the
109                 primary superblock at all.
110
111 2005-09-24  Theodore Ts'o  <tytso@mit.edu>
112
113         * ext2fs.h, bb_inode.c, closefs.c, initialize.c, mkdir.c,
114                 mkjournal.c, res_gdt.c:  If fs->now is non-zero, use that
115                 as the time instead of the system time when setting
116                 various filesystem fields (last modified time, last write
117                 time, etc.)
118
119 2005-08-28  Matthias Andree <matthias.andree@gmx.de>
120
121         * Fix compiler warnings about missing memcpy prototypes.
122
123 2005-07-25  Theodore Ts'o  <tytso@mit.edu>
124
125         * test_io.c (safe_getenv): Pass in zero to the unusued arguments
126                 of prctl(PR_GET_DUMPABLE) to avoid false positives from
127                 valgrind.
128
129 2005-07-19  Theodore Ts'o  <tytso@mit.edu>
130
131         * mkjournal.c (ext2fs_add_journal_inode): Check for the case where
132                 the filesystem is apparently not mounted, but the device
133                 is still busy.  This can happen when the luser doesn't
134                 bother to mount /proc and has a bogus /etc/mtab, but still
135                 wants to mount the filesystem before using tune2fs(?!?).
136                 Add a safety check to save him from his own stupidity, at
137                 least on 2.6 kernels.  (Addresses Debian Bug #319002)
138
139 2005-07-09  Andreas Dilger <adilger@clusterfs.com>
140
141         * getsize.c (ext2fs_get_device_size): Use fstat/fstat64 to get
142                 size of regular files.  Fix file descriptor leaks in error
143                 paths.
144
145 2006-06-30  Theodore Ts'o  <tytso@mit.edu>
146
147         * Release of E2fsprogs 1.38
148
149 2005-06-30  Theodore Ts'o  <tytso@mit.edu>
150
151         * bitops.h, bitops.c (ext2fs_set_bit, ext2fs_clear_bit,
152                 ext2fs_test_bit): Change these function prototypes to be
153                 unsigned int's.  Negative bit numbers were never allowed
154                 (and never made any sense), so this should be a safe
155                 change.  This is needed to allow safe use of block numbers
156                 greater than or equal to 2**31.
157
158 2005-06-27  Stephen Tweedie  <sct@redhat.com>
159
160         * ext2fs.h (ext2fs_resize_mem): Fix C99 strict type aliasing
161                 problems.  Addresses Red Hat Bugzilla #161183.
162
163 2005-06-19  Theodore Ts'o  <tytso@mit.edu>
164
165         * getsectsize.c (BLKSSZGET): Clean up test for when to manually
166                 define the BLKSSZGET ioctl.
167
168 2005-05-29  Theodore Ts'o  <tytso@mit.edu>
169
170         * ismounted.c (ext2fs_check_mount_point): Add test to see if the
171                 device appears to be busy; this only works on Linux 2.6+
172                 systems, but provides some additional bullet-proofing in
173                 those cases.
174
175 2005-05-08  Theodore Ts'o  <tytso@mit.edu>
176
177         * test_io.c (safe_getenv): Fix bug so it would fetch the right
178                 environment variable.
179
180 2005-04-09  Theodore Ts'o  <tytso@mit.edu>
181
182         * inode.c (ext2fs_write_new_inode), 
183                 ind_block.c (ext2fs_read_ind_block): Add missing return
184                 value in error return case.  (Otherwise we return garbage
185                 instead of the error code.)
186
187 2005-03-31  Theodore Ts'o  <tytso@mit.edu>
188
189         * test_io.c (test_open): If called by a setuid/setgid or an
190                 otherwise privileged program, be paranoid and ignore the
191                 TEST_IO_* environment variables.
192
193 2005-03-21  Theodore Ts'o  <tytso@mit.edu>
194
195         * Release of E2fsprogs 1.37
196
197 2005-03-21  Theodore Ts'o  <tytso@mit.edu>
198
199         * ext2_ext_attr.h (EXT2_XATTR_LEN, EXT2_XATTR_SIZE): Add new
200                 convenience cpp macros.
201
202 2005-03-20  Theodore Ts'o  <tytso@mit.edu>
203
204         * mkdir.c (ext2fs_mkdir): Call ext2fs_write_new_inode() instead of
205                 ext2fs_write_inode().
206
207         * inode.c (ext2fs_write_new_inode): New function which should be
208                 used when the caller is writing an inode for the first
209                 time.  It makes sure that the extra portion of the large
210                 inode is initialized properly.
211
212 2005-03-18  Theodore Ts'o  <tytso@mit.edu>
213
214         * Makefile.in: Fix clean target to remove tst_getsectsize.
215
216         * getsize.c (ext2fs_get_device_size): Check to see if the number
217                 of blocks is greater than 2**32 when we are doing a binary
218                 search to determine the device size.  Thanks to Stephen
219                 Tweedie for the patch.
220         
221 2006-02-05  Theodore Ts'o  <tytso@mit.edu>
222
223         * Release of E2fsprogs 1.36
224
225 2005-02-05  Theodore Ts'o  <tytso@mit.edu>
226
227         * Makefile.in: Remove ext2fs.pc on a "make distclean"
228
229 2005-02-04  Theodore Ts'o  <tytso@mit.edu>
230
231         * Makefile.in (clean): Remove tst_getsize when doing a make clean
232
233 2005-02-03  Theodore Ts'o  <tytso@mit.edu>
234
235         * bitops.c: Make the generic functions more efficient.
236
237         * bitops.h: Drop SPARC assembly code. It's less efficient than GCC
238                 3.4 compiled code and also triggers nasty compiler
239                 warnings on sparc64.  Thanks to Matthias Andree for his
240                 analysis and suggestion.
241         
242 2005-01-27  Theodore Ts'o  <tytso@mit.edu>
243
244         * res_gdt.c (ext2fs_create_resize_inode): Create the resize inode
245                 even if s_reserved_gdt_blocks is zero.
246
247 2005-01-26  Theodore Ts'o  <tytso@mit.edu>
248
249         * ext2fs.pc.in: Add pkg-config files.
250
251 2005-01-25  Theodore Ts'o  <tytso@mit.edu>
252
253         * ext2fs.h: Add definition of struct ext2_inode_large
254
255         * ext2_fs.h: Add new function prototypes
256
257         * ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr): The
258                 ext2fs_swap_ext_attr() has been moved to swapfs.c, and
259                 given a new argument, has_header.
260
261         * swapfs.c (ext2fs_swap_ext_attr): Moved from ext_attr.c, and
262                 takes an argument which controls whether or not there is
263                 an EA header which needs to be byteswaped.
264                 (ext2fs_swap_inode_full): New function which byte-swaps
265                 the EA in inode.
266
267         * inode.c (ext2fs_get_next_inode_full, ext2fs_read_inode_full,
268                 ext2fs_write_inode_full): New functions, originally from
269                 Alex Tomas, but which needed to be substantially fixed so
270                 that the tests wouldn't cause major stack overwrite bugs
271                 in byte-swapping is enabled.
272         
273 2005-01-18  Theodore Ts'o  <tytso@mit.edu>
274
275         * Makefile.in: Fix the kernel compile-time echo commands to be
276                 consistent and portable
277
278 2005-01-07  Theodore Ts'o  <tytso@mit.edu>
279
280         * unlink.c (ext2fs_unlink): If both the name and the inode number
281                 are unspecified, then return an error, so that we don't do
282                 something surprising such as unconditionally deleting the
283                 first directory entry.
284                 (unlink_proc): Delete directory entries by coalescing it
285                 with the previous entry, to avoid directory fragmentation.
286
287 2005-01-06  Theodore Ts'o  <tytso@mit.edu>
288
289         * version.c (ext2fs_parse_version_string): Change parsing
290                 algorithm so that version strings such as 1.36-rc1 returns
291                 a non-surprising result (i.e., 136, and not 1361).
292
293 2005-01-05  Theodore Ts'o  <tytso@mit.edu>
294
295         * block.c (block_iterate_ind, block_iterate_dind,
296                 block_iterate_tind): Move the code which byte swaps and
297                 read/writes indirect blocks to ext2fs_{read,write}_ind_block.
298                 This saves 400 bytes, and we need them for the
299                 resize_inode handling. 
300
301         * ind_block.c (ext2fs_read_ind_block, ext2fs_write_ind_block): New
302                 functions.
303
304         * res_gdt.c (ext2fs_create_resize_inode): Use 
305                 ext2fs_{read,write}_ind_block so that byte swapping is
306                 handled on big-endian systems.
307
308         * dupfs.c (ext2fs_dup_handle): Make sure the new filesystem handle
309                 has its own copy of the orig_super data structure.  (This
310                 is a better way of fixing a double-free problem in
311                 resize2fs which Fedora attempted to fix in 
312                 e2fsprogs-1.35-double_free.patch.   Addresses Red Hat
313                 Bugzilla #132707.)
314         
315 2004-12-23  Theodore Ts'o  <tytso@mit.edu>
316
317         * inode.c (ext2fs_flush_icache): When flushing the icache, clear
318                 the last-read block information as well.
319
320         * ext2fs.h (BMAP_SET), bmap.c (ext2fs_bmap): Add support for new
321                 flag, BMAP_SET, which allows the caller to set a
322                 particular logical->physical block mapping.
323
324         * ext2_err.et.in (EXT2_ET_SET_BMAP_NO_IND): New error code
325
326         * initialize.c (calc_reserved_gdt_blocks): #ifdef out all
327                 debugging printf statements.
328         
329         * res_gdt.c (ext2fs_create_resize_inode): Return
330                 EXT2_ET_RESIZE_INODE_CORRUPT if the resize inode is not
331                 what we expect.  #ifdef out all debugging printf
332                 statements.
333
334         * ext2_err.et.in (EXT2_ET_RESIZE_INODE_CORRUPT): Add new error code.
335
336 2004-12-22  Theodore Ts'o  <tytso@mit.edu>
337
338         * swapfs.c (ext2fs_swap_super): Byteswap the reserved_gdt_blocks
339                 superblocks field.
340
341 2004-12-15  Theodore Ts'o  <tytso@mit.edu>
342
343         * sparse.c (ext2fs_list_backups, ext2fs_bg_has_super),
344                 res_gdt.c (list_backups), closefs.c (ext2fs_bg_has_super),
345                 ext2fs.h: Move ext2fs_list_backups() to res_gdt.c, and
346                 ext2fs_bg_has_super() back to closefs.c.  There's no
347                 reason for the new file, since list_backups() isn't being
348                 used by any other functions, and can be made static, and
349                 all users of the ext2fs filesystem will have to call
350                 ext2fs_close() anyway.
351
352 2004-12-15  Theodore Ts'o  <tytso@mit.edu>
353
354         * Applied resize inode patch from Andreas Dilger
355
356         * res_gdt.c (ext2fs_create_resize_inode): New function that
357                 creates the resize inode.
358
359         * initialize.c (ext2fs_initialize): Reserve space for the resize
360                 inode.
361
362         * ext2fs.h (EXT2_LIB_FEATURE_COMPAT_SUPP): Add
363                 EXT2_FEATURE_COMPAT_RESIZE_INODE to the list of supported
364                 capabilities.
365                 Add function prototypes for res_gdt.c and sparse.c.
366
367         * closefs.c (ext2fs_super_and_bgd_loc): Take the reserved blocks
368                 into account when calculating the number of overhead
369                 blocks.
370
371         * closefs.c (ext2fs_bg_has_super, test_root), sparse.c: Move these
372                 functions to the new file sparse.c
373
374         * alloc_sb.c (ext2fs_reserve_super_and_bgd): Reserve the blocks
375                 saved in the resize inode as being in use.
376
377         * ext2_err.et.in (EXT2_ET_RES_GDT_BLOCKS): Add new error code.
378
379         * Makefile.in (srcdir): Add res_gdt.c and sparse.c to the ext2fs
380                 library.
381
382 2004-12-14  Theodore Ts'o  <tytso@mit.edu>
383
384         * Makefile.in: Use Linux-kernel-style makefile output for "make
385                 install"
386
387         * Makefile.in (installdirs): Use $(MKINSTALLDIRS) macro
388                 Update dependencies.
389
390 2004-11-30  Theodore Ts'o  <tytso@mit.edu>
391
392         * unix_io.c (unix_set_option): Add support for the offset option.
393
394         * test_io.c (test_set_option): Add support for the set_option method.
395
396         * ext2_io.h: Add new io_channel method, set_option(), and change
397                 io_channel_write_byte() from a macro to a library function.
398
399         * ext2fs.h, openfs.c(ext2fs_open2): New version of ext2fs_open
400                 which adds a new parameter, io_options.
401                 (ext2fs_open): If there is a question mark in the
402                 filename, and no io_options are specified, assumed that
403                 the text following the question mark are io_options.
404         
405         * io_manager.c, Makefile.in: New source file which contains
406                 high-level functions for the io_channel layer.
407
408         * freefs.c (ext2fs_free): Make sure we don't free the io_channel
409                 if image_io is NULL.
410
411         * Makefile.in: Use Linux-kernel-style makefile output to make it
412                 easier to see errors/warnings.
413
414 2004-11-29  Theodore Ts'o  <tytso@mit.edu>
415
416         * ext2_fs.h (EXT2_EXTENTS_FL, EXT3_FEATURE_INCOMPAT_EXTENTS, 
417                 EXT2_MAX_BLOCK_LOG_SIZE): Add definition for extent
418                 feature and inode flag.  Change maximum allowable block
419                 size to be 65536.
420
421 2004-10-08  Theodore Ts'o  <tytso@mit.edu>
422
423         * getsize.c (ext2fs_get_device_size): Add support for Windows
424                 9x/NT under Cygwin.  Thanks to Sam Robb
425                 (samrobb@users.sourceforge.net) for pointing this and the
426                 suggested code patch.
427
428 2004-09-17  Theodore Ts'o  <tytso@mit.edu>
429
430         * getsize.c: Clean up header #include's.
431
432         * llseek.c (ext2fs_llseek): On non-linux systems, use lseek64() if
433                 it is present.  (Addresses Debian bug #269044)
434
435 2004-07-28  Theodore Ts'o  <tytso@mit.edu>
436
437         * rw_bitmaps.c (read_bitmaps), block.c (block_iterate_ind,
438                 block_iterate_dind, block_iterate_tind), inode.c
439                 (ext2fs_read_inode): If EXT2_FLAG_IMAGE_FILE is set, so
440                 read the metadata from fs->image_io instead of fs->io.
441
442         * initialize.c (ext2fs_initialize), openfs.c (ext2fs_open):
443                 Initialize fs->image_io to be the same as fs->io.
444         
445         * ext2_err.et.in (EXT2_ET_NOT_IMAGE_FILE): Add new error code. 
446
447         * openfs.c (ext2fs_get_data_io, ext2fs_set_data_io,
448                 ext2fs_rewrite_to_io): New functions that allow
449                 applications to manipulate fs->image_io and fs->io safely.
450
451         * freefs.c (ext2fs_free): If fs->image_io is different fs->io,
452                 then call io_channel_close on fs->image_io.
453
454         * ext2fs.h: Add image_io element to the ext2_filsys data
455                 structure.  Add ext2fs_get_data_io() ext2fs_set_data_io(),
456                 and ext2fs_rewrite_to_io() prototypes.
457
458 2004-05-26  Theodore Ts'o  <tytso@mit.edu>
459
460         * closefs.c (ext2fs_flush): Make sure the master superblock is
461                 written last, and only after other I/O has been flushed to
462                 disk.  Thanks to Junfeng Yang from the Stanford
463                 Metacompilation group for pointing a potential ordering
464                 constraint problem if we don't write things out in the
465                 right order.
466
467         * test_io.c: Implement the ability to abort after n reads or
468                 writes to a particular block.  The block is specified by
469                 TEST_IO_BLOCK environment variable, and the read/write
470                 count by the TEST_IO_READ_ABORT and TEST_IO_WRITE_ABORT
471                 environment variables.  The block data is now only dumped
472                 if the 0x10 bit is set in TEST_IO_FLAGS.
473
474 2004-04-03  Theodore Ts'o  <tytso@mit.edu>
475
476         * ext2_types.h.in: Remove check for _UUID_TYPES since uuid_types.h
477                 is no longer used.
478
479 2004-03-08  Theodore Ts'o  <tytso@mit.edu>
480
481         * getsize.c (ext2fs_get_device_size): Only use the BLKGETSIZE64
482                 ioctl on Linux 2.6 since it is unreliable in Linux 2.4.
483                 (Addresses Debian Bug #236528).  Fix typo in the ioctl
484                 used for Mac OS X.
485
486 2004-03-02  Theodore Ts'o  <tytso@mit.edu>
487
488         * getsize.c (ext2fs_get_device_size): Update getsize functions to
489                 use Apple Darwin and Linux 64-bit ioctl's
490
491 2004-02-29  Brian Bergstrand  <brian@bergstrand.org>
492
493         * Makefile.in: Use $(BSDLIB_PIC_FLAG) to determine whether to use
494                 -fpic or -fPIC
495
496 2004-02-28  Theodore Ts'o  <tytso@mit.edu>
497
498         * Release of E2fsprogs 1.35
499
500 2004-02-21  Theodore Ts'o  <tytso@mit.edu>
501
502         * ext2fs.h (ext2fs_resize_mem): Fix C++ problem.  (Addresses Red
503                 Hat Bugzilla #112448; thanks Thomas Woerner from Red Hat.)
504
505 2004-02-14  Theodore Ts'o  <tytso@mit.edu>
506
507         * namei.c (follow_link): Correctly deal with symlinks that have
508                 extended attribute information.  (Addresses Debian Bug
509                 #232328)
510
511 2004-01-30  Theodore Ts'o  <tytso@mit.edu>
512
513         * ext2_fs.h: Reserve an extra 4 bytes for the journal backup,
514                 which we're using due to a typo in the e2fsck code.  (Oops)
515
516         * swapfs.c (ext2fs_swap_inode): Fix byte swap bug which causes SE
517                 Linux created symlinks with mandatory attributes to fail
518                 to be properly handled on big endian systems.  (Addresses
519                 Debian Bug #228723).
520                 (ext2fs_swap_super): Byte swap some new fields in the
521                 superblock, including the journal backup fields.
522
523 2003-12-02  Theodore Ts'o  <tytso@mit.edu>
524
525         * alloc.c, bb_inode.c, bitops.c, block.c, check_desc.c, closefs.c,
526                 dir_iterate.c, dirblock.c, expanddir.c, ext2fs.h,
527                 get_pathname.c, icount.c, imager.c, initalize.c, inode.c,
528                 lookup.c, openfs.c, read_bb.c, read_bb_file.c,
529                 rw_bitmaps.c, unix_io.c, unlink.c, write_bb_file.c: Fix
530                 gcc -Wall complaints.  Mainly marking variables as being
531                 unsued, and catching signed vs. unsigned comparisons.
532
533 2003-09-03  Theodore Ts'o  <tytso@mit.edu>
534
535         * closefs.c (ext2fs_super_and_bgd_loc): New function which
536                 centralizes the calculation of the superblock and block
537                 group descriptors.
538                 (ext2fs_flush): Use ext2fs_super_and_bgd_lock to figure
539                 out where to write the superblock and block group
540                 descriptors.
541
542         * alloc_sb.c (ext2fs_reserve_super_and_bgd): New function which
543                 reserves space in the block bitmap using
544                 ext2fs_super_and_bgd_loc.
545
546         * initialize.c (ext2fs_initialize): Use
547                 ext2fs_reserve_super_and_bgd to initialize the block bitmap.
548
549 2003-08-20  Theodore Ts'o  <tytso@mit.edu>
550
551         * inode_io.c (ext2fs_inode_io_intern2), ext2fs.h: Add new function
552                 allows the caller to pass in the inode data structure.
553
554         * fileio.c (ext2fs_file_open2), ext2fs.h: Add new function which
555                 allows the caller to pass in the inode to be used in the
556                 file I/O.
557
558         * ext2_fs.h: Add a backup of the location of the journal inode
559                 blocks to the superblock.
560
561         * mkjournal.c (write_journal_inode): Save the location of the
562                 journal inode to the backup location in the superblock.
563
564 2003-08-01  Philipp Thomas <pthomas@suse.de>
565
566         * alloc.c, badblocks.c, bb_inode.c, bitmaps.c, block.c, bmap.c,
567                 bmove.c, brel_ma.c, closefs.c, dblist.c, dblist_dir.c,
568                 dir_iterate.c, dirblock.c, dupfs.c, expanddir.c, ext2fs.h,
569                 ext_attr.c, fileio.c, freefs.c, get_pathname.c, icount.c,
570                 initialize.c, inode.c, inode_io.c, irel_ma.c, mkdir.c,
571                 mkjournal.c, namei.c, newdir.c, openfs.c, rs_bitmap.c,
572                 rw_bitmaps.c, test_io.c, unix_io.c: ext2fs_getmem(),
573                 ext2fs_free_mem(), and ext2fs_resize_mem() all now take a
574                 'void *' instead of a 'void **' in order to avoid pointer
575                 aliasing problems with GCC 3.x.
576
577 2003-07-25  Theodore Ts'o  <tytso@mit.edu>
578
579         * Release of E2fsprogs 1.34
580
581 2003-07-06  Theodore Ts'o  <tytso@mit.edu>
582
583         * kernel-jbd.h, flushb.c: Fix gcc -Wall nitpicks (indented cpp
584                 directives)
585
586         * ext2_types.h.in, initialize.c: Fix gcc -Wall nitpicks 
587                 (don't use #elsif)
588
589         * ismounted.c: Fix gcc -Wall nitpicks (Don't use exit as a goto label)
590
591         * llseek.c: Fix gcc -Wall nitpicks (don't use #elsif)
592
593         * lookup.c, read_bb.c: Fix gcc -Wall nitpicks (indent
594                 non-traditional #pragma)
595
596         * test_io.c: Fix gcc -Wall nitpicks (const/unsigned type issues)
597
598 2003-06-24    <tytso@snap.thunk.org>
599
600         * badblocks.c, ext2fs.h (ext2fs_u32_list_find,
601                 ext2fs_u32_list_test, ext2fs_u32_list_del,
602                 ext2fs_badblocks_list_del): Add functions to delete a
603                 block from the badblocks list.
604         * tst_badblocks.c: Add test cases for ext2fs_badblocks_list_del().
605
606 2003-05-21  Theodore Ts'o  <tytso@mit.edu>
607
608         * getsectsize.c (ext2fs_get_device_sectsize): New function which
609                 returns the hardware sector size (if it is available).
610
611 2003-05-13  Theodore Ts'o  <tytso@mit.edu>
612
613         * unix_io.c: Add #ifdef NO_IO_CACHE which disables all userspace
614                 caching by the unix_io layer.  Not enabled, only for
615                 debugging. 
616
617 2003-05-05  Theodore Ts'o  <tytso@mit.edu>
618
619         * test_io.c: Pay attention to the environment variables
620                 TEST_IO_LOGFILE, TEST_IO_FLAGS, and TEST_IO_BLOCK to
621                 determine whether or not we should log io activity, and to
622                 where.
623
624 2003-05-03  Theodore Ts'o  <tytso@mit.edu>
625
626         * tst_badblocks.c (file_test): Use tmpfile() instead of mktemp().
627
628 2003-04-29  Theodore Ts'o  <tytso@mit.edu>
629
630         * getsize.c (ext2fs_get_device_size): Allow windows code to get
631                 the resize for filesystems that are in regular files.
632
633 2003-04-21  Theodore Ts'o  <tytso@mit.edu>
634
635         * Release of E2fsprogs 1.33
636
637 2003-04-21  Theodore Ts'o  <tytso@mit.edu>
638
639         * Makefile.in: Use DYLD_LIBRAY_PATH so that "make check" works on
640                 Darwin systems when building with shared libraries.
641
642 2003-04-18  Theodore Ts'o  <tytso@mit.edu>
643
644         * unix_io.c: Use __CYGWIN__ instead of CYGWIN.
645
646 2003-04-17  Theodore Ts'o  <tytso@mit.edu>
647
648         * getsize.c: Add Cygwin/Windows version of ext2fs_get_device_size()
649
650 2003-04-12  Theodore Ts'o  <tytso@mit.edu>
651
652         * unix_io.c (raw_read_blk): Add Cygwin support (the Windows block
653                 device only accepts sector aligned read requests.
654
655         * ismounted.c (check_mntent_file): Deal with OS's that don't
656                 define MNTOPT_RO.
657
658         * imager.c: If the OS doesn't define ssize_t, typedef it to int.
659
660 2003-04-11  Theodore Ts'o  <tytso@mit.edu>
661
662         * ext2_fs.h (EXT2_FEATURE_RO_COMPAT_BTREE_DIR): Comment out unused
663                 feature flag
664
665 2003-03-30  Theodore Ts'o  <tytso@mit.edu>
666
667         * Makefile.in: Use the compile_et --build-tree option.
668
669 2003-03-14  Theodore Ts'o  <tytso@mit.edu>
670
671         * getsize.c: Add support for Apple Darwin's ioctl to get the hard
672                 disk size.
673
674         * badblocks.c (ext2fs_u32_list_count), ext2fs.h: Add new function
675                 which returns the number of entries in the list.
676
677 2003-03-10  Theodore Ts'o  <tytso@mit.edu>
678
679         * fileio.c (ext2fs_file_lseek): Fix bug added when adding 64-bit
680                 support; avoid null dereference when ret_pos is NULL.
681
682 2003-03-06  Theodore Tso  <tytso@mit.edu>
683
684         * ext2_types.h.in: Don't redefine types if other e2fsprogs
685                 *_types.h files have been included already.
686
687         * kernel-jbd.h: Use C99 variadic cpp macros if not using GCC.
688                 (Older GCC's don't support the C99 variadic macros.)
689
690         * flushb.c (ext2fs_sync_device), 
691         ismounted.c (ext2fs_check_mount_point): Avoid GCC extension: 
692         #warning not supported by Solaris suncc
693
694         * ext2_ext_attr.h: Avoid GCC extension: 0 length arrays in
695                 structure definition.  Not needed for now in 
696                 ext2_ext_attr_entry.
697
698 2003-01-25  Theodore Ts'o  <tytso@mit.edu>
699
700         * dirhash.c: Fix gcc -Wall nits.
701
702 2003-01-22  Theodore Ts'o  <tytso@mit.edu>
703
704         * unix_io.c (unix_write_blk): Fix up GCC -Wall nits.
705
706 2003-01-21  Theodore Ts'o  <tytso@mit.edu>
707
708         * fileio.c (ext2fs_file_read, ext2_file_lseek,
709                 ext2_file_get_size): Add 64-bit support.
710
711         * ext2fs.h (EXT2_I_SIZE): Add macro which caluates a 64bit size
712                 from i_size and i_size_high.
713
714 2003-01-19  Theodore Ts'o  <tytso@mit.edu>
715
716         * initialize.c (ext2fs_initialize): If the user specifies a really
717                 large number of inodes, then reduce the number of blocks
718                 per group until we find a workable set of filesystem
719                 parameters.
720
721         * ext2_err.et.in (EXT2_ET_TOO_MANY_INODES): Add new error code.
722
723 2002-11-09  Theodore Ts'o  <tytso@mit.edu>
724
725         * Release of E2fsprogs 1.32
726
727 2002-11-09  Theodore Ts'o  <tytso@mit.edu>
728
729         * unix_io.c (find_cached_block, reuse_cache, unix_read_blk, 
730                 unix_write_blk): Optimize routines so that we don't end up
731                 searching the cache twice when a block isn't in the
732                 cache.  If reads are larger than READ_DIRECT_SIZE, don't
733                 let them go through the cache.
734
735         * unix_io.c (find_cached_block): Fixed bug which caused some clean
736                 blocks to be erroneously marked as dirty, so they would
737                 get written back to the disk before they are evicted from
738                 the cache.  Harmless, but it slows down e2fsck
739                 significantly.
740
741 2002-11-08  Theodore Ts'o  <tytso@mit.edu>
742
743         * Release of E2fsprogs 1.31
744
745 2002-11-08    <tytso@snap.thunk.org>
746
747         * Makefile.in (check): Skip trying to compile test_byteswap
748                 if --disable-byteswaap had been given to configure.
749
750 2002-11-07    <tytso@snap.thunk.org>
751
752         * closefs.c (write_bgdesc, ext2fs_flush): Fix bug in meta_bg
753                 support when the MASTER_SB_ONLY flag is set.  Some of
754                 the descriptor blocks that should have been written out
755                 were getting skipped.
756
757 2002-10-31  Theodore Ts'o  <tytso@mit.edu>
758
759         * Release of E2fsprogs 1.30
760
761 2002-10-31  Theodore Ts'o  <tytso@mit.edu>
762
763         * ext2_fs.h: Add support for a new inode flag, which is to be used
764                 for indicating the top of directory hierarchies for the
765                 Orlov block allocator.
766         
767         * ismounted.c (check_mntent, check_mntent_file): Add better
768                 support for loopback-mounted filesystems.  Check /etc/mtab
769                 if /proc/mounts doesn't turn up any mount flags, since
770                 /etc/mtab has the loopback image filename, instead of
771                 /dev/loop0.  Also, check based on st_dev and st_ino, so
772                 that if a relative pathname or a pathnames using symbolic
773                 links are used, we can detect the the filesystem correctly
774                 in those cases.  (Addresses Sourceforge bug #619119)
775
776         * flushb.c (ext2fs_sync_device): If the BLKFLSBUF ioctl succeeds,
777                 don't try the FDFLUSH ioctl that was required for floppies
778                 with older kernels.  This avoids needless whining from the
779                 MD device driver.  (Addresses Sourceforge bug #545832).
780
781         * openfs.c (ext2fs_open): Fix bug which caused us to pass the
782                 wrong group_block to ext2fs_descriptor_block_loc if we're
783                 using the backup superblock/block group descriptors.
784                 (ext2fs_descriptor_block_loc): If we're using the backup
785                 superblock descriptors, use the backup descriptor block in
786                 the next block group.
787
788 2002-10-30  Theodore Ts'o  <tytso@mit.edu>
789
790         * alloc_tables.c (ext2fs_allocate_group_table): Allocate the inode
791                 table so that it buts up against the bitmap blocks, to
792                 avoid block fragmentation.
793
794         * closefs.c (write_bgdesc), initalize.c (ext2fs_initialize): Fix
795                 bug; only allocate group descriptor blocks up to
796                 s_first_meta_bg.
797
798 2002-10-25  Theodore Ts'o  <tytso@mit.edu>
799
800         * ext2_fs.h: Add a new superblock field, s_mkfs_time, so that we
801                 know when a filesystem was created.  (Sometimes this can
802                 be useful...)
803
804         * initialize.c (ext2fs_initialize): Set the s_mkfs_time field.
805
806 2002-10-20  Theodore Ts'o  <tytso@valinux.com>
807
808         * ext2_fs.h (EXT3_DEFM_JMODE): Add new default mount options for
809                 the journal data mode.
810
811         * closefs.c (ext2fs_flush, write_bgdesc), ext2_fs.h, ext2fs.h,
812         openfs.c (ext2fs_descriptor_block_loc, ext2fs_open), initialize.c
813         (ext2fs_initialize), swapfs.c (ext2fs_swap_super): Add support for
814         the meta_blockgroup filesystem format.
815
816 2002-10-15    <tytso@snap.thunk.org>
817
818         * ext2_fs.h: Add new field in superblock for default mount options.
819
820 2002-10-13  Theodore Ts'o  <tytso@mit.edu>
821
822         * ext2fs.h: Add #include of header files necessary for ext2fs.h to
823                 compile cleanly.
824
825 2002-10-02  Theodore Y. Ts'o  <tytso@mit.edu>
826
827         * rw_bitmaps.c (ext2fs_write_block_bitmap,
828                 ext2fs_read_block_bitmap): Don't set the CHANGED bit just
829                 because the bitmap is getting written to disk.  Make
830                 ext2fs_swap_bitmap be a static function, since it's not
831                 intended to be exported.
832
833         * swapfs.c (ext2fs_swap_super): Byte-swap the hash seed
834
835 2001-09-24  Theodore Tso  <tytso@mit.edu>
836
837         * Release of E2fsprogs 1.29
838
839 2001-08-31  Theodore Tso  <tytso@thunk.org>
840
841         * Release of E2fsprogs 1.28
842
843 2002-08-31  Theodore Ts'o  <tytso@valinux.com>
844
845         * dblist.c (ext2fs_dblist_sort): New function which allows the
846                 caller to pass in a special sort comparison function.
847
848 2002-08-20  Theodore Ts'o  <tytso@mit.edu>
849
850         * valid_blk.c (ext2fs_inode_has_valid_blocks): Fix bug which
851                 failed to accurately characterize non-standard slow
852                 symlinks.  (Which don't appear in practice on real-life
853                 systems, fortunately.)
854
855 2002-08-17  Theodore Ts'o  <tytso@mit.edu>
856
857         * Makefile.in: Remove inode_io.o from the standard object files,
858                 and only build it if debugfs is enabled (it requires
859                 fileio.o, which is only built if --disable-debugfs isn't
860                 specified to configure).
861
862         * dirhash.c (ext2fs_dirhash): Change the MD4 hash in a backwards
863                 incompatible way so that it is no longer
864                 endian-dependent.  Add the TEA hash.  Allow the seed
865                 parameter to be optional.
866
867         * ext2_fs.h: Remove the HALF_MD4_SEED and HALF_MD4_64 hashes.
868                 These features are all now in the HALF_MD4 hash.  Add
869                 definition for EXT2_HASH_TEA.
870
871         * ext2fs.h (ext2fs_dirhash): Change function prototype so it takes
872                 a pointer instead of an array.
873
874 2002-08-16  Theodore Ts'o  <tytso@mit.edu>
875
876         * ext2_err.et.in (EXT2_ET_BAD_EA_BLOCK_NUM): New error code
877
878         * ext2fs.h (ext2fs_inode_data_blocks): New function which returns
879                 the number of data blocks used by an inode exclusive of
880                 the EA block.
881
882         * ext_attr.c (ext2fs_adjust_ea_refcount): New function which
883                 adjusts the reference count in an extended attribute block.
884
885         * valid_blk.c (ext2fs_inode_has_valid_blocks): Add code to
886                 correctly deal with extended attribute blocks in symbolic
887                 links. 
888
889 2002-08-13    <tytso@snap.thunk.org>
890
891         * Makefile.in: Move dupfs.o and test_io.o from the
892                 needed-by-debugfs object list to the needed-by-resizer
893                 object list.  Fixes compile problem if the system is built
894                 with only --disable-debugfs.
895
896 2002-07-29  Theodore Ts'o  <tytso@mit.edu>
897
898         * link.c (ext2fs_link): When adding a new link to a directory,
899                 clear the HTREE bit.
900
901 2002-07-23  Theodore Ts'o  <tytso@mit.edu>
902
903         * dirhash.c (ext2fs_dirhash): Fix bug which caused MD4
904                 calculations for names > 32 characters to be completely
905                 bogus.  Changed MD4 calculation to match what is currently
906                 being used in the CVS gkernel tree.
907
908 2002-07-19  Theodore Ts'o  <tytso@mit.edu>
909
910         * ext2_fs.h: Add s_hash_seed and s_def_hash_version to the
911                 superblock definition.
912
913         * badblocks.c, freefs.c, ext2fs.h: Use the badblocks functions to
914                 create a set of u32_list functions.
915
916         * dirhash.c (halfMD4Transform): Shift the hash by one bit,
917                 since that's required by the directory indexing code.
918
919 2002-07-14  Theodore Ts'o  <tytso@mit.edu>
920
921         * ext2fs.h, read_bb_file.c: Change private to priv_data, to avoid
922                 using a C++ reserved word.
923
924         * unix_io.c (unix_open): Only attempt the setrlimit workaround if
925                 the kernel version is 2.4.10 -- 2.4.17, since otherwise an
926                 old version of glibc (built against 2.2 headers) will
927                 interact badly with the workaround to actually cause more
928                 problems.  I hate it when the glibc folks think they're
929                 being smarter than the kernel....
930
931 2002-06-28  Andreas Dilger <adilger@clusterfs.com>
932
933         * ext2_fs.h: Add superblock field for reserved group descriptors.
934
935 2002-06-28  Theodore Ts'o  <tytso@mit.edu>
936
937         * bitops.h: Add #define's for ext2fs_{l,b}e{32,16}_to_cpu and
938                 ext2fs_cpu_to_{l,b}e{32,16}
939
940 2002-06-27  Theodore Ts'o  <tytso@mit.edu>
941
942         * ismounted.c (check_mntent): In AIX 4.3, MOUNTED isn't defined.
943                 Add appropriate fallbacks in this case.
944
945 2002-06-26  Theodore Ts'o  <tytso@mit.edu>
946
947         * dirhash.c (ext2fs_dirhash): Change function signature to support
948                 a hash seed, and to return the minor hash (for 64-bit hash
949                 support).   Add support for the half MD4, half MD4 with
950                 seed, and half MD4 with seed and 64 bits.
951
952 2002-06-15  Theodore Ts'o  <tytso@mit.edu>
953
954         * ext2_fs.h (EXT2_DIRSYNC_FL): Add new file.
955
956 2002-06-09  Andreas Dilger <adilger@clusterfs.com>
957
958         * ext2_fs.h: Add macros for maximum block/inode counts:
959                 EXT2_INODES_PER_BLOCK, EXT2_MAX_BLOCKS_PER_GROUP,
960                 and EXT2_MAX_INODES_PER_GROUP.
961
962         * openfs.c (ext2fs_open): Check that the number of blocks in a group
963                 is less than 2^16, otherwise we need an INCOMPAT flag (not
964                 in existence yet, if ever) to open such a filesystem.
965
966         * initialize.c (ext2fs_initialize): Limit the number of blocks and
967                 inodes in a group to less than 2^16.
968
969 2002-06-09  Andreas Dilger <adilger@clusterfs.com>
970
971         * ext2_fs.h: Further minor cleanups of the header.  Consolidate
972                 some checks for __KERNEL__ into one place.
973
974 2002-05-22  Andreas Dilger <adilger@clusterfs.com>
975
976         * ext2_fs.h: Remove macros accessing u.ext2_sb field and use
977                 the EXT2_SB() macro instead.  Remove kernel function
978                 prototypes also.  This matches the 2.5 kernel, and
979                 is also cleaner for other reasons.  Whitespace cleanup.
980
981 2002-05-21  Theodore Ts'o  <tytso@mit.edu>
982
983         * ext2_ext_attr.h: Update to V2 version of the Bestbits format.
984
985 2002-05-16  Andreas Dilger <adilger@clusterfs.com>
986
987         * ext2_fs.h: Change limits to support filesystems with 8k blocks.
988
989         * initialize.c (ext2fs_initialize): Remove assumption that
990                 blocksizes are always <= 4k.
991
992 2002-05-11  Theodore Ts'o  <tytso@mit.edu>
993
994         * bmap.c (ext2fs_bmap): Fix bug which caused ext2fs_bmap to fail
995                 silently if inode pointer is NULL (and ext2fs_bmap is
996                 expected to read the inode itself).
997
998 2002-04-27  Theodore Ts'o  <tytso@mit.edu>
999
1000         * ismounted.c (check_mntent_file, is_swap_device): Verify that the
1001                 file we are checking is a block device file before looking
1002                 at st_rdev, since it's not valid for normal files.
1003                 (is_swap_device): Move so that it is outside the
1004                 HAVE_MNTENT_H, so that it is always built.
1005
1006 2002-03-11  Theodore Tso  <tytso@mit.edu>
1007
1008         * dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
1009                 functions which take an extra flags argument.  The flag
1010                 EXT2_DIRBLOCK_V2_STRUCT will reverse when the name_len
1011                 field is byte swampped on big-endian machines, since in
1012                 the V2 structure, name_len is a char field which is
1013                 doesn't need to be byte swapped --- except if an
1014                 old-style kernel had byte-swapped the name_len field
1015                 as part of the V1 structure.
1016
1017         * ext2_err.et.in (EXT2_ET_DIRHASH_UNSUPP): New error code
1018
1019         * dirhash.c (ext2fs_dirhash): New function which calculates the
1020                 hash for a filename in an indexed directory.
1021
1022 2002-03-08  Theodore Tso  <tytso@mit.edu>
1023
1024         * Release of E2fsprogs 1.27
1025
1026 2002-03-07  Theodore Tso  <tytso@mit.edu>
1027
1028         * ext2fs.h (ext2fs_inode_io_intern): Add missing function prototype.
1029
1030         * bmap.c, fileio.c, inode_io.c, tst_badblocks.c, 
1031                 tst_byteswap.c: Fix gcc -Wall complaints
1032
1033         * Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
1034                 (From Philipp Thomas <pthomas@suse.de>)
1035
1036 2002-02-25  Theodore Tso  <tytso@mit.edu>
1037
1038         * ext2_fs.h: Add structure definitions for the directory indexing
1039                 extension.
1040
1041 2002-02-23  Theodore Tso  <tytso@mit.edu>
1042
1043         * unix_io.c (unix_open): Fix 2.4 resource limit workaround so that
1044                 it doesn't break things on mis32, sparc32, and alpha
1045                 platforms.
1046
1047 2002-02-21  Theodore Tso  <tytso@mit.edu>
1048
1049         * ismounted.c (is_swap_device): Fix file descriptor/memory leak;
1050                 we were missing an fclose().
1051
1052 2002-02-20  Theodore Tso  <tytso@mit.edu>
1053
1054         * Makefile.in, inode_io.c, ext2fs.h, ext2_err.et.in: Add new io
1055                 abstraction interface which exports an ext2 inode.
1056
1057         * ext2fs.h, fileio.c (ext2fs_file_flush): Export ext2fs_file_flush
1058                 as a public interface.  Change void * to const void * in
1059                 ext2fs_file_write's interface.
1060
1061         * test_io.c (test_close), unix_io.c (unix_close): Remove unneeded
1062                 conditional; save a few bytes.
1063         
1064 2002-02-12  Theodore Tso  <tytso@mit.edu>
1065
1066         * Makefile.in (tst_badblocks): Add some extra .o files when
1067                 linking the debugging program tst_badblocks which are
1068                 needed if we aren't compiling with inline functions enable.
1069
1070         * kernel-list.h (__inline__): On non-gcc and non-Watcom compilers,
1071                 define away __inline__ since it may not be supported.
1072
1073         * kernel-jbd.h (jbd_debug): For systems that don't do STDC, use a
1074                 stripped down jbd_debug that doesn't use variadic
1075                 arguments.  This will cause warnings under AIX, but things
1076                 should still build.
1077
1078 2002-02-03  Theodore Tso  <tytso@thunk.org>
1079
1080         * Release of E2fsprogs 1.26
1081
1082 2002-02-03  Theodore Tso  <tytso@mit.edu>
1083
1084         * mkdir.c (ext2fs_mkdir): Change to use ext2fs_inode_alloc_stats2
1085                 so that the number of directories in use is adjusted
1086                 appropriately.
1087
1088         * alloc_stats.c (ext2fs_inode_alloc_stats2): Add new function
1089                 which optionally will modify the number of directories
1090                 count.
1091
1092 2002-01-03  Theodore Tso  <tytso@mit.edu>
1093
1094         * dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
1095                 Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
1096                 which will return deleted directory entries.
1097                 ext2fs_dir_iterate2 takes a new callback function which
1098                 is identical with the one used by
1099                 ext2fs_dblist_dir_iterate().  If the directory entry is
1100                 deleted, the callback function will be called with the
1101                 entry paraemter set to DIRENT_DELETED_FILE.
1102
1103         * Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
1104                 ext2fs_block_alloc_stats): New functions which update
1105                 block/inode allocation statistics in the bitmaps, block
1106                 group descriptors, and superblock.
1107
1108         * mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
1109                 expanddir.c (expand_dir_proc), bb_inode.c
1110                 (clear_bad_block_proc, set_bad_block_proc,
1111                 ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
1112                 Update to use new block/inode allocation statistics.
1113
1114 2001-12-24  Theodore Tso  <tytso@mit.edu>
1115
1116         * ismounted.c (is_swap_device): New function used by
1117                 ext2fs_check_if_mounted and ext2fs_check_mount_point which
1118                 determines whether or not the specified device is a swap
1119                 device by using /proc/swaps.  More bulletproofing for
1120                 idiotic/careless system administrators!
1121
1122         * ext2fs.h, openfs.c (ext2fs_open), initialize.c
1123                 (ext2fs_initialize), mkdir.c (ext2fs_mkdir): Add a new
1124                 field to struct_ext2_filsys, umask.  This field is
1125                 initialize to 022, and affects ext2fs_mkdir in the obvious
1126                 way.  (In the future umask should also affect new file
1127                 creation routines, but the fileio functions don't
1128                 currently support this yes.)
1129
1130         * ismounted.c (check_mntent_file): Stat all of the entries in
1131                 /etc/mtab and/or /proc/mounts in order to catch dim-witted
1132                 system administrators who might have created alias
1133                 devices.
1134  
1135 2001-12-23  Theodore Tso  <tytso@mit.edu>
1136
1137         * Makefile.in, jfs_user.h: Move linux/jbd.h to
1138                 ext2fs/kernel-jbd.h, to avoid using the system header
1139                 file version of hbd.h when using diet glibc (since it
1140                 forcibly adds /usr/include to the beginning of the
1141                 include search path.)
1142
1143         * kernel-jbd.h, kernel-list.h, jfs_compat.h: Move files from
1144                 include/linux directory.
1145
1146 2001-12-16  Theodore Tso  <tytso@mit.edu>
1147
1148         * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap),
1149                 ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr),
1150                 fileio.c (ext2fs_file_write): Fix gcc -Wall nits
1151
1152         * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
1153                 linux/jbd.h
1154
1155 2001-12-03  Theodore Tso  <tytso@mit.edu>
1156
1157         * unix_io.c (unix_open): Make sure the ulimit workaround works
1158                 regardless of the version of glibc which is used to
1159                 compild e2fsprogs.
1160
1161 2001-11-26  Theodore Tso  <tytso@mit.edu>
1162
1163         * unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
1164                 trying to unset the filesize limit if at all possible,
1165                 if a block device is getting opened.  (The filesize limit
1166                 shouldn't be applied against writes to a block device, but
1167                 starting in 2.4.10, the kernel is doing this.)
1168         
1169 2001-11-05  Theodore Tso  <tytso@mit.edu>
1170
1171         * mkjournal.c (ext2fs_add_journal_inode): When creating a .journal
1172                 file on adding a journal to an already-mounted filesystem,
1173                 try to clear the ext2 file attributes on an already
1174                 existing .journal file so that we don't fail if on a
1175                 partially added journal to the filesystem.
1176
1177         * ext2_fs.h: Define a new ext2 file attribute, EXT2_NOTAIL_FL,
1178                 which signals that a particular inode should not have the
1179                 last bits of data (the "tail") be merged with another
1180                 file.  This is necessary to keep LILO happy.
1181
1182 2001-09-20  Theodore Tso  <tytso@thunk.org>
1183
1184         * Release of E2fsprogs 1.25
1185
1186 2001-09-16  Theodore Tso  <tytso@mit.edu>
1187
1188         * ext2_ext_attr.h: Remove unneeded #include of <linux/config.h>
1189                 which was breaking the build on the Hurd.  (Addresses
1190                 Debian bug #112414).
1191
1192 2001-09-13  Theodore Ts'o  <tytso@mit.edu>
1193
1194         * ismounted.c (check_mntent_file): We now validate the entry in
1195                 /etc/mtab to make sure the filesystem is really mounted,
1196                 since some broken distributions (read: Slackware) have
1197                 buggy boot scripts that don't initialize /etc/mtab before
1198                 checking non-root filesystems.  (Slackware also doesn't
1199                 check the root filesystem separately, and reboot if the
1200                 root filesystem had changes applied to it, which is
1201                 dangerous and broken.)   
1202
1203 2001-09-02  Theodore Tso  <tytso@thunk.org>
1204
1205         * Release of E2fsprogs 1.24a
1206
1207 2001-08-30  Theodore Tso  <tytso@thunk.org>
1208
1209         * Release of E2fsprogs 1.24
1210
1211 2001-08-30  Theodore Tso  <tytso@valinux.com>
1212
1213         * getsize.c (ext2fs_get_device_size): Back out BLKGETSIZE64
1214                 changes, since the ioctl number has been reused by another
1215                 unofficial patch.
1216
1217 2001-08-15  Theodore Tso  <tytso@valinux.com>
1218
1219         * Release of E2fsprogs 1.23
1220
1221 2001-08-05  Theodore Tso  <tytso@valinux.com>
1222
1223         * alloc.c (ext2fs_new_inode, ext2fs_new_block): Use the fast
1224                 version of the bitmap test routines to speed up these
1225                 routines.  (At some point I may want to make these
1226                 routines use the find_first_bit functions, but that will
1227                 add a lot of complexity since it means that these
1228                 functions will have to break the bitmap abstraction
1229                 boundary.  It's not clear it's worth it.)
1230
1231         * mkjournal.c (mkjournal_proc): Remember the last block allocated
1232                 to speed up ext2fs_new_block().
1233
1234 2001-07-29  Theodore Tso  <tytso@valinux.com>
1235
1236         * finddev.c (scan_dir): Fix memory leak; we weren't calling
1237                 closedir() when exiting the function in all cases.
1238
1239 2001-07-27  Theodore Tso  <tytso@valinux.com>
1240
1241         * mkjournal.c (ext2fs_create_journal_superblock): Set the first
1242                 block usable in the journal for external journals to be 2
1243                 or 3, depending on the blocksize, so that the existing
1244                 kernel code does the right thing.
1245
1246         * getsize.c (ext2fs_get_device_size): Add support for the
1247                 BLKGETSIZE64 ioctl.  (Ioctl defined by unofficial patches
1248                 from Ben LaHaise, but it's likely this interface won't
1249                 change.)
1250
1251         * mkjournal.c (ext2fs_add_journal_device): Use the correct block
1252                 when writing the journal superblock, too.  (Oops! Needed
1253                 to make 1k filesystems with external journal to work.)
1254
1255 2001-07-26  Theodore Tso  <tytso@valinux.com>
1256
1257         * mkjournal.c (ext2fs_add_journal_device): Use the correct block
1258                 to find the journal superblock if the blocksize is 1024.
1259
1260 2001-07-21  Theodore Tso  <tytso@valinux.com>
1261
1262         * ext2_err.et.in (EXT2_ET_LOAD_EXT_JOURNAL): Add new error code
1263
1264 2001-07-20  Theodore Tso  <tytso@valinux.com>
1265
1266         * ext_attr.c (ext2fs_write_ext_attr): When writing the extended
1267                 attribute block, set the filesystem changed bit.
1268
1269         * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
1270                 Comment out these functions since we're not using them.
1271
1272 2001-07-10  Theodore Tso  <tytso@valinux.com>
1273
1274         * closefs.c (write_primary_superblock): After writing changes to
1275                 the primary superblock, update the original superblock
1276                 copy so we don't have to re-write those changes in the
1277                 future.
1278                 (ext2fs_flush): Clear the superblock dirty flag after
1279                 we've flushed out changes to disk.
1280
1281 2001-07-07  Theodore Tso  <tytso@valinux.com>
1282
1283         * bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx
1284                 to avoid register conflicts when compiling in PIC mode.
1285
1286 2001-07-04  Theodore Tso  <tytso@valinux.com>
1287
1288         * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
1289                 Add new functions (C and in i386 assembler) which quickly
1290                 find bits set in a bitmask.
1291
1292 2001-06-23  Theodore Tso  <tytso@valinux.com>
1293
1294         * Makefile.in, ext_attr.c, ext2_attr.c, ext2fs.h: Add new files
1295                 ext2_ext_attr.h and ext_attr.c for extended attributes
1296                 support.
1297
1298         * Release of E2fsprogs 1.22
1299
1300 2001-06-22  Theodore Tso  <tytso@valinux.com>
1301
1302         * mkjournal.c (ext2fs_add_journal_inode): Move close of file
1303                 descriptor so that adding a journal to a mounted
1304                 filesystem doesn't die.  (Fixes a bug accidentally
1305                 introduced in e2fsprogs 1.21.)
1306
1307         * mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
1308                 HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
1309                 fchflags without defining UF_NODUMP.  (Addresses Debian
1310                 bug #101361)
1311
1312         * flushb.c: Use platform independent method of defining the
1313                 BLKFLSBUF and FDFLUSH ioctl's.  Also include sys/mount.h
1314                 since on newer glibc's BLKFLSBUF is defined there.
1315
1316         * bitops.h: The C language versions of ext2fs_swab16/32 need to be
1317                 included if EXT2FS_ENABLE_SWAPFS is defined, since we need
1318                 to support byte swapping even if we don't support the
1319                 conversion functions.  (Fixes Debian bug #101686).
1320
1321         * dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2
1322                 since the byte-swapping code all assumes the
1323                 ext2_dir_entry structure.  (It's a question of whether or
1324                 not name_len should be byte-swapped or not, and whether
1325                 it's a 16 bit or 8 bit field.)
1326
1327 2001-06-15  Theodore Tso  <tytso@valinux.com>
1328
1329         * Release of E2fsprogs 1.21
1330
1331 2001-06-15  Theodore Tso  <tytso@valinux.com>
1332
1333         * Makefile.in: Fix bug in installation of ext2_types.h.  It is a
1334                 file which is generated and is therefore found in the
1335                 build directory, not source directory.
1336
1337         * ismounted.c (check_mntent_file): Use a test file in / to check
1338                 to see if the root filesystem is mounted read-only.  This
1339                 protects against the case where /etc might not be on /, as
1340                 well as the case where /etc/mtab doesn't exist.  (Both are
1341                 should-never happen scenarios, but you never know...)
1342
1343 2001-06-14  Theodore Tso  <tytso@valinux.com>
1344
1345         * ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.
1346                 Remove unneeded #pragma argsused, since the arguments are
1347                 always used.
1348
1349 2001-06-13  Theodore Tso  <tytso@valinux.com>
1350
1351         * ext2_types.h.in: If linux/types.h has been defined, then don't
1352                 try to redefine the typedefs.
1353
1354         * Makefile.in (HFILES): Add ext2_types.h to the list of files
1355                 which should be installed.
1356
1357         * ismounted.c (check_mntent_file): Work around GNU hurd brain
1358                 damage.  Addresses Debian bug #100304.
1359
1360         * Makefile.in: Limit some .o files from being included into the
1361                 library if --disable-debugfs, --disable-swapfs,
1362                 --disable-imager, or --disable-resizer are used.
1363
1364 2001-06-12  Theodore Tso  <tytso@valinux.com>
1365
1366         * inode.c, tst_iscan.c: Stop using the compatibility badblocks
1367                 function, and use the ext2fs_badblocks_* functions
1368                 instead.
1369
1370 2001-06-11  Theodore Tso  <tytso@valinux.com>
1371
1372         * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
1373                 ext2fs_mark_generic_bitmap and
1374                 ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal
1375                 functions.  (This saves space and doesn't significantly
1376                 change the speed of e2fsck on a P-III.)
1377
1378         * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c,
1379                 inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only
1380                 include the byte-swapping logic if ENABLE_SWAPFS is turned
1381                 on or if we're on a big-endian machine.
1382         
1383         * initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to
1384                 set EXT2_FLAG_SWAP_BYTES, instead of using
1385                 ext2fs_native_flag.
1386         
1387         * native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
1388                 autoconf to determine whether or not return
1389                 EXT2_FLAG_SWAP_BYTES.
1390
1391 2001-06-10  Theodore Tso  <tytso@valinux.com>
1392
1393         * Makefile.in: Remove the dependence on the libe2p library.
1394
1395         * mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags
1396                 with direct usage of the ioctl/fchflags so that we don't
1397                 have to depend on the libe2p library.
1398
1399 2001-06-08  Theodore Tso  <tytso@valinux.com>
1400
1401         * ext2_types.h.in: Use unsigned ints in favor of unsigned longs
1402                 when trying to find a 32-bit wide type.
1403
1404         * icount.c (insert_icount_el): Fix the code used to estimate the
1405                 size of the new icount array to be more intelligent, to
1406                 avoid reallocating the array too many times.  Thanks to
1407                 Enrique Perez-Terron for pointing this out.
1408
1409 2001-06-02  Theodore Tso  <tytso@valinux.com>
1410
1411         * valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks
1412                 for a symlink to determine whether it is a fast symlink.
1413
1414 2001-06-01  Theodore Tso  <tytso@valinux.com>
1415
1416         * Makefile.in, dosio.c, ext2_fs.h, ext2_types.h.in, ext2fs.h:
1417                 Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in.
1418
1419 2001-05-25  Theodore Tso  <tytso@valinux.com>
1420
1421         * Release of E2fsprogs 1.20
1422
1423 2001-05-25  Theodore Tso  <tytso@valinux.com>
1424
1425         * ismounted.c: More cleanups for ismounted.c, some from Andreas,
1426                 some to clean up Andreas's patches.  Use strncpy instead
1427                 of strcpy to save the root's mountpoint.  Clean up #ifdef
1428                 structure.  Remove uneeded variable in testing/debug driver.
1429
1430 2001-05-24  Andreas Dilger  <adilger@turbolinux.com>
1431
1432         * ismounted.c: Add check for root device which doesn't depend on
1433                 /etc/fstab or /proc/mounts to be correct.  Don't call
1434                 endmntent() before we are done with mnt struct.
1435
1436 2001-05-23  Theodore Tso  <tytso@valinux.com>
1437
1438         * ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error
1439                 code.
1440
1441 2001-05-21  Theodore Tso  <tytso@valinux.com>
1442
1443         * ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to
1444                 make room for pre-existing usage of
1445                 EXT2_FEATURE_COMPAT_EXT_ATTR.  Add flag EXT2_INDEX_FL with
1446                 the same codepoint as EXT2_BTREE_FL.
1447
1448 2001-05-20  Theodore Tso  <tytso@valinux.com>
1449
1450         * ext2fs.h: #include <> instead of "" for ext2fs and et header
1451                 files, since they will be installed in /usr/include
1452
1453 2001-05-14  Theodore Tso  <tytso@valinux.com>
1454
1455         * alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
1456                 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
1457                 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
1458                 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
1459                 expanddir.c, ext2_fs.h, fileio.c, finddev.c, flushb.c,
1460                 freefs.c, get_pathname.c, getsize.c, icount.c, imager.c,
1461                 initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
1462                 link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c,
1463                 newdir.c, nt_io.c, openfs.c, read_bb.c, read_bb_file.c,
1464                 rs_bitmap.c, rw_bitmaps.c, swapfs.c, test_io.c,
1465                 tst_badblocks.c, tst_byteswap.c, tst_getsize.c,
1466                 tst_iscan.c, unix_io.c, unlink.c, valid_blk.c, version.c,
1467                 write_bb_file.c, ext2_fs.h: Moved file from include/linux.
1468                 Adjust all files in this directroy to include this file.
1469
1470         * mkjournal.c (ext2fs_create_journal_superblock): Remove redundant
1471                 code.
1472
1473 2001-05-05  Theodore Tso  <tytso@valinux.com>
1474
1475         * fileio.c (ext2fs_file_read): Factored out common code and
1476                 cleaned up function.  Fixed a bug where if there was an
1477                 error reading from the disk, the number of bytes read
1478                 wasn't reliably set.  (Fixes Debian bug #79163)
1479                 (ext2fs_file_write): Factored out common code and made
1480                 function more efficient; if writing a full block, don't
1481                 bother to do a read-modify-write cycle.
1482
1483 2001-05-04  Theodore Tso  <tytso@valinux.com>
1484
1485         * dirblock.c (ext2fs_read_dir_block): Check for an directory
1486                 record length which isn't a multiple four, and treat that
1487                 as an invalid.  Scan the directory and return an error
1488                 (EXT2_ET_DIR_CORRUPTED) if the directory records are
1489                 corrupted.
1490                 (ext2fs_write_dir_block): If while byte-swapping the
1491                 directory block, if there's an error, abort and return
1492                 EXT2_ET_DIR_CORRUPTED.
1493
1494 2001-05-02  Theodore Tso  <tytso@valinux.com>
1495
1496         * ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add
1497                 image_header field in the ext2_filsys structure
1498
1499         * block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind): 
1500         * inode.c (ext2fs_read_inode): 
1501         * rw_bitmaps.c (read_bitmaps): 
1502         * openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
1503
1504         * imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make
1505                 sure the full bitmap is saved.
1506
1507 2001-05-01  Theodore Tso  <tytso@valinux.com>
1508
1509         * e2image.h (struct ext2_image_hdr): Add space for the device name
1510                 in the image header.
1511
1512         * dir_iterate.c (ext2fs_process_dir_block): Add a double-check to
1513                 make sure the rec_len is a multiple of 4, to prevent
1514                 bus-errors on architectures which care about mis-aligned
1515                 pointer references.
1516
1517 2001-04-25  Theodore Tso  <tytso@valinux.com>
1518
1519         * getsize.c (ext2fs_get_device_size): Use an unsigned long to
1520                 query the device sizes using the BLKGETSIZE ioctl.
1521
1522 2001-04-16  Theodore Tso  <tytso@valinux.com>
1523
1524         * ismounted.c (check_mntent): Check /proc/mounts on Linux systems
1525                 before checking /etc/mtab.  The EXT2_MF_READONLY flag is
1526                 now set from the /etc/mtab options field for all
1527                 filesystems, not just the root filesystem.  Add debugging
1528                 code to make it easier to test ext2fs_check_if_mounted().
1529
1530         * mkjournal.c (ext2fs_create_journal_superblock): Add safety
1531                 check; return an error if there's an attempt to create a
1532                 journal less than 1024 filesystem blocks.
1533
1534         * ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
1535                 EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
1536
1537 2001-02-20  Theodore Tso  <tytso@valinux.com>
1538
1539         * bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly
1540                 inline functions.
1541
1542         * tst_byteswap.c: New function to test the byteswap functions.
1543                 Add to regression test suite.
1544
1545 2001-02-08  Theodore Tso  <tytso@valinux.com>
1546
1547         * e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
1548
1549 2001-02-07  Theodore Tso  <tytso@valinux.com>
1550
1551         * mkjournal.c (ext2fs_create_journal_superblock): Fix the setting
1552                 of s_first for external devices to always be 1, since
1553                 jsb->s_first is always relative to the start of the
1554                 journal superblock.  Use htonl(1) when setting s_nr_users.
1555
1556 2001-01-17  Theodore Ts'o  <tytso@valinux.com>
1557
1558         * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
1559                 device number of the filesystem (instead of the journal)
1560                 was being dropped into s_journal_dev.
1561
1562 2001-01-15  Theodore Ts'o  <tytso@valinux.com>
1563
1564         * initialize.c (ext2fs_initialize): Add support for initializing
1565                 the ext2 superblock for external journal devices.  This
1566                 basically means we don't bother to allocate any block
1567                 group descriptors.
1568
1569         * openfs.c (ext2fs_open): Only open external journal devices if
1570                 the new flag EXT2_FLAG_JOURNAL_DEV_OK is passed to
1571                 ext2fs_open.  When opening such devices, don't try to read
1572                 the block group descriptors, since they're not there.
1573
1574         * ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code 
1575         
1576         * mkjournal.c: Export a new function,
1577                 ext2fs_create_journal_superblock(), which allocates and
1578                 returns a buffer containing a journal superblock.  This is
1579                 needed by mke2fs to create an external journal.  Rewrote
1580                 ext2fs_add_journal_device() so that it no longer creates
1581                 the external journal, but rather adds a filesystem to an
1582                 existing external journal.  It handles all of the UUID
1583                 manipulation.
1584
1585         * ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported
1586                 by the library.  Define the EXT2_FLAG_JOURNAL_DEV_OK.
1587                 Changed function prototype for ext2fs_add_journal_device().
1588                 
1589 2001-01-14  Theodore Ts'o  <tytso@valinux.com>
1590
1591         * closefs.c (ext2fs_flush): Don't write out anything beyond the
1592                  primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is
1593                  listed.
1594
1595 2001-01-12  Theodore Ts'o  <tytso@valinux.com>
1596
1597         * imager.c: Fix gcc -Wall complaints and a series of bugs where
1598                 retval wasn't set correctly.  (Thanks to Andreas Dilger
1599                 for pointing this out.)
1600
1601 2001-01-11    <tytso@snap.thunk.org>
1602
1603         * flushb.c (ext2fs_sync_device): New function which centralizes
1604                 all of the places which might try to use the BLKFLSBUF
1605                 or FDFLUSH ioctls (and usually failing to define them
1606                 since the system header files don't usually do this for
1607                 us, and we're trying to avoid usage of kernel include
1608                 files now).
1609
1610 2001-01-10    <tytso@snap.thunk.org>
1611
1612         * alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c, 
1613                 bmove.c, brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c, 
1614                 dir_iterate.c, expanddir.c, ext2fs.h, ext2fsP.h, fileio.c,
1615                 finddev.c, get_pathname.c, icount.c, inode.c, irel.h, 
1616                 irel_ma.c, ismounted.c, link.c, lookup.c, mkdir.c, 
1617                 mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
1618                 tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to
1619                 ext2_ino_t, to protect applications that attempt to
1620                 compile -D_FILE_OFFSET_BITS=64, since this inexplicably
1621                 changes ino_t(!?).  So we use ext2_ino_t  to avoid an
1622                 unexpected ABI change.
1623
1624 2001-01-05    <tytso@snap.thunk.org>
1625
1626         * dirblock.c (ext2fs_read_dir_block): Fix a potential case where
1627                 we may overrun allocated memory in case of a corrupted
1628                 filesystem (or an e2fsck test case :-) when byte-swapping
1629                 the directory block.
1630
1631         * ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
1632
1633         * mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
1634                 complaints including a missing return 0 at the end of
1635                 ext2fs_add_journal_device.
1636
1637 2001-01-03    <tytso@snap.thunk.org>
1638
1639         * Makefile.in: Link in libe2p when creating libext2fs as a shared
1640                 library, since mkjournal.c now references fsetflags().
1641
1642         * mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas
1643                 Dilger's changes (with fixups) to allow on-line creation
1644                 of a journal file.
1645
1646         * ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
1647                 EXT2_FLAG_SUPER_ONLY, which the close routines to only
1648                 update the superblock, and not the group descriptors.
1649
1650 2000-12-30  Andreas Dilger  <adilger@turbolinux.com>
1651
1652         * ismounted.c: add ext2fs_check_mount_point() function, which will
1653                 optionally return the mount point of a device if mounted
1654
1655 2000-12-14  Andreas Dilger  <adilger@turbolinux.com>
1656
1657         * mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
1658                 ext2fs_add_journal_inode()
1659
1660 2001-01-01    <tytso@snap.thunk.org>
1661
1662         * ext2fs.h: Remove definition of ext2fs_sb.  Note: this may break
1663                 source (but not binary) compatibility of some users of the
1664                 ext2 library.  They should just simply do a global search
1665                 and replace of struct ext2fs_sb with struct
1666                 ext2_super_block, and use their own private copy of
1667                 ext2_fs.h if they aren't already.
1668
1669         * closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c:
1670                 Replace use of ext2fs_sb with ext2_super_block.
1671
1672 2000-12-31    <tytso@snap.thunk.org>
1673
1674         * ext2fs.h: Cleaned up header file by removing definitions of
1675                 feature flags that might not have been defined in older
1676                 ext2 header files.  Now that we're using our own
1677                 include/linux/ext2fs.h header file, this can never happen.
1678
1679         * jfs_dat.h: Removed old header file which is no longer needed.
1680
1681 2000-12-13  Theodore Ts'o  <tytso@valinux.com>
1682
1683         * closefs.c (ext2fs_update_dynamic_rev): New function suggested
1684                 by Andreas Dilger to update the filesystem revision to
1685                 EXT2_DYNAMIC_REV.
1686
1687         * swapfs.c (ext2fs_swap_super): Add byte swapping for the journal
1688                 fields.
1689
1690 2000-12-09    <tytso@snap.thunk.org>
1691
1692         * ext2fs.h, mkjournal.c (ext2fs_add_journal_inode,
1693                 ext2fs_add_journal_device): Add a new argument to the APIs
1694                 of these function, which is a flags word.  This is used to
1695                 allow the creation of a V1 superblock for those folks who
1696                 are using ext3 0.3b in production.  Note, the user-land
1697                 interface for getting at this flag won't be documented, as
1698                 the V1 superblock is deprecated.
1699
1700         * mkjournal.c (init_journal_superblock): Sync Stephen's changes
1701                 which creates a V2 superblock instead of a V1 superblock.
1702
1703 2000-11-21    <tytso@snap.thunk.org>
1704
1705         * test_io.c (test_write_blk, test_write_byte): Fix typos pointed
1706                 out by Andreas Dilger.
1707
1708 2000-11-05    <tytso@snap.thunk.org>
1709
1710         * imager.c (ext2fs_image_{inode,super,bitmap}_{read,write},
1711                 ext2_fs.h, Makefile.in: New file that has routines that
1712                 save ext2fs metadata to a file.
1713
1714         * ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
1715
1716         * e2image.h: New file which defines the file format for the ext2
1717                 image file.  (Saved copy of ext2 metadata to a file as a
1718                 saving throw against worst-case damage.)
1719
1720 2000-11-01    <tytso@snap.thunk.org>
1721
1722         * inode.c (ext2fs_flush_icache): Add new function
1723                 ext2fs_flush_icache() which flushes the internal inode
1724                 cache.  Applications which modify the inode table blocks
1725                 directly must call this function.
1726
1727 2000-10-26    <tytso@snap.thunk.org>
1728
1729         * mkjournal.c: Add #include of netinet/in.h, since Solaris
1730                 requires it for ntohl().
1731
1732         * ext2_io.h (io_channel_write_byte): Add new interface to allow
1733                 callers to write specific byte ranges.  This is an
1734                 optional interface, which not all IO channels may
1735                 implement.
1736
1737         * unix_io.c (unix_write_byte):
1738         * test_io.c (test_write_byte): Add implementation of the
1739                 write_byte function.
1740
1741         * closefs.c (write_primary_superblock, ext2fs_flush): Add a new
1742                 function which writes the primary superblock.  If the IO
1743                 channel supports writing raw bytes directly, only fields
1744                 which were modified are written to the disk.  This makes
1745                 it safe(r) to use utilities like tune2fs on a mounted
1746                 filesystem. 
1747
1748         * freefs.c (ext2fs_free): Free the original superblock if it is
1749                 available. 
1750
1751         * openfs.c (ext2fs_open): Store a copy of the original superblock
1752                 when opening it.
1753
1754         * ext2fs.h: Add a field to store the original superblock in the
1755                 ext2 context structure.
1756
1757 2000-10-24    <tytso@snap.thunk.org>
1758
1759         * llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we
1760                 don't need to use llseek).
1761
1762 2000-10-24    <tytso@valinux.com>
1763
1764         * Makefile.in, ext2fs.h, jfs_dat.h, mkjournal.c: Add functions for
1765                 creating an ext3 journal on a filesystem.
1766
1767 2000-08-21    <tytso@valinux.com>
1768
1769         * ext2_err.et.in (EXT2_JOURNAL_NOT_BLOCK): Add new error code.
1770
1771 2000-08-22    <tytso@valinux.com>
1772
1773         * unix_io.c: Make massive changes to support a multiple block
1774                 writethrough cacheing.
1775
1776         * ext2_io.h: Added flags field to the io_channel structure.
1777
1778 2000-08-19    <tytso@valinux.com>
1779
1780         * finddev.c, ext2fs.h, Makefile.in: Add new file, finddev.c, which
1781                 provides the function ext2fs_find_block_device().  This
1782                 function returns the pathname to a block device, given its
1783                 device number.
1784
1785 2000-07-13    <tytso@valinux.com>
1786
1787         * Release of E2fsprogs 1.19
1788
1789 2000-07-07  Theodore Ts'o  <tytso@valinux.com>
1790
1791         * ext2fs.h (EXT2_LIB_FEATURE_INCOMPAT_SUPP): Add
1792                 EXT3_FEATURE_INCOMPAT_RECOVER (aka needs_recovery) to the
1793                 list of filesystem flags supported by the library.
1794
1795 2000-07-04  Theodore Ts'o  <tytso@valinux.com>
1796
1797         * ext2fs.h: Update to include latest journalling additions to the
1798                 superblock.
1799
1800         * dll/jump.funcs: Add new jumptable entries for
1801                 ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
1802                 ext2fs_badblocks_equal.
1803
1804         * tst_badblocks.c: Update test program to test
1805                 ext2fs_read_bb_FILE2 and ext2fs_write_FILE.
1806
1807         * write_bb_file.c (ext2fs_write_bb_FILE): New function which
1808                 writes out bad blocks list to a file.
1809
1810         * read_bb_file.c (ext2fs_read_bb_FILE2): Add new function which
1811                 changes the callback function to take two additional
1812                 arguments; a private blind pointer supplied by the caller,
1813                 and pointer to a char * containing a pointer to the
1814                 invalid string.
1815
1816         * badblocks.c (ext2fs_badblocks_equal): Add new function which
1817                 returns true if two badblocks list are equal.
1818
1819         * Makefile.in: Remove explicit link of -lc in the shared library.
1820                 (It shouldn't be necessary, and is harmful in some cases).
1821
1822 2000-06-10  Theodore Ts'o  <tytso@valinux.com>
1823
1824         * getsize.c (main): Add debugging code under #ifdef DEBUG
1825
1826 2000-05-27  Theodore Ts'o  <tytso@valinux.com>
1827
1828         * mkdir.c (ext2fs_mkdir): Read the parent directory's inode
1829                 earlier, so that if there's an error reading it, we can
1830                 more cleanly back out of the operation.
1831
1832 2000-05-25    <tytso@snap.thunk.org>
1833
1834         * getsize.c (ext2fs_get_device_size): Use open64() instead of
1835                 open() if it exists.  Under linux, manually define the
1836                 ioctl for BLKGETSIZE if it isn't already defined and it's
1837                 safe to do so.
1838
1839         * unix_io.c (unix_open): Use open64() instead of open() if it
1840                 exists. 
1841
1842         * llseek.c: Simplify header includes of unistd.h.  If lseek64 is
1843                 available (and prototypes are defined) use it in
1844                 preference to llseek.
1845
1846         * Makefile: Add hack dependency rule so that parallel makes work
1847                 correctly. 
1848
1849 2000-05-18  Theodore Ts'o  <tytso@valinux.com>
1850
1851         * ext2fs.h: Add appropriate ifdef's to support C++ compilation.
1852
1853 2000-04-03  Theodore Ts'o  <tytso@valinux.com>
1854
1855         * block.c: Readibility tweak in conditionals involving
1856                 ctx->fs->flags.
1857
1858         * ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine
1859                 how to define __s64 and __u64.  Turn off "compression is
1860                 experimental" warning if the cpp macro
1861                 I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is defined.
1862
1863 2000-02-11    <tytso@snap.thunk.org>
1864
1865         * ext2fs.h: Define EXT2FS_COMPRESSED_BLKADDR and HOLE_BLKADDR.
1866                 Conditionally include Compression as a supported type if
1867                 ENABLE_COMPRESSION (via --enable-compression) is turned on.
1868
1869         * swapfs.c (ext2fs_swap_super): Swap the compression usage bitmap.
1870
1871 2000-02-08    <tytso@snap.thunk.org>
1872
1873         * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
1874                 ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
1875                 ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap):
1876                 Change to return the previous state of the bit that is
1877                 being marked or unmarked.  For speed optimization.
1878         
1879 2000-02-02  Theodore Ts'o  <tytso@valinux.com>
1880
1881         * getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
1882
1883         * swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not
1884                 needed any more; we know it will always be i_generation.
1885                 Add support for swapping the high bits of the uid and gid.
1886
1887 1999-11-19    <tytso@valinux.com>
1888
1889         * mkdir.c (ext2fs_mkdir): Only update the parent's inode link
1890                 counts if the link was successful.  Patch suggested by
1891                 jeremy@goop.org.
1892
1893         * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
1894                 the source directory.
1895
1896 1999-11-10    <tytso@valinux.com>
1897
1898         * Release of E2fsprogs 1.18
1899
1900 1999-11-08    <tytso@valinux.com>
1901
1902         * Makefile.in (tst_badblocks): Add freefs.o to the object list,
1903                 since ext2fs_badblocks_list_free was moved to freefs.c.
1904
1905         * tst_badblocks.c: Use the newer badblocks API names.  Add
1906                 duplicate blocks to the test inputs to test dealing with
1907                 adding blocks which are already in the badblocks list.
1908
1909         * badblocks.c (ext2fs_badblocks_list_add): If appending to the end
1910                 of the list, use a shortcut O(1) operations instead of an
1911                 O(n) operation.  (Idea suggested by David Beattie.)
1912
1913         * freefs.c (ext2fs_free): Use ext2fs_badblocks_list_free() instead
1914                 of badblocks_list_free(), to save a procedure call.
1915
1916 1999-10-26    <tytso@valinux.com>
1917
1918         * Release of E2fsprogs 1.17
1919
1920 1999-10-26    <tytso@valinux.com>
1921
1922         * ext2fs.h: Add kludge to deal with the fact that egcs cpp doesn't
1923                 seem to handle ~0UL the same way as they used to.
1924
1925 1999-10-25    <tytso@valinux.com>
1926
1927         * nt_io.c (_OpenNtName): Open the device using
1928                 FILE_SYNCHRONOUS_IO_NONALERT instead of
1929                 FILE_SYNCHRONOUS_IO_ALERT
1930                 (nt_open): At the end of the device open routine, unlock 
1931                 the drive but do not dismount it.
1932
1933         * initialize.c (CREATOR_OS): Use __GNU__ instead of __gnu__ to
1934                 detect the Hurd OS.
1935
1936 1999-10-22    <tytso@valinux.com>
1937
1938         * Release of E2fsprogs 1.16
1939
1940 1999-10-22    <tytso@valinux.com>
1941
1942         * mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link().
1943
1944         * link.c (ext2fs_link): This call now uses the low three bits of
1945                 the flags parameter to pass the directory filetype
1946                 information; it will set the directory entry FILETYPE
1947                 information if the filesystem supports it.
1948
1949         * newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock
1950                 option is set, then create the '.' and '..' entries with
1951                 the filetype set to EXT2_FT_DIR.
1952
1953 1999-09-24    <tytso@valinux.com>
1954
1955         * nt_io.c: New file which supports I/O under Windows NT.
1956
1957 1999-09-07    <tytso@valinux.com>
1958
1959         * ext2fs.h: Add new fields for journalling and define new
1960                 feature bits used by newer filesystems: IMAGIC_INODES,
1961                 HAS_JOURNAL, RECOVER.
1962
1963         * expanddir.c (ext2fs_expand_dir, expand_dir_proc): Change where
1964                 we update the inode block count and size files so that the
1965                 block count field is updated correctly when we create an
1966                 indirect block.
1967
1968 1999-07-18  Theodore Ts'o  <tytso@valinux.com>
1969
1970         * Release of E2fsprogs 1.15
1971
1972 1999-06-23    <tytso@valinux.com>
1973
1974         * swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3
1975                 kernels that use i_generation instead of i_version.  Patch
1976                 supplied by Jon Bright <sircus@sircus.demon.co.uk>.
1977
1978 1999-06-21    <tytso@valinux.com>
1979
1980         * dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
1981                 directory entry before calling the callback function.
1982                 This should prevent some core dumps of insufficiently
1983                 paranoid callback functions.
1984
1985 1999-05-29    <tytso@rsts-11.mit.edu>
1986
1987         * ext2fs.h: Add feature definition for AFS IMAGIC inodes.
1988
1989         * fileio.c (ext2fs_file_open): Remove obsolete comment stating
1990                 that we don't handle writing yet (we do).  Fixed bug where
1991                 we weren't allocating a big enough buffer for ext2_bmap.
1992
1993 1999-05-03    <tytso@rsts-11.mit.edu>
1994
1995         * openfs.c (ext2fs_open): Check to make sure that the number of
1996                 blocks per group is not zero --- if so, it must be a bad
1997                 superblock!
1998
1999 1999-01-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2000
2001         * Release of E2fsprogs 1.14
2002
2003 1999-01-07  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2004
2005         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if
2006                 the inode number is zero; if it's zero, return
2007                 EXT2_ET_BAD_INODE_NUM.
2008
2009 1998-12-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2010
2011         * initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead
2012                 of EXT2_FIRST_INO to ensure compatibility with Linux 1.2
2013                 header files.
2014
2015 Mon Jan  4 02:32:09 1999  Theodore Y. Ts'o  <tytso@mit.edu>
2016
2017         * llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the
2018                 non-Linux case to use EINVAL by default, unless it isn't
2019                 defined, in which case we use EXT2_ET_INVALID_ARGUMENT
2020                 instead.
2021
2022 1998-12-15  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2023
2024         * Release of E2fsprogs 1.13
2025
2026 1998-12-03  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2027
2028         * Makefile.in: Updated dependencies.
2029
2030 1998-09-22  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2031
2032         * initialize.c (ext2fs_initialize): Make sure that we allocate
2033                 enough inodes so that we can make a valid filesystem.
2034
2035 1998-09-02  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2036
2037         * rw_bitmaps.c: Fixed signed/unsigned warnings.
2038
2039         * fileio.c (ext2fs_file_set_size): Remove unneeded extern from the
2040                 function declaration.
2041
2042         * dblist.c (make_dblist): Add safety check in case the dblist
2043                 pointer passed in is null (in which case, assign it to
2044                 fs->dblist).  Fixed some signed/unsigned warnings.
2045
2046         * bmap.c: Make addr_per_block be of type blk_t to avoid
2047                 signed/unsigned warnings.
2048
2049         * namei.c (ext2fs_follow_link): Remove uneeded extern from the
2050                 function declaration.
2051
2052         * get_pathname.c (get_pathname_proc): Use return value from
2053                 ext2fs_get_mem, instead of checking if &gp->name is
2054                 NULL.
2055
2056         * dir_iterate.c (ext2fs_process_dir_block): 
2057         * dblist_dir.c (ext2fs_dblist_dir_iterate): Remove uneeded extern
2058                 from the function declaration.
2059
2060         * block.c (ext2fs_block_iterate2): If the read_inode call fails,
2061                 return the error directly instead of jumping to the
2062                 cleanup routine, since we don't need to do any cleanup.
2063
2064         * alloc_table.c (ext2fs_allocate_group_table): Make this
2065                 function take a dgrp_t for its group argument.
2066
2067         * ext2fs.h: Make dgrp_t an __u32 type, and make
2068                 fs->desc_group_count be of type dgrp_t.
2069
2070 1998-07-27  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2071
2072         * badblocks.c (ext2fs_badblocks_list_add): Use a bigger increment
2073                 than 10 blocks when we need to expand the size of the
2074                 badblocks list.
2075
2076 1998-07-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2077
2078         * Release of E2fsprogs 1.12
2079
2080 1998-06-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2081
2082         * closefs.c (ext2fs_flush): Update the s_block_group_nr field as
2083                 appropriate for all of the block group copies, so that
2084                 it's clear where the beginning of the filesystem is on the
2085                 disk.  (For when the partition table gets scrod.)
2086
2087         * ext2fs.h: Change the name of the feature from
2088                 EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE to
2089                 EXT2_FEATURE_INCOMPAT_FILESIZE (to match with the kernel).
2090
2091 1998-06-18  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2092
2093         * inode.c (get_next_blockgroup): Fix bug where if
2094                 get_next_blockgroup() is called early because of a missing
2095                 inode table in a block group, the current_inode counter
2096                 wasn't incremented correctly.
2097
2098 1998-06-16  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2099
2100         * read_bb.c (ext2fs_read_bb_inode): Make function more robust
2101                 against a completely trashed bad block inode.
2102
2103 1998-06-10  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2104
2105         * alloc_tables.c (ext2fs_allocate_group_table): Fix bug so that if
2106                 the stride length hits a bad value, we retry the block
2107                 allocation starting at the beginning of the block group.
2108
2109         * ext2fs.h, bb_inode.c, block.c, bmove.c, dir_iterate.c,
2110                 expanddir.c, ext2fsP.h, read_bb.c: Change blkcnt_t to be
2111                 e2_blkcnt_t to avoid collision with LFS API.
2112
2113 1998-05-01  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2114
2115         * initialize.c (ext2fs_initialize): Initialize s_inodes_count in a
2116                 way that avoids overflows on disk sizes greater than 4GB.
2117
2118 1998-04-28  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2119
2120         * ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the
2121                 return type for comparison functions for qsort.
2122
2123         * dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function
2124                 declaration.
2125
2126 1998-04-26  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2127
2128         * ext2fs.h, bitops.h: Add support for the Watcom C compiler to do
2129                 inline functions.
2130
2131         * ext2fs.h, dosio.c: Use asm/types.h instead of linux/types.h to
2132                 evade a potential problem with glibc's header files trying
2133                 to spike out linux/types.h.
2134
2135         * ext2fs.h (ext2fs_resize_mem): Change the function prototype to
2136                 include the old size of the memory, which is needed for
2137                 some braindamaged memory allocation systems that don't
2138                 support realloc().
2139
2140         * badblocks.c (ext2fs_badblocks_list_add):
2141           bb_inode.c (clear_bad_block_proc):
2142           dblist.c (ext2fs_add_dir_block):
2143           icount.c (insert_icount_el):
2144           irel_ma.c (ima_put):
2145           rs_bitmap.c (ext2fs_resize_generic_bitmap): Update functions to
2146                   pass the old size of the memory to be resized to
2147                   ext2fs_resize_mem(). 
2148
2149 1998-03-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2150
2151         * Makefile.in: Change to use new installation directory variables
2152                 convention.  Fix uninstall rules to take $(DESTDIR) into
2153                 account.
2154
2155 1998-03-29  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2156
2157         * ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform
2158                 with 32 bit longs, then we need to manually define __s64
2159                 and __u64, since the current kernel header files don't
2160                 define these if __STRICT_ANSI__ is defined.  This is a
2161                 problem if we are compiling with full GCC warnings, since
2162                 we do need 64 bit support.
2163         
2164         * Makefile.in (OBJS): Remove bmove.o from files to be built,
2165                 since we're not using ext2fs_move_blocks() and there
2166                 is some question as to its usefulness in its current
2167                 form.
2168
2169         * bmap.c (block_bmap): Remove unused function.
2170
2171         * bmove.c (process_block): Fix -Wall warning.
2172
2173 1998-03-23  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2174
2175         * block.c (ext2fs_block_iterate3): Make the ref_offset field
2176                 contain the offset into the inode.i_blocks array when
2177                 ref_block is zero.  Since we haven't done a formal
2178                 release of e2fsprogs since block_iterate2 was first
2179                 introduced, I removed block_iterate2, and renamed
2180                 block_iterate3 to be block_iterate2.
2181
2182         * bb_inode.c, bmove.c, dblist_dir.c, dir_iterate.c,
2183                 expanddir.c, ext2fs.h, ext2fsP.h, read_bb.c: Change
2184                 use of block_iterate and block_iterate2 to
2185                 block_iterate2 with the new prototype for the
2186                 interator function.  (using blkcnt_t forr blockcount)
2187
2188 1998-03-21  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2189
2190         * ext2fs.h: Add new superblock fields (s_algorithm_usage_bitmap, 
2191                 s_prealloc_blocks, s_prealloc_dir_blocks).  Added
2192                 conditional defines of new features COMPAT_DIR_PREALLOC,
2193                 RO_COMPAT_LARGE_FILE RO_COMPAT_BTREE_DIR,
2194                 INCOMPAT_COMPRESSION, INCOMPAT_DIRNAME_SIZE.  Changed
2195                 the library to declare that we support COMPAT_DIR_PREALLOC, 
2196                 INCOMPAT_DIRNAME_SIZE, RO_COMPAT_LARGE_FILE.
2197
2198         * fileio.c: Rename function ext2fs_file_llseek to be
2199                 ext2fs_file_lseek, which is more accurate.
2200
2201         * block.c: Add new function ext2fs_block_iterate3 which calls
2202                 the iterator function with the blockcount argument of
2203                 type blkcnt_t.  This version of the function is
2204                 allowed to handle large files; the other fucntions are
2205                 not.
2206
2207         * ext2fs.h: Add new type blkcnt_t
2208
2209         * ext2_err.et.in: Add error code EXT2_ET_FILE_TOO_BIG
2210
2211         * block.c (ext2fs_block_iterate2): Fix bug where the block count
2212                 field wasn't getting correctly incremented for sparse
2213                 files when the indirect or doubly-indirect block
2214                 specified in the inode was zero.
2215
2216 Sun Mar  8 22:42:47 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2217
2218         * unlink.c (unlink_proc): 
2219         * lookup.c (lookup_proc): 
2220         * link.c (link_proc): 
2221         * get_pathname.c (get_pathname_proc): 
2222         * dir_iterate.c (ext2fs_process_dir_block): Mask off high 8 bits
2223                 from dirent->name_len, so it can be used for other
2224                 purposes.
2225
2226         * ext2fs.h: Add definition of EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE,
2227                 and indicate that we have support for this incompatible
2228                 option.
2229
2230 Mon Feb 23 08:46:33 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2231
2232         * ext2_err.et.in: Added new error code, EXT2_ET_CANCEL_REQUESTED.
2233
2234 Fri Feb 20 23:58:01 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2235
2236         * dblist.c (ext2fs_get_num_dirs): Improve the estimation of the
2237                 number of directories when the block group information is
2238                 unreliable.
2239
2240 1998-02-20  Theodore Y. Ts'o  <tytso@edt.mit.edu>
2241
2242         * inode.c (ext2fs_get_next_inode): Always do the check to see if the
2243                 inode table is missing so that we catch the case where the
2244                 first block group is missing.
2245
2246         * getsize.c, ismounted.c, unix_io.c: #include errno.h since it's
2247                 needed.
2248
2249 Mon Feb 16 16:16:00 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2250
2251         * ext2_io.h, ext2fs.h: Protect against being included multiple times.
2252
2253         * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
2254
2255         * test_io.c (test_flush): Add a debugging printf when the flush
2256                 method is called.
2257
2258         * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
2259                 read in, return right away.
2260
2261 Sun Feb  1 08:20:24 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2262
2263         * bitops.h: Don't try to do i386 inline asm functions if the
2264                 compiler isn't GCC.
2265
2266         * ext2fs.h: If EXT2_FLAT_INCLUDES is defined, #include e2_types.h,
2267                 instead of linux/types.h, and e2_bitops.h instead of
2268                 ext2fs/bitops.h.
2269
2270         * icount.c, version.c: Don't #include <et/com_err.h>, as it isn't
2271                 necessary. 
2272
2273 Sat Jan 17 13:13:31 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2274
2275         * inode.c (ext2fs_open_inode_scan): Initialize the group variables
2276                 so that we don't need to call get_next_blockgroup() the
2277                 first time around.  Saves a bit of time, and prevents us
2278                 from needing to assign -1 to current_group (which is an
2279                 unsigned value).
2280
2281         * icount.c (insert_icount_el): Cast the estimated number of inodes
2282                 from a float to an ino_t.
2283
2284         * alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
2285                 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
2286                 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
2287                 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
2288                 expanddir.c, ext2fs.h, fileio.c, freefs.c,
2289                 get_pathname.c, getsize.c, icount.c, initialize.c,
2290                 inline.c, inode.c, irel_ma.c, ismounted.c, link.c,
2291                 lookup.c, mkdir.c, namei.c, native.c, newdir.c,
2292                 openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
2293                 rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
2294                 tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c,
2295                 valid_blk.c, version.c: If EXT2_FLAT_INCLUDES is
2296                 defined, then assume all of the
2297                 ext2-specific header files are in a flat directory.
2298
2299         * block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
2300                 all assignments from void * to be compatible with C++.
2301
2302 Tue Jan  6 11:28:15 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2303
2304         * closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
2305                 make sure the contents of the disk are flushed to disk.
2306
2307 Mon Dec 29 14:39:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2308
2309         * dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
2310                 avoid C++ namespace clash.
2311
2312         * bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
2313                 avoid C++ namespace clash.
2314
2315         * ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
2316                 irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
2317                 ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
2318                 unlink.c: Change private to be priv_data (to avoid C++
2319                 namespace clash)
2320
2321 Fri Nov 28 09:26:31 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2322
2323         * dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more
2324                 paranoid about validating the directory counts from the
2325                 block group information.
2326
2327         * all files: Don't include stdlib.h anymore; include it in
2328                 ext2_fs.h, since that file requires stdlib.h
2329
2330 Thu Nov 20 16:07:38 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2331
2332         * expanddir.c (ext2fs_expand_dir): Check to make sure the block
2333                 bitmap is loaded, and return an error if it is not.
2334                 (expand_dir_proc): Only use ext2fs_write_dir_block when
2335                 writing a directory block, not when writing out a fresh
2336                 indirect block.
2337
2338 Tue Nov 11 22:46:45 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2339
2340         * Makefile.in, tst_getsize.c: Added new file which is used to test
2341                 the ext2fs_get_device_size function.
2342
2343         * ext2_err.et.in (EXT2_ET_UNIMPLEMENTED): Added new error code.
2344
2345 Sun Nov  2 20:36:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2346
2347         * ext2fs.h: Make ext2fs_get_mem take an unsigned argument.
2348
2349         * fileio.c (ext2fs_file_get_size, ext2fs_file_set_size,
2350                 ext2fs_file_get_fs): New functions added.
2351
2352
2353 Fri Oct 31 12:16:52 1997    <tytso@EDT.MIT.EDU>
2354
2355         * bitops.c (ext2fs_warn_bitmap, ext2fs_warn_bitmap2): Don't call
2356                 com_err if OMIT_COM_ERR is defined.
2357
2358 Thu Oct 30 11:33:57 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2359
2360         * Rename new error codes to _ET_ in them for consistency.
2361
2362 Sat Oct 25 00:06:58 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2363
2364         * [all files, basically]: Added definition of ext2fs_get_mem, 
2365                 ext2fs_free_mem, and ext2fs_resize_mem in ext2fs.h, and
2366                 changed all library routines to use these wrapper functions.
2367
2368         * dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND
2369                 instead of the system error messages.
2370         
2371         * ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
2372                 EXT2_DB_NOT_FOUND
2373
2374         * ext2fs.h: Added function declarations and constants for bmap.c
2375                 and fileio.c.
2376
2377         * ext2_err.et.in: Added new error messages EXT2_FILE_RO and
2378                 EXT2_ET_MAGIC_EXT2_FILE
2379
2380         * Makefile.in: Added files bmap.c and fileio.c, and temporarily
2381                 commented out brel_ma.c and irel_ma.c
2382
2383         * bmap.c: New file which maps a file's logical block number to its
2384                 physical block number.
2385
2386         * fileio.c: New file which implements simple file reading and
2387                 writing primitives.
2388
2389         * alloc.c (ext2fs_alloc_block): New function which allocates a
2390                 block, zeros it, and updates the filesystem accounting
2391                 records appropriately.
2392
2393 Wed Oct 22 16:47:27 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2394
2395         * ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
2396                 EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL,
2397                 EXT2_INODE_ALLOC_FAIL, EXT2_NOT_DIRECTORY
2398
2399         * Change various library files to use these functions instead of
2400                 EINVAL, ENOENT, etc.
2401
2402 Mon Oct 20 19:32:40 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2403
2404         * llseek.c: Check HAVE_LLSEEK_PROTOTYPE to see whether or not we
2405                 need to declare llseek().
2406
2407 Sun Oct 19 18:56:22 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2408
2409         * Rename io.h to be ext2_io.h (avoid namespace collisions)
2410
2411         * Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
2412
2413 Fri Oct  3 13:35:59 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2414
2415         * llseek.c (ext2fs_llseek): Fix type error for ext2fs_llseek()
2416
2417         * icount.c (ext2fs_icount_validate): 
2418         * bmove.c (process_block): Fix lint error in type for fprintf().
2419
2420 Mon Sep 15 11:45:09 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2421
2422         * inode.c (ext2fs_check_directory): Add support for the callback
2423                 to return the error code EXT2_ET_CALLBACK_NOTHANDLED.
2424
2425 Thu Sep  4 12:28:22 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2426
2427         * bitmaps.c (ext2fs_set_bitmap_padding): New function which sets the
2428                 padding of the bitmap to be all one's.
2429
2430 Wed Sep  3 14:27:30 1997  Theodore Y. Ts'o  <tytso@edt.mit.edu>
2431
2432         * llseek.c: Added missing semicolon to glibc fixup declaration of
2433         llseek().
2434
2435         * bmove.c: Add #include of errno.h
2436
2437 Sat Aug 23 22:47:46 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2438
2439         * Makefile.in (ELF_SO_VERSION): Bump version to be 2.4 since we've
2440                 added a new field to the io_channel (app_data).
2441
2442         * io.h: Add a new element to the io_channel structure, app_data.
2443
2444         * initialize.c, openfs.c: Set io->app_data to point at the
2445                 filesystem handle.
2446
2447 Thu Aug 14 08:14:17 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2448
2449         * io.h: Change the prototype of ext2fs_llseek() to use int's
2450                 instead of unsigned int's.
2451
2452         * llseek.c: Change to allow PIC and !HAVE_LLSEEK.  Add a prototype
2453                 to make life easer for GNU Libc 2.
2454
2455         * rw_bitmaps.c: On the PowerPC, the big-endian variant of the ext2
2456                 filesystem has its bitmaps stored as 32-bit words with bit
2457                 0 as the LSB of each word.  Thus a bitmap with only bit 0
2458                 set would be, as a string of bytes, 00 00 00 01 00 ...  To
2459                 cope with this, we byte-reverse each word of a bitmap if
2460                 we have a big-endian filesystem, that is, if we are *not*
2461                 byte-swapping other word-sized numbers.
2462
2463 Mon Aug 11 03:30:48 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2464
2465         * dosio.c: New file to do DOS/BIOS disk accesses.
2466
2467         * namei.c (open_namei): Make pathlen be of type size_t.
2468
2469         * llseek.c: Always #include stdlib.h since it's need to define
2470                 size_t.  
2471
2472         * io.h: Use errcode_t for magic numbers.
2473
2474         * icount.c (get_icount_el): Use size_t where appropriate
2475         
2476         * dupfs.c (ext2fs_dup_handle): 
2477         * dblist.c (dir_block_cmp): Use size_t where appropriate.
2478
2479         * read_bb.c (ext2fs_read_bb_inode): 
2480         * cmp_bitmaps.c (ext2fs_compare_inode_bitmap): Use blk_t, ino_t
2481                 and size_t where appropriate.
2482
2483         * closefs.c (ext2fs_flush): Use dgrp_t instead of int where
2484                 appropriate.
2485
2486         * openfs.c (ext2fs_open): 
2487         * check_desc.c (ext2fs_check_desc): Use blk_t instead of int where
2488                 appropriate.
2489
2490         * rw_bitmaps.c (read_bitmaps): 
2491         * irel_ma.c: 
2492         * inode.c (ext2fs_write_inode): 
2493         * initialize.c (ext2fs_initialize):
2494         * brel_ma.c: Fix to make be 16-bit safe.
2495
2496         * link.c (ext2fs_link): 
2497         * unlink.c (ext2fs_unlink):
2498         * lookup.c (lookup_proc): 
2499         * ismounted.c (ext2fs_check_if_mounted): 
2500         * block.c (xlate_func): Add #pragma argsused for Turbo C.
2501
2502 Sun Aug 10 10:05:22 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2503
2504         * block.c (ext2fs_block_iterate2): Use retval which is a errcode_t
2505                 type.
2506
2507         * bitmaps.c (make_bitmap): Use size_t instead of int where
2508                 appropriate.
2509
2510         * bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
2511
2512         * alloc.c (ext2fs_new_inode): Use ino_t instead of int for the
2513                 group number.
2514
2515         * get_pathname.c: Use ino_t instead of int where appropriate.
2516
2517         * ext2fs.h: Make the magic structure element be errcode_t instead
2518                 of int.
2519
2520         * alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
2521                 bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
2522                 cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c
2523                 dirblock.c dupfs.c expanddir.c freefs.c get_pathname.c
2524                 icount.c initialize.c inline.c inode.c irel_ma.c link.c
2525                 llseek.c lookup.c mkdir.c namei.c newdir.c read_bb.c
2526                 read_bb_file.c rs_bitmap.c rw_bitmaps.c swapfs.c 
2527                 test_io.c tst_badblocks.c tst_iscan.c unix_io.c unlink.c
2528                 valid_blk.c version.c: Add an #ifdef for HAVE_UNISTD_H
2529
2530 Tue Jun 17 01:33:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2531
2532         * unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno
2533                 is zero, then return EXT2_IO_LLSEEK_FAILED.
2534
2535         * ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
2536
2537         * Release of E2fsprogs 1.11
2538
2539 Mon Jun 16 23:53:06 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2540
2541         * dblist.c (ext2fs_dblist_count): Added new function which returns
2542                 the number of directory blocks in dblist.
2543
2544 Sat Jun 14 01:39:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2545
2546         * unix_io.c (unix_flush): Make the io_channel flush function do a
2547                 fsync to flush the kernel buffers to disk.
2548
2549 Wed Jun 11 18:25:31 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2550
2551         * inode.c (ext2fs_inode_scan_goto_blockgroup): Fix bug; the
2552                 current inode number wasn't being set by the
2553                 goto_blockgroup function.
2554
2555 Mon Jun  9 10:45:48 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2556
2557         * bmove.c (ext2fs_move_blocks): New function which takes a bitmap
2558                 of blocks which need to be moved, and moves those blocks
2559                 to another location in the filesystem.
2560
2561         * rs_bitmap.c (ext2fs_resize_generic_bitmap): When expanding a
2562                 bitmap, make sure all of the new parts of the bitmap are
2563                 zero. 
2564
2565 Sun Jun  8 16:24:39 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2566
2567         * bitmaps.c (ext2fs_copy_bitmap): Fix bug; the destination bitmap
2568                 wasn't being returned to the caller.
2569
2570         * alloc_tables.c (ext2fs_allocate_group_table): Add new function
2571                 ext2fs_allocate_group_table() which sets the group tables
2572                 for a particular block group.  The relevant code was
2573                 factored out of ext2fs_allocate_tables().
2574
2575         * dblist.c (make_dblist): Adjust the initial size of the directory
2576                 block list to be a bit more realistic (ten plus twice the
2577                 number of directories in the filesystem).
2578
2579 Thu May  8 22:19:09 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2580
2581         * badblocks.c (ext2fs_badblocks_list_test): Fix bug where
2582                 ext2fs_badblocks_list_test would test the list (and exceed
2583                 array boundaries) if there were no bad blocks on the bad
2584                 blocks list.  (Showed up when user tried: mke2fs -c -b 4096).
2585
2586 Thu Apr 24 12:16:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
2587
2588         * Release of E2fsprogs version 1.10
2589
2590 Thu Apr 24 10:13:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
2591
2592         * alloc_tables.c (ext2fs_allocate_tables): Correctly place the
2593                 inode and block bitmaps based on the RAID 0 stride
2594                 parameter (which is passed by mke2fs).
2595
2596         * ext2fs.h: Add "stride" parameter to ext2_filsys, to be used by
2597                 mke2fs to communicate the stride length to
2598                 ext2fs_allocate_tables()
2599
2600 Wed Apr 23 21:50:42 1997  Theodre Ts'o  <tytso@localhost.mit.edu>
2601
2602         * initialize.c (ext2fs_initialize): Fix to compile under Linux 1.2
2603                 systems.  (We can't assume that the new filesystem types
2604                 are supported.)
2605
2606 Wed Apr 23 18:40:53 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2607
2608         * alloc_tables.c (ext2fs_allocate_tables): Make sure that we
2609                 allocate the inode and block bitmaps inside block group at
2610                 all times.
2611
2612 Mon Apr 21 00:06:28 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2613
2614         * alloc.c (ext2fs_new_block): Fix bug where if goal==0 and the
2615                 filesystem has no free blocks, ext2fs_new_block would loop
2616                 forever.
2617
2618         * dupfs.c (ext2fs_dup_handle): Duplicate an ext2 filesystem handle
2619
2620         * freefs.c (ext2fs_free_inode_cache): Decrement refcount and only
2621                 free if refcount goes to zero.
2622
2623         * inode.c (create_icache): Initialize refcount to 1.
2624
2625         * ext2fsP.h: Added refcount to ext2_inode_cache
2626
2627         * dblist.c (ext2fs_copy_dblist): New function to copy a directory
2628                 block list.
2629
2630         * badblocks.c (ext2fs_badblocks_copy): New function to copy a
2631                 badblocks structure.
2632
2633 Sun Apr 20 23:19:51 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2634
2635         * bitmaps.c (ext2fs_copy_bitmap): New function to copy a bitmap.
2636
2637         * unix_io.c, test_io.c (unix_open, test_open): Initialize the
2638                 refcount to 1.
2639                 (unix_close, test_close): Decrement the refcount and only
2640                 close the io_channel if the refcount goes to 0.
2641
2642         * io.h: Add refcount to the io_channel structure.  Add new macro
2643                 interface io_channel_bumpcount() to bump the refcount.
2644
2645 Thu Apr 17 20:25:03 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2646
2647         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Use the inode
2648                 cache in the filesystem handle, instead of the inode cache
2649                 in a static variable.
2650
2651         * freefs.c: Added static function to free the inode cache (called by
2652                 ext2fs_free). 
2653
2654         * ext2fsP.h: Added definition of the ext2_inode_cache structures.
2655
2656         * ext2fs.h: Added pointer to the inode_cache structure.
2657
2658         * block.c (block_iterate_ind, block_iterate_dind, 
2659                 block_iterate_tind): If there are holes in the indirect,
2660                 doubly indirect, or triply indirect blocks, increment the
2661                 block count field automatically.
2662
2663 Thu Apr 17 12:23:38 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2664
2665         * Release of E2fsprogs version 1.09
2666
2667 Mon Apr 14 20:38:56 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2668
2669         * version.c (ext2fs_parse_version_string): Check the passed in
2670                 version string (instead of the hard-coded one).
2671
2672         * alloc_tables.c (ext2fs_allocate_tables): If the last block is
2673                 greater filesystem size, clamp it to prevent allocating a
2674                 block or inode bitmap beyond the filesystem.
2675
2676         * initialize.c (ext2fs_initialize): Fix bug where the metatdata
2677                 overhead calculation was accidentally removed.
2678
2679 Fri Apr 11 18:56:26 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2680
2681         * Release of E2fsprogs version 1.08
2682
2683 Thu Apr 10 13:15:15 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2684
2685         * dblist.c (ext2fs_set_dir_block): New function which sets the
2686                 block of a dblist entry, given the directory inode and
2687                 blockcnt.
2688
2689 Sat Apr  5 12:42:42 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2690
2691         * alloc_tables.c (ext2fs_allocate_tables): Allocate the bitmap and
2692                 inode bitmaps at staggered locations across the block
2693                 groups, to avoid concentrating the bitmaps on a small
2694                 number of disks when using striped RAID arrays.
2695
2696         * initialize.c (ext2fs_initialize): By default, choose the maximum
2697                 possible number of blocks per group (based on the size of
2698                 the bitmaps in the blocksize).
2699
2700 Fri Apr  4 11:28:16 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2701
2702         * initialize.c (ext2fs_initialize): Add support for
2703                 EXT2_COMPAT_SPARSE_SUPER feature.
2704
2705         * closefs.c (ext2fs_bg_has_super): New function to determine
2706                 whether or a particular block group should have a
2707                 superblock and block group descriptor.  Used for the
2708                 EXT2_COMPAT_SPARSE_SUPER feature is turned on.
2709                 (ext2fs_flush):  Check ext2fs_bg_has_super to see whether
2710                 or not the superblock should be written out for the block
2711                 group. 
2712
2713         * ext2fs.h (EXT2_COMPAT_SPARSE_SUPER): Define compatibility flag
2714                 for sparse duplicate superblocks.
2715
2716         * version.c (ext2fs_get_library_version): New function which
2717                 returns the library version.
2718
2719         * version.c (ext2fs_parse_version_string): New function which
2720                 parses a version string and returns a version number,
2721                 so application programs can compare version numbers as
2722                 integers.
2723
2724 Wed Mar 26 00:43:52 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2725
2726         * icount.c (ext2fs_create_icount): Change function so that it also
2727                 takes a new argument which contains a "hint" icount
2728                 structure.  This "hint" icount allows the create function
2729                 to set up the sorted list in advance.  This reduces
2730                 significantly the amount of data moving needed to insert
2731                 these inodes into the list later.
2732         
2733         * icount.c (ext2fs_icount_validate): New function which validates
2734                 that the icount structure's rep invariant.
2735
2736         * icount.c (get_icount_el): Completely revamped implementation
2737                 to subsume put_icount_el().  Put_icount_el() used to
2738                 use an O(N) implementation to insert in the middle
2739                 of the icount list.  It now uses a O(ln N) to search
2740                 for where the icount should be inserted, and then uses
2741                 a memcpy to move the list down (instead of a for loop).
2742         
2743         * icount.c (ext2fs_icount_fetch, ext2fs_icount_store,
2744                 ext2fs_icount_increment, ext2fs_icount_decrement): Check
2745                 to see if the inode is within bounds; if it isn't, return
2746                 EINVAL.
2747
2748         * bitops.h (ext2fs_test_generic_bitmap): Fix error message given
2749                 when a bad inode number is passed to test_generic_bitmap
2750                 to be EXT2FS_TEST_ERROR instead of the wrong
2751                 EXT2FS_UNMARK_ERROR.
2752
2753 Wed Mar 12 13:32:05 1997  Theodore Y. Ts'o  <tytso@mit.edu>
2754
2755         * Release of E2fsprogs version 1.07
2756
2757 Sun Mar  2 16:46:18 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2758
2759         * Makefile.in (ELF_VERSION): Change version to be 2.2
2760
2761 Tue Feb 11 14:54:02 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2762
2763         * alloc.c (ext2fs_get_free_blocks): Change routine to use
2764                 ext2fs_fast_test_block_bitmap_range().
2765
2766         * bitops.h (ext2fs_fast_test_block_bitmap_range,
2767                 ext2fs_test_block_bitmap_range: New inline functions which
2768                 test to see whether a contiguous range of blocks is
2769                 available.
2770
2771 Thu Feb  6 10:00:13 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2772
2773         * badblocks.c (ext2fs_badblocks_list_create): Rename sybmols to use
2774                 use ext2fs_badblocks_* instead of badblocks_*
2775
2776         * bb_compat.c: New file which translates between old badblocks_*()
2777                 names to ext2fs_badblocks_*()
2778
2779         * unlink.c (ext2fs_unlink): New file, moved ext2fs_unlink() from
2780                 link.c (since e2fsck doesn't use ext2fs_unlink()).
2781
2782         * rs_bitmap.c (ext2fs_resize_generic_bitmap): New file, contains
2783                 bitmap resizing routine moved from bitmaps.c, since e2fsck
2784                 doesn't need to use this function.
2785
2786         * lookup.c (ext2fs_lookup): Moved ext2fs_lookup to its own file,
2787                 since e2fsck only needs ext2fs_lookup.
2788
2789 Mon Feb  3 10:11:40 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2790
2791         * inode.c (ext2fs_open_inode_scan): Set fs->badblocks if it is not
2792                 already set; this is needed so that programs like dump
2793                 which use the inode scan functions will deal with
2794                 filesystems that have bad blocks in the inode table.
2795
2796 Sun Feb  2 00:17:36 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2797
2798         * ext2fs.h (struct_badblocks_list, struct_badblocks_iterate): 
2799                 Moved to ext2fsP.h, since it doesn't need to be part of
2800                 the public interface.
2801
2802         * dir_iterate.c: Move ext2_dir_iterate out of namei.c.
2803
2804 Sat Feb  1 10:14:55 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2805
2806         * dblist.c (ext2fs_get_num_dirs): New file, which implements a
2807                 directory block list abstraction.  (Code moved from
2808                 e2fsck).
2809
2810         * ext2fs.h, inode.c: Moved definition of ext2_struct_inode_scan to
2811                 to inode.c (since no one else should be peeking inside it!)
2812
2813         * valid_blk.c (ext2_inode_has_valid_blocks): New function.
2814
2815         * openfs.c (ext2fs_open): Check the feature set in the ext2
2816                 superblock, and refuse to open filesystems if they contain
2817                 incompatible features.  (Can be overriden with the
2818                 EXT2_FLAG_FORCE 
2819
2820 Sun Jan 12 11:31:46 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2821
2822         * block.c (ext2fs_block_iterate2): Added new function
2823                 ext2fs_block_iterate2 which changes the function
2824                 signature of the callback function to include the
2825                 referencing block and offset.
2826
2827         * inode.c (ext2fs_inode_scan_goto_blockgroup): Added new function
2828                 ext2fs_inode_scan_goto_blockgroup which allows an
2829                 application to jump to a particular block group while
2830                 doing an inode scan.
2831
2832 Wed Jan  1 23:50:12 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2833
2834         * dirblock.c: Include string.h, since we use memcpy().
2835
2836 Tue Dec  3 12:27:29 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2837
2838         * getsize.c (ext2fs_get_device_size): The ioctl BLKGETSIZE returns
2839                 a long not an int; this doesn't matter on i386 machines,
2840                 but it does on Alpha's.
2841         
2842 Fri Nov 29 20:57:37 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2843
2844         * inode.c (ext2fs_write_inode, ext2fs_read_inode): If the inode
2845                 table pointer is NULL, then return an error indicating
2846                 that the inode table is missing.
2847                 (get_next_blockgroup, get_next_blocks,
2848                 ext2fs_get_next_inode): Don't treat a missing inode table
2849                 as permanent error.  Return MISSING_INODE_TABLE, but as an
2850                 advisory error code, much like BAD_BLOCK_IN_INODE_TABLE.
2851
2852         * rw_bitmaps.c (ext2fs_write_block_bitmap,
2853                 ext2fs_write_inode_bitmap): If the inode or block bitmap
2854                 block is zero, then don't write out the inode or block
2855                 bitmap.  The idea here is to avoid stomping on the
2856                 superblock.
2857                 (read_bitmaps): If the inode or block bitmap block is
2858                 zero, then fill in that portion of the inode or block
2859                 bitmap with all zeros.
2860
2861         * inode.c (ext2fs_get_next_inode): Fix bug in handling of bad
2862                 blocks in inode table when the inode table size is
2863                 non-standard (and can therefore span blocks).
2864
2865 Tue Oct 29 20:13:14 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2866
2867         * alloc.c (ext2fs_new_block): Fix fencepost error in
2868                 ext2fs_new_block; make sure we don't try to allocate the
2869                 first block beyond the end of the filesystem.
2870
2871 Mon Oct 14 11:00:48 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2872
2873         * inode.c (check_for_inode_bad_blocks): New function called by
2874                 get_next_blocks() to avoid reading in bad blocks marked in
2875                 fs->badblocks.  Inodes located in bad blocks are returned
2876                 by ext2fs_get_next_inode() returns the error code 
2877                 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE.
2878         
2879         * alloc_tables.c (ext2fs_allocate_tables): New function which
2880                 performs the part of mke2fs's job of allocating the 
2881                 filesystem tables.
2882
2883         * test_io.c (test_close): IO manager which is used for testing
2884                 purposes.
2885
2886 Sun Oct 13 04:31:57 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2887
2888         * inode.c (ext2fs_get_next_inode): Separate out the function of
2889                 setting up for a new block group to get_next_blockgroup().
2890                 Separate out the function of reading in blocks of the
2891                 inode table to get_next_blocks().
2892
2893         * ext2fs.h: Add the badblocks list to the ext2_filsys entry
2894
2895         * badblocks.c (badblocks_list_add, badblocks_list_test): Add
2896                 blocks to the badblock list in sorted order.  This allows
2897                 badblocks_list_test to be coded using a binary search for
2898                 speed.
2899
2900 Tue Oct  8 02:02:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2901
2902         * Release of E2fsprogs version 1.06
2903
2904 Mon Oct  7 00:44:17 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2905
2906         * ext2fs.h, block.c, closefs.c, dirblock.c, inode.c, native.c,
2907                 open.c: Change EXT2_SWAP to EXT2_FLAG_SWAP for
2908                 consistency's sake.
2909         
2910         * closefs.c (ext2fs_flush): If the flag EXT2_MASTER_SB_ONLY is
2911                 set, then only write out the master superblock.
2912
2913 Sun Oct  6 21:45:26 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2914
2915         * block.c (ext2fs_block_iterate): Fixed bug which caused
2916                 block_iterate to fail to handle HURD created filesystems;
2917                 it tested the inode translator field before the inode was
2918                 loaded.
2919
2920 Tue Sep 17 14:08:24 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2921
2922         * initialize.c (ext2fs_initialize): Make sure the description for
2923                 the inode bitmap is set correctly.
2924
2925         * bitmaps.c (ext2fs_allocate_generic_bitmap): Fix minor type typo.
2926
2927 Thu Sep 12 15:23:07 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2928
2929         * Release of E2fsprogs version 1.05
2930
2931 Sat Sep  7 07:36:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2932
2933         * initialize.c: Override the kernel's idea of default
2934                 checkinterval from 0 (never) to 180 days.
2935
2936 Wed Aug 28 03:20:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2937
2938         * namei.c (ext2fs_namei_follow): New function which follows
2939                 symbolic link (if any) at the target.
2940
2941 Tue Aug 27 01:48:43 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2942
2943         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Add support
2944                 for shortcut function fs->read_inode() and fs->write_inode().
2945                 Added inode_cache to reduce CPU time spent in doing
2946                 byte swapping.
2947
2948         * swapfs.c (ext2fs_swap_super): Swap the new fields in a V2
2949                 superblock.
2950
2951         * namei.c (ext2fs_follow_link): New function.
2952                 (ext2fs_namei): Extended to have support for chasing
2953                 symbolic links.  ext2fs_namei() still returns an inode
2954                 which is a symbolic link.  Symbolic links are only chased
2955                 while resolving the containing directory.  To chase
2956                 symbolic links of the final result, use
2957                 ext2fs_follow_link().
2958
2959 Mon Aug 26 23:46:07 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2960
2961         * ext2_err.et.in: Added new error code EXT2_ET_SYMLINK_LOOP.
2962
2963         * bitops.h (ext2fs_set_bit, ext2fs_celar_bit): Use asm inlines
2964                 provided by Pete A. Zaitcev (zaitcev@lab.sun.mcst.ru).
2965
2966 Thu Aug 22 00:40:18 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2967
2968         * initialize.c (ext2fs_initialize): On systems where the byte
2969                 order is not i386 compatible, set the swap_byte flag.
2970
2971         * inode.c (inocpy_with_swap): Check to see if inode contains a
2972                 fast symlink before swapping the inode block fields.  This
2973                 required adding a new argument to inocpy_with_swap to
2974                 determine whether the mode field is in host order or not.
2975
2976 Wed Aug 21 00:45:42 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2977
2978         * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit): On
2979                 the sparc, if EXT2_STD_BITOPS set, use the standard
2980                 i386-compatible bitmask operations, instead on the
2981                 non-standard native bitmask operators.
2982
2983 Fri Aug  9 11:11:35 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2984
2985         * block.c (ext2fs_block_iterate): Cause block iterator to return
2986                 the HURD translator block (along with everything else).
2987                 If the flag BLOCK_FLAG_DATA_ONLY is passed to the block
2988                 iterator, then don't return any meta data blocks
2989                 (including the HURD translator).
2990
2991 Wed Jul 17 17:13:34 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2992
2993         * gen_uuid.c: New file, which generates DCE-compatible UUIDs.
2994
2995         * uuid.c: New file, containing UUID utility functions.
2996
2997 Tue Jul 16 10:19:16 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
2998
2999         * ext2fs.h: Add a definition of the "real" ext2 superblock.
3000
3001 Fri May 24 14:54:55 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3002
3003         * ext2fs.h: Fix erroneous ino_t type used in block_bitmap type.
3004
3005 Sun May 19 15:39:03 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3006
3007         * openfs.c (ext2fs_open): If the blocksize in the superblock is
3008                 zero, return the error EXT2_ET_CORRUPT_SUPERBLOCK, since
3009                 that's a basic value that must be correct for the rest of
3010                 the library to work.
3011
3012         * ext2_err.et.in (EXT2_ET_CORRUPT_SUPERBLOCK): Added new error
3013                 code.
3014
3015 Thu May 16 11:12:30 1996  Theodore Ts'o  <tytso@rsts-11.mit.edu>
3016
3017         * Release of E2fsprogs version 1.04
3018
3019 Wed Mar 27 00:33:40 1996    <tytso@rsts-11.mit.edu>
3020
3021         * Release of E2fsprogs version 1.03
3022
3023 Tue Mar 26 12:06:32 1996    <tytso@rsts-11.mit.edu>
3024
3025         * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit):
3026                 Change the m68k bit numbering for bitmasks to match with
3027                 the bit numbering used by all other ext2 implementations.
3028
3029 Thu Mar  7 03:37:00 1996    <tytso@rsts-11.mit.edu>
3030
3031         * inode.c (ext2fs_get_next_inode, ext2fs_close_inode_scan, 
3032         ext2fs_open_inode_scan): Support dynamically-sized inodes.
3033
3034 Wed Mar  6 12:26:29 1996    <tytso@rsts-11.mit.edu>
3035
3036         * inode.c (ext2fs_read_inode, ext2fs_write_inode): Support
3037                 dynamically-sized inodes.
3038
3039         * openfs.c (ext2fs_open): Allow dynamic revision filesystem to be
3040                 loaded.
3041
3042 Tue Mar  5 03:49:37 1996    <tytso@rsts-11.mit.edu>
3043
3044         * initialize.c (ext2fs_initialize): Catch an error condition where
3045                 the passed in size is *really* too small.
3046
3047         * alloc.c (ext2fs_new_inode): 
3048         * ext2fs.h (EXT2_FIRST_INODE): Add support for dynamic revision to
3049                 get first inode.
3050
3051 Wed Feb 21 15:56:17 1996    <tytso@rsts-11.mit.edu>
3052
3053         * getsize.c (ext2fs_get_device_size): Open the device read-only
3054                 when trying to determine its size.
3055
3056 Wed Jan 31 11:06:08 1996    <tytso@rsts-11.mit.edu>
3057
3058         * Release of E2fsprogs version 1.02
3059
3060 Sat Dec  9 09:57:50 1995    <tytso@rsts-11.mit.edu>
3061
3062         * rw_bitops.c (ext2fs_write_block_bitmap):
3063         * bitops.c (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
3064         * bitops.h (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
3065                 Rename {test,set,clear}_bit to ext2fs_{test,set,clear}_bit, 
3066                 to avoid conflicts with with kernel include files.  Also
3067                 rename ADDR and CONST_ADDR to EXT2FS_ADDR and
3068                 EXT2FS_CONST_ADDR. 
3069
3070 Thu Oct 26 12:09:16 1995    <tytso@rsts-11.mit.edu>
3071
3072         * ext2_err.et: Updated message in EXT2_ET_BASE to say version 0.5c
3073
3074         * swapfs.c (ext2fs_swap_super): Put an #ifdef check around
3075                 s_def_resuid and s_def_resgid for backwards compatibility.
3076
3077 Fri Oct 20 23:33:31 1995    <tytso@rsts-11.mit.edu>
3078
3079         * bitops.h: Added #ifdef's for Sparc.
3080
3081 Wed Sep  6 22:14:46 1995    <tytso@rsts-11.mit.edu>
3082
3083         * getsize.c: #include <sys/ioctl.h> under Linux to pick up ioctl()
3084                 declaration
3085
3086         * closefs.c: #include <string.h> to pick up memset() declaration
3087
3088 Mon Sep  4 21:45:29 1995  Remy Card  <card@bbj>
3089
3090         * Makefile.in: Added support for BSD shared libraries.
3091
3092         * initialize.c (ext2fs_initialize): Correctly set the s_creator_os
3093                 flag.
3094
3095 Mon Sep  4 09:55:30 1995    <tytso@rsts-11.mit.edu>
3096
3097         * unix_io.c (unix_open): Add a double check; if the passed in name
3098                 is NULL, return EXT2_ET_BAD_DEVICE_NAME.
3099
3100         * ext2_err.et (EXT2_ET_BAD_DEVICE_NAME): Added new error code
3101
3102 Wed Aug 16 15:44:10 1995    <tytso@rsts-11.mit.edu>
3103
3104         * inode.c (ext2fs_check_directory): Use LINUX_S_ISDIR instead of
3105                 S_ISDIR.
3106
3107 Tue Aug 15 13:08:36 1995    <tytso@rsts-11.mit.edu>
3108
3109         * getsize.c (ext2fs_get_device_size): Add support for reading the
3110                 partition size from a BSD disk label.
3111
3112 Thu Aug 10 09:33:26 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3113
3114         * getsize.c (ext2fs_get_device_size): New function that determins
3115                 the size of a device.  Used by mke2fs and e2fsck.
3116
3117 Sat Aug 12 03:09:54 1995  Remy Card  <card@bbj>
3118
3119         * Makefile.in (install): Install static libraries in $(ulibdir)
3120                 (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
3121
3122 Wed Aug  9 17:04:23 1995  Theodore Y. Ts'o  <tytso@dcl>
3123
3124         * bitmaps.c (ext2fs_free_inode_bitmap, ext2fs_free_block_bitmap):
3125                 Move these functions to freefs.c.
3126
3127         * closefs.c (ext2fs_flush): If swapping blocks, clear the group
3128                 descriptors shadow memory to keep purify quiet.  (This
3129                 also has the nice benefit that the unused portion of the
3130                 shadow descriptors are zeroed out.)
3131
3132         * dirblock.c (ext2fs_write_dir_block): We need to use
3133                 dirent->rec_len *before* it's byteswapped to find the
3134                 location of the next directory structure!
3135
3136         * alloc.c (ext2fs_new_inode): Fix bug which could potentially
3137                 cause ext2fs_new_inode to loop infinitely if we're trying
3138                 to allocate an inode in group #0 and there are no free
3139                 inodes at all in the system.
3140
3141         * closefs.c: #include <errno.h> if it exists.
3142
3143 Sun Aug  6 13:27:50 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3144
3145         * ext2fs.h (BLOCK_FLAG_HOLE): Added new definition for
3146                 BLOCK_FLAG_APPEND.  Added documentation for the block
3147                 interator flags.
3148
3149 Sat Aug  5 11:44:05 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3150
3151         * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
3152                 installation directories correctly.
3153
3154 Tue Jul 18 09:27:38 1995    <tytso@rsx-11.mit.edu>
3155
3156         * namei.c (process_dir_block): 
3157         * mkdir.c (ext2fs_mkdir): 
3158         * expanddir.c (expand_dir_proc): Use ext2fs_{read,write}_dir_block
3159                 to read/write the directory block.
3160
3161         * dirblock.c (ext2fs_read_dir_block), ext2fs_write_dir_block): New
3162                 file containing functions for reading and writing
3163                 directory blocks (byte swapping if necesssary)
3164
3165         * block.c (block_iterate_ind, block_iterate_dind, 
3166                 block_iterate_tind): Byte swap the block addresses if
3167                 EXT2_SWAP_BYTES is set (and swap them back before writing
3168                 them out.)
3169
3170         * inode.c (inocpy_with_swap): New function.
3171         (ext2fs_get_next_inode, ext2fs_read_inode, ext2fs_write_inode):
3172                 Call inocpy_with_swap if EXT2_SWAP_BYTES if set.
3173
3174         * closefs.c (ext2fs_flush): If EXT2_SWAP_BYTES is set, then swap
3175                 the superblock and group descriptors before writing it out.
3176
3177         * openfs.c (ext2fs_open): If the magic number is byte-swapped,
3178                 then set the EXT2_SWAP_BYTES and byte-swap the superblock
3179                 and group descriptors.
3180
3181         * swapfs.c (ext2fs_swap_super, ext2fs_swap_group_desc): New functions
3182                 to desp ext2 filesystem structures.
3183
3184         * bitops.c (set_bit, clear_bit, test_bit): Use modifications
3185                 supplied by Pete A. Zaitcev so that the C language
3186                 versions of these functions are more portable.  They will
3187                 now work on both little and big endian systems, and the
3188                 assumption that 32-bit integers are used is gone.
3189
3190         * bitops.h (ext2_swab16, ext2_swab32): Added new functions for
3191                 doing byte swapping.
3192
3193         * ext2fs.h (EXT2_SWAP_BYTES): Add new flag which indicates that
3194                 byte swapping should take place.
3195
3196 Sun Jul 16 06:21:43 1995    <tytso@rsx-11.mit.edu>
3197
3198         * Makefile.in, cmp_bitmaps.c (ext2fs_compare_block_bitmap_end,
3199                 ext2fs_compare_inode_bitmap_end): Added new file
3200                 containing routines to compare bitmaps.
3201
3202         * ext2_err.et (EXT2_ET_NEQ_BLOCK_BITMAP, EXT2_ET_NEQ_INODE_BITMAP): 
3203                 Added new error codes.
3204
3205 Sat Jul 15 04:23:37 1995    <tytso@rsx-11.mit.edu>
3206
3207         * inode.c (ext2fs_get_next_inode): Don't check scan->inode_buffer;
3208                 if the magic number is correct, it will be allocated.
3209
3210 Fri Jul 14 19:02:59 1995    <tytso@rsx-11.mit.edu>
3211
3212         * block.c (block_iterate_ind, block_iterate_dind, 
3213                 block_iterate_tind): Don't recompute block_nr each loop;
3214                 just increment it!  Factor check of BLOCK_FLAG_APPEND out
3215                 of the loop.  Factor mask of BLOCK_CHANGED into changed
3216                 variable out of the loop.  (block_iterate_ind, in
3217                 particular, gets called a lot, so every little
3218                 optimization helps.)
3219
3220 Thu Jul 13 08:02:45 1995    <tytso@rsx-11.mit.edu>
3221
3222         * block.c (block_iterate_ind, block_iterate_dind, 
3223                 block_iterate_tind): Precompute limit of loop to speed up
3224                 block_iterate_ind and company.
3225
3226         * bitops.h (ext2fs_fast_mark_block_bitmap, 
3227                 ext2fs_fast_unmark_block_bitmap, ext2fs_fast_test_block_bitmap,
3228                 ext2fs_fast_mark_inode_bitmap, ext2fs_fast_unmark_inode_bitmap,
3229                 ext2fs_fast_test_inode_bitmap): Add fast version of these
3230                 functions, which don't do range checking.
3231
3232         * bitops.h (ext2fs_get_block_bitmap_start, 
3233                 ext2fs_get_inode_bitmap_start, ext2fs_get_block_bitmap_end,
3234                 ext2fs_get_inode_bitmap_end): Add new accessor functions
3235                 which return the start and end points of the bitmaps.
3236
3237 Tue Jul 11 18:59:41 1995    <tytso@rsx-11.mit.edu>
3238
3239         * llseek.c (ext2_llseek): If the offset is small enough, use lseek
3240                 instead of llseek.  The errno if the offset is too large
3241                 and lseek is not supported should be EINVAL, not -EINVAL.
3242
3243 Thu Jun 15 23:43:02 1995  Remy Card  <card@bbj>
3244
3245         * Makefile.in: Added support for ELF shared libraries.
3246                 Fixed typos in the compilation rules.
3247                 (distclean): Added Makefile.
3248
3249         * llseek.c (llseek): New function, if llseek() does not exist in the
3250         C library.
3251         (ext2_llseek): Changed to call llseek().
3252
3253 Mon Jun 12 08:29:07 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3254
3255         * ext2fs.h: Use __u32 to define blk_t, instead of unsigned long.
3256
3257 Sun Jun 11 15:02:54 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3258
3259         * mkdir.c (ext2fs_mkdir): Use LINUX_S_IFDIR instead of S_IFDIR.
3260
3261         * ext2fs.h (LINUX_S_IFDIR): Define a linux specific versions of
3262                 the S_*, which are normally defined in <sys/stat.h>.  This
3263                 allows us to compile e2fsprogs on a non-Linux system,
3264                 which may have a different value for S_IFDIR.
3265
3266 Sat Jun 10 23:47:05 1995  Theodore Y. Ts'o  <tytso@lurch.mit.edu>
3267
3268         * bitops.c (clear_bit, set_bit): Remove calls to cli() and sti();
3269                 this is a user-mode application!
3270
3271 Thu Jun  8 13:13:22 1995  Miles Bader  <miles@churchy.gnu.ai.mit.edu>
3272
3273         * llseek.c: Put the include of <linux/unistd.h> inside the #ifdef
3274         __linux__ so that non-linux systems won't see it.
3275
3276         * alloc.c: Include <errno.h> if possible.
3277         * badblocks.c: Ditto.
3278         * bb_inode.c: Ditto.
3279         * bitmaps.c: Ditto.
3280         * block.c: Ditto.
3281         * expanddir.c: Ditto.
3282         * get_pathname.c: Ditto.
3283         * initialize.c: Ditto.
3284         * inode.c: Ditto.
3285         * llseek.c: Ditto.
3286         * mkdir.c: Ditto.
3287         * namei.c: Ditto.
3288         * newdir.c: Ditto.
3289         * openfs.c: Ditto.
3290         * rw_bitmaps.c: Ditto.
3291         * unix_io.c: Ditto.
3292
3293         * Makefile.in: Rewritten to conform to GNU coding standards and
3294         support separate compilation directories.
3295
3296 Thu May 11 04:13:12 1995    <tytso@rsx-11.mit.edu>
3297
3298         * initialize.c (ext2fs_initialize): Don't allow more than one
3299                 bitmaps's worth of inodes in a group.
3300
3301 Sat Mar 11 14:07:11 1995  Theodore Y. Ts'o  <tytso@localhost>
3302
3303         * llseek.c (ext2_llseek): Added error checking to the llseek()
3304                 compat code to protect against overflow.  This only
3305                 applies to 1.0 and early 1.1 kernels, which don't support
3306                 the llseek() system call.
3307
3308 Thu Nov 24 16:29:00 1994  Theodore Y. Ts'o  (tytso@rt-11)
3309
3310         * unix_io.c (unix_open): Initialize the read_error and write_error
3311                 io_channel pointers to be null.
3312
3313         * bb_inode.c (clear_bad_block_proc): If an illegal block number is
3314                 found, clear it but don't try to update the filesystem
3315                 accounting information, since that's hopeless anyway.
3316
3317         * block.c (bloblock_iterate_ind, bloblock_iterate_dind,
3318         bloblock_iterate_tind): Check to see if the indirect blocks are
3319                 valid before trying to read them.
3320
3321         * ext2_err.et (EXT2_ET_BAD_IND_BLOCK, EX2_ET_BAD_DIND_BLOCK,
3322         EXT2_ET_BAD_TIND_BLOCK): Add new error codes.
3323
3324         * bitops.h (ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
3325         ext2fs_test_block_bitmap, ext2fs_mark_inode_bitmap,
3326         ext2fs_unmark_inode_bitmap, ext2fs_test_inode_bitmap):  If an
3327                 illegal block or inode number is passed in, return instead
3328                 of trying to test, set, or clear the bit.
3329
3330 Mon Nov  7 21:32:33 1994  Remy Card  <card@bbj>
3331
3332         * Makefile: Added a dummy install target in case shared libraries
3333                 are not built.
3334
3335 Mon Oct 24 14:11:44 1994    (tytso@rsx-11)
3336
3337         * bitmaps.c (ext2fs_allocate_block_bitmap): Fix calculation of how
3338                 the real last block of the bitmap should be calculated.
3339
3340 Wed Sep  7 10:05:36 1994    (tytso@rsx-11)
3341
3342         * bitmaps.c (ext2fs_fudge_inode_bitmap_end, 
3343                 ext2fs_fudge_block_bitmap_end, ext2fs_clear_inode_bitmap,
3344                 ext2fs_clear_block_bitmap, ext2fs_free_inode_bitmap,
3345                 ext2fs_free_block_bitmap): Add magic number checking for
3346                 the inode and block bitmaps.
3347
3348         * bitmaps.c (ext2fs_allocate_block_bitmap): Fix to set the correct
3349                 magic number for a block bitmap instead of an inode bitmap.
3350
3351         * inode.c (ext2fs_close_inode_scan, ext2fs_get_next_inode):  Add
3352                 magic number checking for the inode_scan structure.
3353
3354         * badblocks.c (badblocks_list_free, badblocks_list_add, 
3355                 badblocks_list_test, badblocks_list_iterate_begin,
3356                 badblocks_list_iterate, badblocks_list_iterate_end): Add
3357                 magic number checking for the badblocks_list and
3358                 badblocks_iterate structures.
3359
3360         * ext2_err.et (EXT2_ET_MAGIC_UNIX_IO_CHANNEL): 
3361         * unix_io.c (unix_open, unix_close, unix_set_blksize, unix_read_blk,
3362                 unix_write_blk, unix_flush): Add magic number checking
3363                 both for io_channel structure and unix_private_data
3364                 structure.
3365
3366         * openfs.c (ext2fs_open): Add check for io_manager structure's
3367                 magic number.
3368
3369         * rw_bitmaps.c (ext2fs_write_inode_bitmap, ext2fs_write_block_bitmap,
3370                 ext2fs_read_inode_bitmap, ext2fs_read_block_bitmap,
3371                 ext2fs_read_bitmaps, ext2fs_write_bitmaps): 
3372         * read_bb.c (ext2fs_read_bb_inode): 
3373         * read_bb_file.c (ext2fs_read_bb_FILE): 
3374         * newdir.c (ext2fs_new_dir_block): 
3375         * namei.c (ext2fs_dir_iterate, ext2fs_lookup, ext2fs_namei): 
3376         * link.c (ext2fs_link, ext2fs_unlink): 
3377         * inode.c (ext2fs_open_inode_scan, ext2fs_read_inode,
3378                 ext2fs_write_inode, ext2fs_get_blocks, 
3379                 ext2fs_check_directory): 
3380         * get_pathname.c (ext2fs_get_pathname): 
3381         * expanddir.c (ext2fs_expand_dir): 
3382         * block.c (ext2fs_block_iterate): 
3383         * bitmaps.c (ext2fs_allocate_inode_bitmap, 
3384                 ext2fs_allocate_block_bitmap): 
3385         * bb_inode.c (ext2fs_update_bb_inode): 
3386         * alloc.c (ext2fs_new_inode,ext2fs_new_block,ext2fs_get_free_blocks): 
3387         * check_desc.c (ext2fs_check_desc): 
3388         * closefs.c (ext2fs_close, ext2fs_flush): 
3389         * freefs.c (ext2fs_free): Add check for ext2_filsys magic number.
3390
3391         * Makefile:
3392         * ext2fs.h:
3393         * openfs.c:
3394         * check_desc.c (ext2fs_check_desc): Move ext2fs_check_desc from
3395         openfs.c into its own file.
3396
3397         * ext2fs.h (EXT2_CHECK_MAGIC): Added macro for checking for
3398         structure magic numbers.
3399
3400         * closefs.c (ext2fs_flush): Folded in Remy Card's changes to clear
3401         the EXT2_VALID_FS flag in the backup superblock blocks, so that if
3402         someone uses the -b option to specify the use of the backup
3403         superblock --- this usually means that the main superblock is
3404         toast.  :-)
3405
3406         * ext2fs.h: 
3407         * ext2_err.et (EXT2_ET_REV_TOO_HIGH): 
3408         * openfs.c (ext2fs_open): Folded in Remy Card's changes to add a
3409         revision level to the superblock.
3410
3411 Sun Aug 21 00:50:08 1994  Theodore Y. Ts'o  (tytso@rt-11)
3412
3413         * ext2fs.h:
3414         * bitmaps.c:
3415         * bitops.c
3416         * bitops.h:
3417         * openfs.c:
3418         * initialize.c: Completely revamped the inode and block bitmap
3419         structures, so that they can be better chance of being extensible
3420         in a shared library.  They are now their own type, instead of
3421         being a char *.  Also, the function signatures of
3422         ext2fs_test_block_bitmap, ext2fs_mark_block_bitmap,
3423         ext2fs_unmark_block_bitmap, ext2fs_test_inode_bitmap,
3424         ext2fs_mark_inode_bitmap, and ext2fs_unmark_inode_bitmap were
3425         changed to eliminate the ext2_filsys argument, since it is no
3426         longer necessary.
3427
3428 Wed Aug 17 21:46:44 1994  Remy Card  (card@bbj)
3429
3430         * unix_io.c (unix_read_blk and unix_write_blk): use the llseek
3431         system call if available.
3432
3433         * llseek.c: new file.  This is the stub calling the llseek system
3434         call which allows supports for 2GB+ file systems.
3435
3436         * initialize.c (ext2fs_initialize): Ext2fs_initialize now stores
3437         the creator operating system.
3438
3439 Wed Aug 17 10:03:24 1994  Theodore Y. Ts'o  (tytso@rt-11)
3440
3441         * initialize.c (ext2fs_initialize): Ext2fs_initialize now sets up
3442         the group descriptor statistics in addition to everything else.
3443         This relieves mke2fs of the responsibility of doing it.
3444
3445         * bitops.c, bitops.h: Add assembly inline functions for the 68000.
3446         Added a new #define, _EXT2_HAVE_ASM_BITOPS_ to control whether or
3447         not the generic C function equivalents should be included or not.
3448
3449         * openfs.c (ext2fs_open): If a superblock is specified, then use
3450         the backup group descriptors that go along with this superblock,
3451         instead of using the primary group descriptors.  This allows
3452         e2fsck to recover filesystems where the primary group descriptors
3453         have been trashed.
3454
3455