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