1 2003-03-10 Theodore Ts'o <tytso@mit.edu>
3 * fileio.c (ext2fs_file_lseek): Fix bug added when adding 64-bit
4 support; avoid null dereference when ret_pos is NULL.
6 2003-03-06 Theodore Tso <tytso@mit.edu>
8 * ext2_types.h.in: Don't redefine types if other e2fsprogs
9 *_types.h files have been included already.
11 * kernel-jbd.h: Use C99 variadic cpp macros if not using GCC.
12 (Older GCC's don't support the C99 variadic macros.)
14 * flushb.c (ext2fs_sync_device),
15 ismounted.c (ext2fs_check_mount_point): Avoid GCC extension:
16 #warning not supported by Solaris suncc
18 * ext2_ext_attr.h: Avoid GCC extension: 0 length arrays in
19 structure definition. Not needed for now in
22 2003-01-25 Theodore Ts'o <tytso@mit.edu>
24 * dirhash.c: Fix gcc -Wall nits.
26 2003-01-22 Theodore Ts'o <tytso@mit.edu>
28 * unix_io.c (unix_write_blk): Fix up GCC -Wall nits.
30 2003-01-21 Theodore Ts'o <tytso@mit.edu>
32 * fileio.c (ext2fs_file_read, ext2_file_lseek,
33 ext2_file_get_size): Add 64-bit support.
35 * ext2fs.h (EXT2_I_SIZE): Add macro which caluates a 64bit size
36 from i_size and i_size_high.
38 2003-01-19 Theodore Ts'o <tytso@mit.edu>
40 * initialize.c (ext2fs_initialize): If the user specifies a really
41 large number of inodes, then reduce the number of blocks
42 per group until we find a workable set of filesystem
45 * ext2_err.et.in (EXT2_ET_TOO_MANY_INODES): Add new error code.
47 2002-11-09 Theodore Ts'o <tytso@mit.edu>
49 * Release of E2fsprogs 1.32
51 2002-11-09 Theodore Ts'o <tytso@mit.edu>
53 * unix_io.c (find_cached_block, reuse_cache, unix_read_blk,
54 unix_write_blk): Optimize routines so that we don't end up
55 searching the cache twice when a block isn't in the
56 cache. If reads are larger than READ_DIRECT_SIZE, don't
57 let them go through the cache.
59 * unix_io.c (find_cached_block): Fixed bug which caused some clean
60 blocks to be erroneously marked as dirty, so they would
61 get written back to the disk before they are evicted from
62 the cache. Harmless, but it slows down e2fsck
65 2002-11-08 Theodore Ts'o <tytso@mit.edu>
67 * Release of E2fsprogs 1.31
69 2002-11-08 <tytso@snap.thunk.org>
71 * Makefile.in (check): Skip trying to compile test_byteswap
72 if --disable-byteswaap had been given to configure.
74 2002-11-07 <tytso@snap.thunk.org>
76 * closefs.c (write_bgdesc, ext2fs_flush): Fix bug in meta_bg
77 support when the MASTER_SB_ONLY flag is set. Some of
78 the descriptor blocks that should have been written out
81 2002-10-31 Theodore Ts'o <tytso@mit.edu>
83 * Release of E2fsprogs 1.30
85 2002-10-31 Theodore Ts'o <tytso@mit.edu>
87 * ext2_fs.h: Add support for a new inode flag, which is to be used
88 for indicating the top of directory hierarchies for the
89 Orlov block allocator.
91 * ismounted.c (check_mntent, check_mntent_file): Add better
92 support for loopback-mounted filesystems. Check /etc/mtab
93 if /proc/mounts doesn't turn up any mount flags, since
94 /etc/mtab has the loopback image filename, instead of
95 /dev/loop0. Also, check based on st_dev and st_ino, so
96 that if a relative pathname or a pathnames using symbolic
97 links are used, we can detect the the filesystem correctly
98 in those cases. (Addresses Sourceforge bug #619119)
100 * flushb.c (ext2fs_sync_device): If the BLKFLSBUF ioctl succeeds,
101 don't try the FDFLUSH ioctl that was required for floppies
102 with older kernels. This avoids needless whining from the
103 MD device driver. (Addresses Sourceforge bug #545832).
105 * openfs.c (ext2fs_open): Fix bug which caused us to pass the
106 wrong group_block to ext2fs_descriptor_block_loc if we're
107 using the backup superblock/block group descriptors.
108 (ext2fs_descriptor_block_loc): If we're using the backup
109 superblock descriptors, use the backup descriptor block in
110 the next block group.
112 2002-10-30 Theodore Ts'o <tytso@mit.edu>
114 * alloc_tables.c (ext2fs_allocate_group_table): Allocate the inode
115 table so that it buts up against the bitmap blocks, to
116 avoid block fragmentation.
118 * closefs.c (write_bgdesc), initalize.c (ext2fs_initialize): Fix
119 bug; only allocate group descriptor blocks up to
122 2002-10-25 Theodore Ts'o <tytso@mit.edu>
124 * ext2_fs.h: Add a new superblock field, s_mkfs_time, so that we
125 know when a filesystem was created. (Sometimes this can
128 * initialize.c (ext2fs_initialize): Set the s_mkfs_time field.
130 2002-10-20 Theodore Ts'o <tytso@valinux.com>
132 * ext2_fs.h (EXT3_DEFM_JMODE): Add new default mount options for
133 the journal data mode.
135 * closefs.c (ext2fs_flush, write_bgdesc), ext2_fs.h, ext2fs.h,
136 openfs.c (ext2fs_descriptor_block_loc, ext2fs_open), initialize.c
137 (ext2fs_initialize), swapfs.c (ext2fs_swap_super): Add support for
138 the meta_blockgroup filesystem format.
140 2002-10-15 <tytso@snap.thunk.org>
142 * ext2_fs.h: Add new field in superblock for default mount options.
144 2002-10-13 Theodore Ts'o <tytso@mit.edu>
146 * ext2fs.h: Add #include of header files necessary for ext2fs.h to
149 2002-10-02 Theodore Y. Ts'o <tytso@mit.edu>
151 * rw_bitmaps.c (ext2fs_write_block_bitmap,
152 ext2fs_read_block_bitmap): Don't set the CHANGED bit just
153 because the bitmap is getting written to disk. Make
154 ext2fs_swap_bitmap be a static function, since it's not
155 intended to be exported.
157 * swapfs.c (ext2fs_swap_super): Byte-swap the hash seed
159 2001-09-24 Theodore Tso <tytso@mit.edu>
161 * Release of E2fsprogs 1.29
163 2001-08-31 Theodore Tso <tytso@thunk.org>
165 * Release of E2fsprogs 1.28
167 2002-08-31 Theodore Ts'o <tytso@valinux.com>
169 * dblist.c (ext2fs_dblist_sort): New function which allows the
170 caller to pass in a special sort comparison function.
172 2002-08-20 Theodore Ts'o <tytso@mit.edu>
174 * valid_blk.c (ext2fs_inode_has_valid_blocks): Fix bug which
175 failed to accurately characterize non-standard slow
176 symlinks. (Which don't appear in practice on real-life
177 systems, fortunately.)
179 2002-08-17 Theodore Ts'o <tytso@mit.edu>
181 * Makefile.in: Remove inode_io.o from the standard object files,
182 and only build it if debugfs is enabled (it requires
183 fileio.o, which is only built if --disable-debugfs isn't
184 specified to configure).
186 * dirhash.c (ext2fs_dirhash): Change the MD4 hash in a backwards
187 incompatible way so that it is no longer
188 endian-dependent. Add the TEA hash. Allow the seed
189 parameter to be optional.
191 * ext2_fs.h: Remove the HALF_MD4_SEED and HALF_MD4_64 hashes.
192 These features are all now in the HALF_MD4 hash. Add
193 definition for EXT2_HASH_TEA.
195 * ext2fs.h (ext2fs_dirhash): Change function prototype so it takes
196 a pointer instead of an array.
198 2002-08-16 Theodore Ts'o <tytso@mit.edu>
200 * ext2_err.et.in (EXT2_ET_BAD_EA_BLOCK_NUM): New error code
202 * ext2fs.h (ext2fs_inode_data_blocks): New function which returns
203 the number of data blocks used by an inode exclusive of
206 * ext_attr.c (ext2fs_adjust_ea_refcount): New function which
207 adjusts the reference count in an extended attribute block.
209 * valid_blk.c (ext2fs_inode_has_valid_blocks): Add code to
210 correctly deal with extended attribute blocks in symbolic
213 2002-08-13 <tytso@snap.thunk.org>
215 * Makefile.in: Move dupfs.o and test_io.o from the
216 needed-by-debugfs object list to the needed-by-resizer
217 object list. Fixes compile problem if the system is built
218 with only --disable-debugfs.
220 2002-07-29 Theodore Ts'o <tytso@mit.edu>
222 * link.c (ext2fs_link): When adding a new link to a directory,
225 2002-07-23 Theodore Ts'o <tytso@mit.edu>
227 * dirhash.c (ext2fs_dirhash): Fix bug which caused MD4
228 calculations for names > 32 characters to be completely
229 bogus. Changed MD4 calculation to match what is currently
230 being used in the CVS gkernel tree.
232 2002-07-19 Theodore Ts'o <tytso@mit.edu>
234 * ext2_fs.h: Add s_hash_seed and s_def_hash_version to the
235 superblock definition.
237 * badblocks.c, freefs.c, ext2fs.h: Use the badblocks functions to
238 create a set of u32_list functions.
240 * dirhash.c (halfMD4Transform): Shift the hash by one bit,
241 since that's required by the directory indexing code.
243 2002-07-14 Theodore Ts'o <tytso@mit.edu>
245 * ext2fs.h, read_bb_file.c: Change private to priv_data, to avoid
246 using a C++ reserved word.
248 * unix_io.c (unix_open): Only attempt the setrlimit workaround if
249 the kernel version is 2.4.10 -- 2.4.17, since otherwise an
250 old version of glibc (built against 2.2 headers) will
251 interact badly with the workaround to actually cause more
252 problems. I hate it when the glibc folks think they're
253 being smarter than the kernel....
255 2002-06-28 Andreas Dilger <adilger@clusterfs.com>
257 * ext2_fs.h: Add superblock field for reserved group descriptors.
259 2002-06-28 Theodore Ts'o <tytso@mit.edu>
261 * bitops.h: Add #define's for ext2fs_{l,b}e{32,16}_to_cpu and
262 ext2fs_cpu_to_{l,b}e{32,16}
264 2002-06-27 Theodore Ts'o <tytso@mit.edu>
266 * ismounted.c (check_mntent): In AIX 4.3, MOUNTED isn't defined.
267 Add appropriate fallbacks in this case.
269 2002-06-26 Theodore Ts'o <tytso@mit.edu>
271 * dirhash.c (ext2fs_dirhash): Change function signature to support
272 a hash seed, and to return the minor hash (for 64-bit hash
273 support). Add support for the half MD4, half MD4 with
274 seed, and half MD4 with seed and 64 bits.
276 2002-06-15 Theodore Ts'o <tytso@mit.edu>
278 * ext2_fs.h (EXT2_DIRSYNC_FL): Add new file.
280 2002-06-09 Andreas Dilger <adilger@clusterfs.com>
282 * ext2_fs.h: Add macros for maximum block/inode counts:
283 EXT2_INODES_PER_BLOCK, EXT2_MAX_BLOCKS_PER_GROUP,
284 and EXT2_MAX_INODES_PER_GROUP.
286 * openfs.c (ext2fs_open): Check that the number of blocks in a group
287 is less than 2^16, otherwise we need an INCOMPAT flag (not
288 in existence yet, if ever) to open such a filesystem.
290 * initialize.c (ext2fs_initialize): Limit the number of blocks and
291 inodes in a group to less than 2^16.
293 2002-06-09 Andreas Dilger <adilger@clusterfs.com>
295 * ext2_fs.h: Further minor cleanups of the header. Consolidate
296 some checks for __KERNEL__ into one place.
298 2002-05-22 Andreas Dilger <adilger@clusterfs.com>
300 * ext2_fs.h: Remove macros accessing u.ext2_sb field and use
301 the EXT2_SB() macro instead. Remove kernel function
302 prototypes also. This matches the 2.5 kernel, and
303 is also cleaner for other reasons. Whitespace cleanup.
305 2002-05-21 Theodore Ts'o <tytso@mit.edu>
307 * ext2_ext_attr.h: Update to V2 version of the Bestbits format.
309 2002-05-16 Andreas Dilger <adilger@clusterfs.com>
311 * ext2_fs.h: Change limits to support filesystems with 8k blocks.
313 * initialize.c (ext2fs_initialize): Remove assumption that
314 blocksizes are always <= 4k.
316 2002-05-11 Theodore Ts'o <tytso@mit.edu>
318 * bmap.c (ext2fs_bmap): Fix bug which caused ext2fs_bmap to fail
319 silently if inode pointer is NULL (and ext2fs_bmap is
320 expected to read the inode itself).
322 2002-04-27 Theodore Ts'o <tytso@mit.edu>
324 * ismounted.c (check_mntent_file, is_swap_device): Verify that the
325 file we are checking is a block device file before looking
326 at st_rdev, since it's not valid for normal files.
327 (is_swap_device): Move so that it is outside the
328 HAVE_MNTENT_H, so that it is always built.
330 2002-03-11 Theodore Tso <tytso@mit.edu>
332 * dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
333 functions which take an extra flags argument. The flag
334 EXT2_DIRBLOCK_V2_STRUCT will reverse when the name_len
335 field is byte swampped on big-endian machines, since in
336 the V2 structure, name_len is a char field which is
337 doesn't need to be byte swapped --- except if an
338 old-style kernel had byte-swapped the name_len field
339 as part of the V1 structure.
341 * ext2_err.et.in (EXT2_ET_DIRHASH_UNSUPP): New error code
343 * dirhash.c (ext2fs_dirhash): New function which calculates the
344 hash for a filename in an indexed directory.
346 2002-03-08 Theodore Tso <tytso@mit.edu>
348 * Release of E2fsprogs 1.27
350 2002-03-07 Theodore Tso <tytso@mit.edu>
352 * ext2fs.h (ext2fs_inode_io_intern): Add missing function prototype.
354 * bmap.c, fileio.c, inode_io.c, tst_badblocks.c,
355 tst_byteswap.c: Fix gcc -Wall complaints
357 * Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
358 (From Philipp Thomas <pthomas@suse.de>)
360 2002-02-25 Theodore Tso <tytso@mit.edu>
362 * ext2_fs.h: Add structure definitions for the directory indexing
365 2002-02-23 Theodore Tso <tytso@mit.edu>
367 * unix_io.c (unix_open): Fix 2.4 resource limit workaround so that
368 it doesn't break things on mis32, sparc32, and alpha
371 2002-02-21 Theodore Tso <tytso@mit.edu>
373 * ismounted.c (is_swap_device): Fix file descriptor/memory leak;
374 we were missing an fclose().
376 2002-02-20 Theodore Tso <tytso@mit.edu>
378 * Makefile.in, inode_io.c, ext2fs.h, ext2_err.et.in: Add new io
379 abstraction interface which exports an ext2 inode.
381 * ext2fs.h, fileio.c (ext2fs_file_flush): Export ext2fs_file_flush
382 as a public interface. Change void * to const void * in
383 ext2fs_file_write's interface.
385 * test_io.c (test_close), unix_io.c (unix_close): Remove unneeded
386 conditional; save a few bytes.
388 2002-02-12 Theodore Tso <tytso@mit.edu>
390 * Makefile.in (tst_badblocks): Add some extra .o files when
391 linking the debugging program tst_badblocks which are
392 needed if we aren't compiling with inline functions enable.
394 * kernel-list.h (__inline__): On non-gcc and non-Watcom compilers,
395 define away __inline__ since it may not be supported.
397 * kernel-jbd.h (jbd_debug): For systems that don't do STDC, use a
398 stripped down jbd_debug that doesn't use variadic
399 arguments. This will cause warnings under AIX, but things
402 2002-02-03 Theodore Tso <tytso@thunk.org>
404 * Release of E2fsprogs 1.26
406 2002-02-03 Theodore Tso <tytso@mit.edu>
408 * mkdir.c (ext2fs_mkdir): Change to use ext2fs_inode_alloc_stats2
409 so that the number of directories in use is adjusted
412 * alloc_stats.c (ext2fs_inode_alloc_stats2): Add new function
413 which optionally will modify the number of directories
416 2002-01-03 Theodore Tso <tytso@mit.edu>
418 * dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
419 Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
420 which will return deleted directory entries.
421 ext2fs_dir_iterate2 takes a new callback function which
422 is identical with the one used by
423 ext2fs_dblist_dir_iterate(). If the directory entry is
424 deleted, the callback function will be called with the
425 entry paraemter set to DIRENT_DELETED_FILE.
427 * Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
428 ext2fs_block_alloc_stats): New functions which update
429 block/inode allocation statistics in the bitmaps, block
430 group descriptors, and superblock.
432 * mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
433 expanddir.c (expand_dir_proc), bb_inode.c
434 (clear_bad_block_proc, set_bad_block_proc,
435 ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
436 Update to use new block/inode allocation statistics.
438 2001-12-24 Theodore Tso <tytso@mit.edu>
440 * ismounted.c (is_swap_device): New function used by
441 ext2fs_check_if_mounted and ext2fs_check_mount_point which
442 determines whether or not the specified device is a swap
443 device by using /proc/swaps. More bulletproofing for
444 idiotic/careless system administrators!
446 * ext2fs.h, openfs.c (ext2fs_open), initialize.c
447 (ext2fs_initialize), mkdir.c (ext2fs_mkdir): Add a new
448 field to struct_ext2_filsys, umask. This field is
449 initialize to 022, and affects ext2fs_mkdir in the obvious
450 way. (In the future umask should also affect new file
451 creation routines, but the fileio functions don't
452 currently support this yes.)
454 * ismounted.c (check_mntent_file): Stat all of the entries in
455 /etc/mtab and/or /proc/mounts in order to catch dim-witted
456 system administrators who might have created alias
459 2001-12-23 Theodore Tso <tytso@mit.edu>
461 * Makefile.in, jfs_user.h: Move linux/jbd.h to
462 ext2fs/kernel-jbd.h, to avoid using the system header
463 file version of hbd.h when using diet glibc (since it
464 forcibly adds /usr/include to the beginning of the
465 include search path.)
467 * kernel-jbd.h, kernel-list.h, jfs_compat.h: Move files from
468 include/linux directory.
470 2001-12-16 Theodore Tso <tytso@mit.edu>
472 * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap),
473 ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr),
474 fileio.c (ext2fs_file_write): Fix gcc -Wall nits
476 * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
479 2001-12-03 Theodore Tso <tytso@mit.edu>
481 * unix_io.c (unix_open): Make sure the ulimit workaround works
482 regardless of the version of glibc which is used to
485 2001-11-26 Theodore Tso <tytso@mit.edu>
487 * unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
488 trying to unset the filesize limit if at all possible,
489 if a block device is getting opened. (The filesize limit
490 shouldn't be applied against writes to a block device, but
491 starting in 2.4.10, the kernel is doing this.)
493 2001-11-05 Theodore Tso <tytso@mit.edu>
495 * mkjournal.c (ext2fs_add_journal_inode): When creating a .journal
496 file on adding a journal to an already-mounted filesystem,
497 try to clear the ext2 file attributes on an already
498 existing .journal file so that we don't fail if on a
499 partially added journal to the filesystem.
501 * ext2_fs.h: Define a new ext2 file attribute, EXT2_NOTAIL_FL,
502 which signals that a particular inode should not have the
503 last bits of data (the "tail") be merged with another
504 file. This is necessary to keep LILO happy.
506 2001-09-20 Theodore Tso <tytso@thunk.org>
508 * Release of E2fsprogs 1.25
510 2001-09-16 Theodore Tso <tytso@mit.edu>
512 * ext2_ext_attr.h: Remove unneeded #include of <linux/config.h>
513 which was breaking the build on the Hurd. (Addresses
516 2001-09-13 Theodore Ts'o <tytso@mit.edu>
518 * ismounted.c (check_mntent_file): We now validate the entry in
519 /etc/mtab to make sure the filesystem is really mounted,
520 since some broken distributions (read: Slackware) have
521 buggy boot scripts that don't initialize /etc/mtab before
522 checking non-root filesystems. (Slackware also doesn't
523 check the root filesystem separately, and reboot if the
524 root filesystem had changes applied to it, which is
525 dangerous and broken.)
527 2001-09-02 Theodore Tso <tytso@thunk.org>
529 * Release of E2fsprogs 1.24a
531 2001-08-30 Theodore Tso <tytso@thunk.org>
533 * Release of E2fsprogs 1.24
535 2001-08-30 Theodore Tso <tytso@valinux.com>
537 * getsize.c (ext2fs_get_device_size): Back out BLKGETSIZE64
538 changes, since the ioctl number has been reused by another
541 2001-08-15 Theodore Tso <tytso@valinux.com>
543 * Release of E2fsprogs 1.23
545 2001-08-05 Theodore Tso <tytso@valinux.com>
547 * alloc.c (ext2fs_new_inode, ext2fs_new_block): Use the fast
548 version of the bitmap test routines to speed up these
549 routines. (At some point I may want to make these
550 routines use the find_first_bit functions, but that will
551 add a lot of complexity since it means that these
552 functions will have to break the bitmap abstraction
553 boundary. It's not clear it's worth it.)
555 * mkjournal.c (mkjournal_proc): Remember the last block allocated
556 to speed up ext2fs_new_block().
558 2001-07-29 Theodore Tso <tytso@valinux.com>
560 * finddev.c (scan_dir): Fix memory leak; we weren't calling
561 closedir() when exiting the function in all cases.
563 2001-07-27 Theodore Tso <tytso@valinux.com>
565 * mkjournal.c (ext2fs_create_journal_superblock): Set the first
566 block usable in the journal for external journals to be 2
567 or 3, depending on the blocksize, so that the existing
568 kernel code does the right thing.
570 * getsize.c (ext2fs_get_device_size): Add support for the
571 BLKGETSIZE64 ioctl. (Ioctl defined by unofficial patches
572 from Ben LaHaise, but it's likely this interface won't
575 * mkjournal.c (ext2fs_add_journal_device): Use the correct block
576 when writing the journal superblock, too. (Oops! Needed
577 to make 1k filesystems with external journal to work.)
579 2001-07-26 Theodore Tso <tytso@valinux.com>
581 * mkjournal.c (ext2fs_add_journal_device): Use the correct block
582 to find the journal superblock if the blocksize is 1024.
584 2001-07-21 Theodore Tso <tytso@valinux.com>
586 * ext2_err.et.in (EXT2_ET_LOAD_EXT_JOURNAL): Add new error code
588 2001-07-20 Theodore Tso <tytso@valinux.com>
590 * ext_attr.c (ext2fs_write_ext_attr): When writing the extended
591 attribute block, set the filesystem changed bit.
593 * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
594 Comment out these functions since we're not using them.
596 2001-07-10 Theodore Tso <tytso@valinux.com>
598 * closefs.c (write_primary_superblock): After writing changes to
599 the primary superblock, update the original superblock
600 copy so we don't have to re-write those changes in the
602 (ext2fs_flush): Clear the superblock dirty flag after
603 we've flushed out changes to disk.
605 2001-07-07 Theodore Tso <tytso@valinux.com>
607 * bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx
608 to avoid register conflicts when compiling in PIC mode.
610 2001-07-04 Theodore Tso <tytso@valinux.com>
612 * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
613 Add new functions (C and in i386 assembler) which quickly
614 find bits set in a bitmask.
616 2001-06-23 Theodore Tso <tytso@valinux.com>
618 * Makefile.in, ext_attr.c, ext2_attr.c, ext2fs.h: Add new files
619 ext2_ext_attr.h and ext_attr.c for extended attributes
622 * Release of E2fsprogs 1.22
624 2001-06-22 Theodore Tso <tytso@valinux.com>
626 * mkjournal.c (ext2fs_add_journal_inode): Move close of file
627 descriptor so that adding a journal to a mounted
628 filesystem doesn't die. (Fixes a bug accidentally
629 introduced in e2fsprogs 1.21.)
631 * mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
632 HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
633 fchflags without defining UF_NODUMP. (Addresses Debian
636 * flushb.c: Use platform independent method of defining the
637 BLKFLSBUF and FDFLUSH ioctl's. Also include sys/mount.h
638 since on newer glibc's BLKFLSBUF is defined there.
640 * bitops.h: The C language versions of ext2fs_swab16/32 need to be
641 included if EXT2FS_ENABLE_SWAPFS is defined, since we need
642 to support byte swapping even if we don't support the
643 conversion functions. (Fixes Debian bug #101686).
645 * dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2
646 since the byte-swapping code all assumes the
647 ext2_dir_entry structure. (It's a question of whether or
648 not name_len should be byte-swapped or not, and whether
649 it's a 16 bit or 8 bit field.)
651 2001-06-15 Theodore Tso <tytso@valinux.com>
653 * Release of E2fsprogs 1.21
655 2001-06-15 Theodore Tso <tytso@valinux.com>
657 * Makefile.in: Fix bug in installation of ext2_types.h. It is a
658 file which is generated and is therefore found in the
659 build directory, not source directory.
661 * ismounted.c (check_mntent_file): Use a test file in / to check
662 to see if the root filesystem is mounted read-only. This
663 protects against the case where /etc might not be on /, as
664 well as the case where /etc/mtab doesn't exist. (Both are
665 should-never happen scenarios, but you never know...)
667 2001-06-14 Theodore Tso <tytso@valinux.com>
669 * ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.
670 Remove unneeded #pragma argsused, since the arguments are
673 2001-06-13 Theodore Tso <tytso@valinux.com>
675 * ext2_types.h.in: If linux/types.h has been defined, then don't
676 try to redefine the typedefs.
678 * Makefile.in (HFILES): Add ext2_types.h to the list of files
679 which should be installed.
681 * ismounted.c (check_mntent_file): Work around GNU hurd brain
682 damage. Addresses Debian bug #100304.
684 * Makefile.in: Limit some .o files from being included into the
685 library if --disable-debugfs, --disable-swapfs,
686 --disable-imager, or --disable-resizer are used.
688 2001-06-12 Theodore Tso <tytso@valinux.com>
690 * inode.c, tst_iscan.c: Stop using the compatibility badblocks
691 function, and use the ext2fs_badblocks_* functions
694 2001-06-11 Theodore Tso <tytso@valinux.com>
696 * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
697 ext2fs_mark_generic_bitmap and
698 ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal
699 functions. (This saves space and doesn't significantly
700 change the speed of e2fsck on a P-III.)
702 * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c,
703 inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only
704 include the byte-swapping logic if ENABLE_SWAPFS is turned
705 on or if we're on a big-endian machine.
707 * initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to
708 set EXT2_FLAG_SWAP_BYTES, instead of using
711 * native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
712 autoconf to determine whether or not return
713 EXT2_FLAG_SWAP_BYTES.
715 2001-06-10 Theodore Tso <tytso@valinux.com>
717 * Makefile.in: Remove the dependence on the libe2p library.
719 * mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags
720 with direct usage of the ioctl/fchflags so that we don't
721 have to depend on the libe2p library.
723 2001-06-08 Theodore Tso <tytso@valinux.com>
725 * ext2_types.h.in: Use unsigned ints in favor of unsigned longs
726 when trying to find a 32-bit wide type.
728 * icount.c (insert_icount_el): Fix the code used to estimate the
729 size of the new icount array to be more intelligent, to
730 avoid reallocating the array too many times. Thanks to
731 Enrique Perez-Terron for pointing this out.
733 2001-06-02 Theodore Tso <tytso@valinux.com>
735 * valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks
736 for a symlink to determine whether it is a fast symlink.
738 2001-06-01 Theodore Tso <tytso@valinux.com>
740 * Makefile.in, dosio.c, ext2_fs.h, ext2_types.h.in, ext2fs.h:
741 Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in.
743 2001-05-25 Theodore Tso <tytso@valinux.com>
745 * Release of E2fsprogs 1.20
747 2001-05-25 Theodore Tso <tytso@valinux.com>
749 * ismounted.c: More cleanups for ismounted.c, some from Andreas,
750 some to clean up Andreas's patches. Use strncpy instead
751 of strcpy to save the root's mountpoint. Clean up #ifdef
752 structure. Remove uneeded variable in testing/debug driver.
754 2001-05-24 Andreas Dilger <adilger@turbolinux.com>
756 * ismounted.c: Add check for root device which doesn't depend on
757 /etc/fstab or /proc/mounts to be correct. Don't call
758 endmntent() before we are done with mnt struct.
760 2001-05-23 Theodore Tso <tytso@valinux.com>
762 * ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error
765 2001-05-21 Theodore Tso <tytso@valinux.com>
767 * ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to
768 make room for pre-existing usage of
769 EXT2_FEATURE_COMPAT_EXT_ATTR. Add flag EXT2_INDEX_FL with
770 the same codepoint as EXT2_BTREE_FL.
772 2001-05-20 Theodore Tso <tytso@valinux.com>
774 * ext2fs.h: #include <> instead of "" for ext2fs and et header
775 files, since they will be installed in /usr/include
777 2001-05-14 Theodore Tso <tytso@valinux.com>
779 * alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
780 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
781 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
782 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
783 expanddir.c, ext2_fs.h, fileio.c, finddev.c, flushb.c,
784 freefs.c, get_pathname.c, getsize.c, icount.c, imager.c,
785 initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
786 link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c,
787 newdir.c, nt_io.c, openfs.c, read_bb.c, read_bb_file.c,
788 rs_bitmap.c, rw_bitmaps.c, swapfs.c, test_io.c,
789 tst_badblocks.c, tst_byteswap.c, tst_getsize.c,
790 tst_iscan.c, unix_io.c, unlink.c, valid_blk.c, version.c,
791 write_bb_file.c, ext2_fs.h: Moved file from include/linux.
792 Adjust all files in this directroy to include this file.
794 * mkjournal.c (ext2fs_create_journal_superblock): Remove redundant
797 2001-05-05 Theodore Tso <tytso@valinux.com>
799 * fileio.c (ext2fs_file_read): Factored out common code and
800 cleaned up function. Fixed a bug where if there was an
801 error reading from the disk, the number of bytes read
802 wasn't reliably set. (Fixes Debian bug #79163)
803 (ext2fs_file_write): Factored out common code and made
804 function more efficient; if writing a full block, don't
805 bother to do a read-modify-write cycle.
807 2001-05-04 Theodore Tso <tytso@valinux.com>
809 * dirblock.c (ext2fs_read_dir_block): Check for an directory
810 record length which isn't a multiple four, and treat that
811 as an invalid. Scan the directory and return an error
812 (EXT2_ET_DIR_CORRUPTED) if the directory records are
814 (ext2fs_write_dir_block): If while byte-swapping the
815 directory block, if there's an error, abort and return
816 EXT2_ET_DIR_CORRUPTED.
818 2001-05-02 Theodore Tso <tytso@valinux.com>
820 * ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add
821 image_header field in the ext2_filsys structure
823 * block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind):
824 * inode.c (ext2fs_read_inode):
825 * rw_bitmaps.c (read_bitmaps):
826 * openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
828 * imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make
829 sure the full bitmap is saved.
831 2001-05-01 Theodore Tso <tytso@valinux.com>
833 * e2image.h (struct ext2_image_hdr): Add space for the device name
836 * dir_iterate.c (ext2fs_process_dir_block): Add a double-check to
837 make sure the rec_len is a multiple of 4, to prevent
838 bus-errors on architectures which care about mis-aligned
841 2001-04-25 Theodore Tso <tytso@valinux.com>
843 * getsize.c (ext2fs_get_device_size): Use an unsigned long to
844 query the device sizes using the BLKGETSIZE ioctl.
846 2001-04-16 Theodore Tso <tytso@valinux.com>
848 * ismounted.c (check_mntent): Check /proc/mounts on Linux systems
849 before checking /etc/mtab. The EXT2_MF_READONLY flag is
850 now set from the /etc/mtab options field for all
851 filesystems, not just the root filesystem. Add debugging
852 code to make it easier to test ext2fs_check_if_mounted().
854 * mkjournal.c (ext2fs_create_journal_superblock): Add safety
855 check; return an error if there's an attempt to create a
856 journal less than 1024 filesystem blocks.
858 * ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
859 EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
861 2001-02-20 Theodore Tso <tytso@valinux.com>
863 * bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly
866 * tst_byteswap.c: New function to test the byteswap functions.
867 Add to regression test suite.
869 2001-02-08 Theodore Tso <tytso@valinux.com>
871 * e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
873 2001-02-07 Theodore Tso <tytso@valinux.com>
875 * mkjournal.c (ext2fs_create_journal_superblock): Fix the setting
876 of s_first for external devices to always be 1, since
877 jsb->s_first is always relative to the start of the
878 journal superblock. Use htonl(1) when setting s_nr_users.
880 2001-01-17 Theodore Ts'o <tytso@valinux.com>
882 * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
883 device number of the filesystem (instead of the journal)
884 was being dropped into s_journal_dev.
886 2001-01-15 Theodore Ts'o <tytso@valinux.com>
888 * initialize.c (ext2fs_initialize): Add support for initializing
889 the ext2 superblock for external journal devices. This
890 basically means we don't bother to allocate any block
893 * openfs.c (ext2fs_open): Only open external journal devices if
894 the new flag EXT2_FLAG_JOURNAL_DEV_OK is passed to
895 ext2fs_open. When opening such devices, don't try to read
896 the block group descriptors, since they're not there.
898 * ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code
900 * mkjournal.c: Export a new function,
901 ext2fs_create_journal_superblock(), which allocates and
902 returns a buffer containing a journal superblock. This is
903 needed by mke2fs to create an external journal. Rewrote
904 ext2fs_add_journal_device() so that it no longer creates
905 the external journal, but rather adds a filesystem to an
906 existing external journal. It handles all of the UUID
909 * ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported
910 by the library. Define the EXT2_FLAG_JOURNAL_DEV_OK.
911 Changed function prototype for ext2fs_add_journal_device().
913 2001-01-14 Theodore Ts'o <tytso@valinux.com>
915 * closefs.c (ext2fs_flush): Don't write out anything beyond the
916 primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is
919 2001-01-12 Theodore Ts'o <tytso@valinux.com>
921 * imager.c: Fix gcc -Wall complaints and a series of bugs where
922 retval wasn't set correctly. (Thanks to Andreas Dilger
923 for pointing this out.)
925 2001-01-11 <tytso@snap.thunk.org>
927 * flushb.c (ext2fs_sync_device): New function which centralizes
928 all of the places which might try to use the BLKFLSBUF
929 or FDFLUSH ioctls (and usually failing to define them
930 since the system header files don't usually do this for
931 us, and we're trying to avoid usage of kernel include
934 2001-01-10 <tytso@snap.thunk.org>
936 * alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c,
937 bmove.c, brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c,
938 dir_iterate.c, expanddir.c, ext2fs.h, ext2fsP.h, fileio.c,
939 finddev.c, get_pathname.c, icount.c, inode.c, irel.h,
940 irel_ma.c, ismounted.c, link.c, lookup.c, mkdir.c,
941 mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
942 tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to
943 ext2_ino_t, to protect applications that attempt to
944 compile -D_FILE_OFFSET_BITS=64, since this inexplicably
945 changes ino_t(!?). So we use ext2_ino_t to avoid an
946 unexpected ABI change.
948 2001-01-05 <tytso@snap.thunk.org>
950 * dirblock.c (ext2fs_read_dir_block): Fix a potential case where
951 we may overrun allocated memory in case of a corrupted
952 filesystem (or an e2fsck test case :-) when byte-swapping
955 * ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
957 * mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
958 complaints including a missing return 0 at the end of
959 ext2fs_add_journal_device.
961 2001-01-03 <tytso@snap.thunk.org>
963 * Makefile.in: Link in libe2p when creating libext2fs as a shared
964 library, since mkjournal.c now references fsetflags().
966 * mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas
967 Dilger's changes (with fixups) to allow on-line creation
970 * ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
971 EXT2_FLAG_SUPER_ONLY, which the close routines to only
972 update the superblock, and not the group descriptors.
974 2000-12-30 Andreas Dilger <adilger@turbolinux.com>
976 * ismounted.c: add ext2fs_check_mount_point() function, which will
977 optionally return the mount point of a device if mounted
979 2000-12-14 Andreas Dilger <adilger@turbolinux.com>
981 * mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
982 ext2fs_add_journal_inode()
984 2001-01-01 <tytso@snap.thunk.org>
986 * ext2fs.h: Remove definition of ext2fs_sb. Note: this may break
987 source (but not binary) compatibility of some users of the
988 ext2 library. They should just simply do a global search
989 and replace of struct ext2fs_sb with struct
990 ext2_super_block, and use their own private copy of
991 ext2_fs.h if they aren't already.
993 * closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c:
994 Replace use of ext2fs_sb with ext2_super_block.
996 2000-12-31 <tytso@snap.thunk.org>
998 * ext2fs.h: Cleaned up header file by removing definitions of
999 feature flags that might not have been defined in older
1000 ext2 header files. Now that we're using our own
1001 include/linux/ext2fs.h header file, this can never happen.
1003 * jfs_dat.h: Removed old header file which is no longer needed.
1005 2000-12-13 Theodore Ts'o <tytso@valinux.com>
1007 * closefs.c (ext2fs_update_dynamic_rev): New function suggested
1008 by Andreas Dilger to update the filesystem revision to
1011 * swapfs.c (ext2fs_swap_super): Add byte swapping for the journal
1014 2000-12-09 <tytso@snap.thunk.org>
1016 * ext2fs.h, mkjournal.c (ext2fs_add_journal_inode,
1017 ext2fs_add_journal_device): Add a new argument to the APIs
1018 of these function, which is a flags word. This is used to
1019 allow the creation of a V1 superblock for those folks who
1020 are using ext3 0.3b in production. Note, the user-land
1021 interface for getting at this flag won't be documented, as
1022 the V1 superblock is deprecated.
1024 * mkjournal.c (init_journal_superblock): Sync Stephen's changes
1025 which creates a V2 superblock instead of a V1 superblock.
1027 2000-11-21 <tytso@snap.thunk.org>
1029 * test_io.c (test_write_blk, test_write_byte): Fix typos pointed
1030 out by Andreas Dilger.
1032 2000-11-05 <tytso@snap.thunk.org>
1034 * imager.c (ext2fs_image_{inode,super,bitmap}_{read,write},
1035 ext2_fs.h, Makefile.in: New file that has routines that
1036 save ext2fs metadata to a file.
1038 * ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
1040 * e2image.h: New file which defines the file format for the ext2
1041 image file. (Saved copy of ext2 metadata to a file as a
1042 saving throw against worst-case damage.)
1044 2000-11-01 <tytso@snap.thunk.org>
1046 * inode.c (ext2fs_flush_icache): Add new function
1047 ext2fs_flush_icache() which flushes the internal inode
1048 cache. Applications which modify the inode table blocks
1049 directly must call this function.
1051 2000-10-26 <tytso@snap.thunk.org>
1053 * mkjournal.c: Add #include of netinet/in.h, since Solaris
1054 requires it for ntohl().
1056 * ext2_io.h (io_channel_write_byte): Add new interface to allow
1057 callers to write specific byte ranges. This is an
1058 optional interface, which not all IO channels may
1061 * unix_io.c (unix_write_byte):
1062 * test_io.c (test_write_byte): Add implementation of the
1063 write_byte function.
1065 * closefs.c (write_primary_superblock, ext2fs_flush): Add a new
1066 function which writes the primary superblock. If the IO
1067 channel supports writing raw bytes directly, only fields
1068 which were modified are written to the disk. This makes
1069 it safe(r) to use utilities like tune2fs on a mounted
1072 * freefs.c (ext2fs_free): Free the original superblock if it is
1075 * openfs.c (ext2fs_open): Store a copy of the original superblock
1078 * ext2fs.h: Add a field to store the original superblock in the
1079 ext2 context structure.
1081 2000-10-24 <tytso@snap.thunk.org>
1083 * llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we
1084 don't need to use llseek).
1086 2000-10-24 <tytso@valinux.com>
1088 * Makefile.in, ext2fs.h, jfs_dat.h, mkjournal.c: Add functions for
1089 creating an ext3 journal on a filesystem.
1091 2000-08-21 <tytso@valinux.com>
1093 * ext2_err.et.in (EXT2_JOURNAL_NOT_BLOCK): Add new error code.
1095 2000-08-22 <tytso@valinux.com>
1097 * unix_io.c: Make massive changes to support a multiple block
1098 writethrough cacheing.
1100 * ext2_io.h: Added flags field to the io_channel structure.
1102 2000-08-19 <tytso@valinux.com>
1104 * finddev.c, ext2fs.h, Makefile.in: Add new file, finddev.c, which
1105 provides the function ext2fs_find_block_device(). This
1106 function returns the pathname to a block device, given its
1109 2000-07-13 <tytso@valinux.com>
1111 * Release of E2fsprogs 1.19
1113 2000-07-07 Theodore Ts'o <tytso@valinux.com>
1115 * ext2fs.h (EXT2_LIB_FEATURE_INCOMPAT_SUPP): Add
1116 EXT3_FEATURE_INCOMPAT_RECOVER (aka needs_recovery) to the
1117 list of filesystem flags supported by the library.
1119 2000-07-04 Theodore Ts'o <tytso@valinux.com>
1121 * ext2fs.h: Update to include latest journalling additions to the
1124 * dll/jump.funcs: Add new jumptable entries for
1125 ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
1126 ext2fs_badblocks_equal.
1128 * tst_badblocks.c: Update test program to test
1129 ext2fs_read_bb_FILE2 and ext2fs_write_FILE.
1131 * write_bb_file.c (ext2fs_write_bb_FILE): New function which
1132 writes out bad blocks list to a file.
1134 * read_bb_file.c (ext2fs_read_bb_FILE2): Add new function which
1135 changes the callback function to take two additional
1136 arguments; a private blind pointer supplied by the caller,
1137 and pointer to a char * containing a pointer to the
1140 * badblocks.c (ext2fs_badblocks_equal): Add new function which
1141 returns true if two badblocks list are equal.
1143 * Makefile.in: Remove explicit link of -lc in the shared library.
1144 (It shouldn't be necessary, and is harmful in some cases).
1146 2000-06-10 Theodore Ts'o <tytso@valinux.com>
1148 * getsize.c (main): Add debugging code under #ifdef DEBUG
1150 2000-05-27 Theodore Ts'o <tytso@valinux.com>
1152 * mkdir.c (ext2fs_mkdir): Read the parent directory's inode
1153 earlier, so that if there's an error reading it, we can
1154 more cleanly back out of the operation.
1156 2000-05-25 <tytso@snap.thunk.org>
1158 * getsize.c (ext2fs_get_device_size): Use open64() instead of
1159 open() if it exists. Under linux, manually define the
1160 ioctl for BLKGETSIZE if it isn't already defined and it's
1163 * unix_io.c (unix_open): Use open64() instead of open() if it
1166 * llseek.c: Simplify header includes of unistd.h. If lseek64 is
1167 available (and prototypes are defined) use it in
1168 preference to llseek.
1170 * Makefile: Add hack dependency rule so that parallel makes work
1173 2000-05-18 Theodore Ts'o <tytso@valinux.com>
1175 * ext2fs.h: Add appropriate ifdef's to support C++ compilation.
1177 2000-04-03 Theodore Ts'o <tytso@valinux.com>
1179 * block.c: Readibility tweak in conditionals involving
1182 * ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine
1183 how to define __s64 and __u64. Turn off "compression is
1184 experimental" warning if the cpp macro
1185 I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is defined.
1187 2000-02-11 <tytso@snap.thunk.org>
1189 * ext2fs.h: Define EXT2FS_COMPRESSED_BLKADDR and HOLE_BLKADDR.
1190 Conditionally include Compression as a supported type if
1191 ENABLE_COMPRESSION (via --enable-compression) is turned on.
1193 * swapfs.c (ext2fs_swap_super): Swap the compression usage bitmap.
1195 2000-02-08 <tytso@snap.thunk.org>
1197 * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
1198 ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
1199 ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap):
1200 Change to return the previous state of the bit that is
1201 being marked or unmarked. For speed optimization.
1203 2000-02-02 Theodore Ts'o <tytso@valinux.com>
1205 * getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
1207 * swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not
1208 needed any more; we know it will always be i_generation.
1209 Add support for swapping the high bits of the uid and gid.
1211 1999-11-19 <tytso@valinux.com>
1213 * mkdir.c (ext2fs_mkdir): Only update the parent's inode link
1214 counts if the link was successful. Patch suggested by
1217 * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
1218 the source directory.
1220 1999-11-10 <tytso@valinux.com>
1222 * Release of E2fsprogs 1.18
1224 1999-11-08 <tytso@valinux.com>
1226 * Makefile.in (tst_badblocks): Add freefs.o to the object list,
1227 since ext2fs_badblocks_list_free was moved to freefs.c.
1229 * tst_badblocks.c: Use the newer badblocks API names. Add
1230 duplicate blocks to the test inputs to test dealing with
1231 adding blocks which are already in the badblocks list.
1233 * badblocks.c (ext2fs_badblocks_list_add): If appending to the end
1234 of the list, use a shortcut O(1) operations instead of an
1235 O(n) operation. (Idea suggested by David Beattie.)
1237 * freefs.c (ext2fs_free): Use ext2fs_badblocks_list_free() instead
1238 of badblocks_list_free(), to save a procedure call.
1240 1999-10-26 <tytso@valinux.com>
1242 * Release of E2fsprogs 1.17
1244 1999-10-26 <tytso@valinux.com>
1246 * ext2fs.h: Add kludge to deal with the fact that egcs cpp doesn't
1247 seem to handle ~0UL the same way as they used to.
1249 1999-10-25 <tytso@valinux.com>
1251 * nt_io.c (_OpenNtName): Open the device using
1252 FILE_SYNCHRONOUS_IO_NONALERT instead of
1253 FILE_SYNCHRONOUS_IO_ALERT
1254 (nt_open): At the end of the device open routine, unlock
1255 the drive but do not dismount it.
1257 * initialize.c (CREATOR_OS): Use __GNU__ instead of __gnu__ to
1260 1999-10-22 <tytso@valinux.com>
1262 * Release of E2fsprogs 1.16
1264 1999-10-22 <tytso@valinux.com>
1266 * mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link().
1268 * link.c (ext2fs_link): This call now uses the low three bits of
1269 the flags parameter to pass the directory filetype
1270 information; it will set the directory entry FILETYPE
1271 information if the filesystem supports it.
1273 * newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock
1274 option is set, then create the '.' and '..' entries with
1275 the filetype set to EXT2_FT_DIR.
1277 1999-09-24 <tytso@valinux.com>
1279 * nt_io.c: New file which supports I/O under Windows NT.
1281 1999-09-07 <tytso@valinux.com>
1283 * ext2fs.h: Add new fields for journalling and define new
1284 feature bits used by newer filesystems: IMAGIC_INODES,
1285 HAS_JOURNAL, RECOVER.
1287 * expanddir.c (ext2fs_expand_dir, expand_dir_proc): Change where
1288 we update the inode block count and size files so that the
1289 block count field is updated correctly when we create an
1292 1999-07-18 Theodore Ts'o <tytso@valinux.com>
1294 * Release of E2fsprogs 1.15
1296 1999-06-23 <tytso@valinux.com>
1298 * swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3
1299 kernels that use i_generation instead of i_version. Patch
1300 supplied by Jon Bright <sircus@sircus.demon.co.uk>.
1302 1999-06-21 <tytso@valinux.com>
1304 * dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
1305 directory entry before calling the callback function.
1306 This should prevent some core dumps of insufficiently
1307 paranoid callback functions.
1309 1999-05-29 <tytso@rsts-11.mit.edu>
1311 * ext2fs.h: Add feature definition for AFS IMAGIC inodes.
1313 * fileio.c (ext2fs_file_open): Remove obsolete comment stating
1314 that we don't handle writing yet (we do). Fixed bug where
1315 we weren't allocating a big enough buffer for ext2_bmap.
1317 1999-05-03 <tytso@rsts-11.mit.edu>
1319 * openfs.c (ext2fs_open): Check to make sure that the number of
1320 blocks per group is not zero --- if so, it must be a bad
1323 1999-01-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
1325 * Release of E2fsprogs 1.14
1327 1999-01-07 Theodore Ts'o <tytso@rsts-11.mit.edu>
1329 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if
1330 the inode number is zero; if it's zero, return
1331 EXT2_ET_BAD_INODE_NUM.
1333 1998-12-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
1335 * initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead
1336 of EXT2_FIRST_INO to ensure compatibility with Linux 1.2
1339 Mon Jan 4 02:32:09 1999 Theodore Y. Ts'o <tytso@mit.edu>
1341 * llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the
1342 non-Linux case to use EINVAL by default, unless it isn't
1343 defined, in which case we use EXT2_ET_INVALID_ARGUMENT
1346 1998-12-15 Theodore Ts'o <tytso@rsts-11.mit.edu>
1348 * Release of E2fsprogs 1.13
1350 1998-12-03 Theodore Ts'o <tytso@rsts-11.mit.edu>
1352 * Makefile.in: Updated dependencies.
1354 1998-09-22 Theodore Ts'o <tytso@rsts-11.mit.edu>
1356 * initialize.c (ext2fs_initialize): Make sure that we allocate
1357 enough inodes so that we can make a valid filesystem.
1359 1998-09-02 Theodore Ts'o <tytso@rsts-11.mit.edu>
1361 * rw_bitmaps.c: Fixed signed/unsigned warnings.
1363 * fileio.c (ext2fs_file_set_size): Remove unneeded extern from the
1364 function declaration.
1366 * dblist.c (make_dblist): Add safety check in case the dblist
1367 pointer passed in is null (in which case, assign it to
1368 fs->dblist). Fixed some signed/unsigned warnings.
1370 * bmap.c: Make addr_per_block be of type blk_t to avoid
1371 signed/unsigned warnings.
1373 * namei.c (ext2fs_follow_link): Remove uneeded extern from the
1374 function declaration.
1376 * get_pathname.c (get_pathname_proc): Use return value from
1377 ext2fs_get_mem, instead of checking if &gp->name is
1380 * dir_iterate.c (ext2fs_process_dir_block):
1381 * dblist_dir.c (ext2fs_dblist_dir_iterate): Remove uneeded extern
1382 from the function declaration.
1384 * block.c (ext2fs_block_iterate2): If the read_inode call fails,
1385 return the error directly instead of jumping to the
1386 cleanup routine, since we don't need to do any cleanup.
1388 * alloc_table.c (ext2fs_allocate_group_table): Make this
1389 function take a dgrp_t for its group argument.
1391 * ext2fs.h: Make dgrp_t an __u32 type, and make
1392 fs->desc_group_count be of type dgrp_t.
1394 1998-07-27 Theodore Ts'o <tytso@rsts-11.mit.edu>
1396 * badblocks.c (ext2fs_badblocks_list_add): Use a bigger increment
1397 than 10 blocks when we need to expand the size of the
1400 1998-07-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
1402 * Release of E2fsprogs 1.12
1404 1998-06-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
1406 * closefs.c (ext2fs_flush): Update the s_block_group_nr field as
1407 appropriate for all of the block group copies, so that
1408 it's clear where the beginning of the filesystem is on the
1409 disk. (For when the partition table gets scrod.)
1411 * ext2fs.h: Change the name of the feature from
1412 EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE to
1413 EXT2_FEATURE_INCOMPAT_FILESIZE (to match with the kernel).
1415 1998-06-18 Theodore Ts'o <tytso@rsts-11.mit.edu>
1417 * inode.c (get_next_blockgroup): Fix bug where if
1418 get_next_blockgroup() is called early because of a missing
1419 inode table in a block group, the current_inode counter
1420 wasn't incremented correctly.
1422 1998-06-16 Theodore Ts'o <tytso@rsts-11.mit.edu>
1424 * read_bb.c (ext2fs_read_bb_inode): Make function more robust
1425 against a completely trashed bad block inode.
1427 1998-06-10 Theodore Ts'o <tytso@rsts-11.mit.edu>
1429 * alloc_tables.c (ext2fs_allocate_group_table): Fix bug so that if
1430 the stride length hits a bad value, we retry the block
1431 allocation starting at the beginning of the block group.
1433 * ext2fs.h, bb_inode.c, block.c, bmove.c, dir_iterate.c,
1434 expanddir.c, ext2fsP.h, read_bb.c: Change blkcnt_t to be
1435 e2_blkcnt_t to avoid collision with LFS API.
1437 1998-05-01 Theodore Ts'o <tytso@rsts-11.mit.edu>
1439 * initialize.c (ext2fs_initialize): Initialize s_inodes_count in a
1440 way that avoids overflows on disk sizes greater than 4GB.
1442 1998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
1444 * ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the
1445 return type for comparison functions for qsort.
1447 * dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function
1450 1998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
1452 * ext2fs.h, bitops.h: Add support for the Watcom C compiler to do
1455 * ext2fs.h, dosio.c: Use asm/types.h instead of linux/types.h to
1456 evade a potential problem with glibc's header files trying
1457 to spike out linux/types.h.
1459 * ext2fs.h (ext2fs_resize_mem): Change the function prototype to
1460 include the old size of the memory, which is needed for
1461 some braindamaged memory allocation systems that don't
1464 * badblocks.c (ext2fs_badblocks_list_add):
1465 bb_inode.c (clear_bad_block_proc):
1466 dblist.c (ext2fs_add_dir_block):
1467 icount.c (insert_icount_el):
1468 irel_ma.c (ima_put):
1469 rs_bitmap.c (ext2fs_resize_generic_bitmap): Update functions to
1470 pass the old size of the memory to be resized to
1471 ext2fs_resize_mem().
1473 1998-03-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
1475 * Makefile.in: Change to use new installation directory variables
1476 convention. Fix uninstall rules to take $(DESTDIR) into
1479 1998-03-29 Theodore Ts'o <tytso@rsts-11.mit.edu>
1481 * ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform
1482 with 32 bit longs, then we need to manually define __s64
1483 and __u64, since the current kernel header files don't
1484 define these if __STRICT_ANSI__ is defined. This is a
1485 problem if we are compiling with full GCC warnings, since
1486 we do need 64 bit support.
1488 * Makefile.in (OBJS): Remove bmove.o from files to be built,
1489 since we're not using ext2fs_move_blocks() and there
1490 is some question as to its usefulness in its current
1493 * bmap.c (block_bmap): Remove unused function.
1495 * bmove.c (process_block): Fix -Wall warning.
1497 1998-03-23 Theodore Ts'o <tytso@rsts-11.mit.edu>
1499 * block.c (ext2fs_block_iterate3): Make the ref_offset field
1500 contain the offset into the inode.i_blocks array when
1501 ref_block is zero. Since we haven't done a formal
1502 release of e2fsprogs since block_iterate2 was first
1503 introduced, I removed block_iterate2, and renamed
1504 block_iterate3 to be block_iterate2.
1506 * bb_inode.c, bmove.c, dblist_dir.c, dir_iterate.c,
1507 expanddir.c, ext2fs.h, ext2fsP.h, read_bb.c: Change
1508 use of block_iterate and block_iterate2 to
1509 block_iterate2 with the new prototype for the
1510 interator function. (using blkcnt_t forr blockcount)
1512 1998-03-21 Theodore Ts'o <tytso@rsts-11.mit.edu>
1514 * ext2fs.h: Add new superblock fields (s_algorithm_usage_bitmap,
1515 s_prealloc_blocks, s_prealloc_dir_blocks). Added
1516 conditional defines of new features COMPAT_DIR_PREALLOC,
1517 RO_COMPAT_LARGE_FILE RO_COMPAT_BTREE_DIR,
1518 INCOMPAT_COMPRESSION, INCOMPAT_DIRNAME_SIZE. Changed
1519 the library to declare that we support COMPAT_DIR_PREALLOC,
1520 INCOMPAT_DIRNAME_SIZE, RO_COMPAT_LARGE_FILE.
1522 * fileio.c: Rename function ext2fs_file_llseek to be
1523 ext2fs_file_lseek, which is more accurate.
1525 * block.c: Add new function ext2fs_block_iterate3 which calls
1526 the iterator function with the blockcount argument of
1527 type blkcnt_t. This version of the function is
1528 allowed to handle large files; the other fucntions are
1531 * ext2fs.h: Add new type blkcnt_t
1533 * ext2_err.et.in: Add error code EXT2_ET_FILE_TOO_BIG
1535 * block.c (ext2fs_block_iterate2): Fix bug where the block count
1536 field wasn't getting correctly incremented for sparse
1537 files when the indirect or doubly-indirect block
1538 specified in the inode was zero.
1540 Sun Mar 8 22:42:47 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
1542 * unlink.c (unlink_proc):
1543 * lookup.c (lookup_proc):
1544 * link.c (link_proc):
1545 * get_pathname.c (get_pathname_proc):
1546 * dir_iterate.c (ext2fs_process_dir_block): Mask off high 8 bits
1547 from dirent->name_len, so it can be used for other
1550 * ext2fs.h: Add definition of EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE,
1551 and indicate that we have support for this incompatible
1554 Mon Feb 23 08:46:33 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
1556 * ext2_err.et.in: Added new error code, EXT2_ET_CANCEL_REQUESTED.
1558 Fri Feb 20 23:58:01 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
1560 * dblist.c (ext2fs_get_num_dirs): Improve the estimation of the
1561 number of directories when the block group information is
1564 1998-02-20 Theodore Y. Ts'o <tytso@edt.mit.edu>
1566 * inode.c (ext2fs_get_next_inode): Always do the check to see if the
1567 inode table is missing so that we catch the case where the
1568 first block group is missing.
1570 * getsize.c, ismounted.c, unix_io.c: #include errno.h since it's
1573 Mon Feb 16 16:16:00 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
1575 * ext2_io.h, ext2fs.h: Protect against being included multiple times.
1577 * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
1579 * test_io.c (test_flush): Add a debugging printf when the flush
1582 * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
1583 read in, return right away.
1585 Sun Feb 1 08:20:24 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
1587 * bitops.h: Don't try to do i386 inline asm functions if the
1590 * ext2fs.h: If EXT2_FLAT_INCLUDES is defined, #include e2_types.h,
1591 instead of linux/types.h, and e2_bitops.h instead of
1594 * icount.c, version.c: Don't #include <et/com_err.h>, as it isn't
1597 Sat Jan 17 13:13:31 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
1599 * inode.c (ext2fs_open_inode_scan): Initialize the group variables
1600 so that we don't need to call get_next_blockgroup() the
1601 first time around. Saves a bit of time, and prevents us
1602 from needing to assign -1 to current_group (which is an
1605 * icount.c (insert_icount_el): Cast the estimated number of inodes
1606 from a float to an ino_t.
1608 * alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
1609 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
1610 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
1611 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
1612 expanddir.c, ext2fs.h, fileio.c, freefs.c,
1613 get_pathname.c, getsize.c, icount.c, initialize.c,
1614 inline.c, inode.c, irel_ma.c, ismounted.c, link.c,
1615 lookup.c, mkdir.c, namei.c, native.c, newdir.c,
1616 openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
1617 rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
1618 tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c,
1619 valid_blk.c, version.c: If EXT2_FLAT_INCLUDES is
1620 defined, then assume all of the
1621 ext2-specific header files are in a flat directory.
1623 * block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
1624 all assignments from void * to be compatible with C++.
1626 Tue Jan 6 11:28:15 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
1628 * closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
1629 make sure the contents of the disk are flushed to disk.
1631 Mon Dec 29 14:39:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1633 * dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
1634 avoid C++ namespace clash.
1636 * bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
1637 avoid C++ namespace clash.
1639 * ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
1640 irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
1641 ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
1642 unlink.c: Change private to be priv_data (to avoid C++
1645 Fri Nov 28 09:26:31 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1647 * dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more
1648 paranoid about validating the directory counts from the
1649 block group information.
1651 * all files: Don't include stdlib.h anymore; include it in
1652 ext2_fs.h, since that file requires stdlib.h
1654 Thu Nov 20 16:07:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1656 * expanddir.c (ext2fs_expand_dir): Check to make sure the block
1657 bitmap is loaded, and return an error if it is not.
1658 (expand_dir_proc): Only use ext2fs_write_dir_block when
1659 writing a directory block, not when writing out a fresh
1662 Tue Nov 11 22:46:45 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1664 * Makefile.in, tst_getsize.c: Added new file which is used to test
1665 the ext2fs_get_device_size function.
1667 * ext2_err.et.in (EXT2_ET_UNIMPLEMENTED): Added new error code.
1669 Sun Nov 2 20:36:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1671 * ext2fs.h: Make ext2fs_get_mem take an unsigned argument.
1673 * fileio.c (ext2fs_file_get_size, ext2fs_file_set_size,
1674 ext2fs_file_get_fs): New functions added.
1677 Fri Oct 31 12:16:52 1997 <tytso@EDT.MIT.EDU>
1679 * bitops.c (ext2fs_warn_bitmap, ext2fs_warn_bitmap2): Don't call
1680 com_err if OMIT_COM_ERR is defined.
1682 Thu Oct 30 11:33:57 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1684 * Rename new error codes to _ET_ in them for consistency.
1686 Sat Oct 25 00:06:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1688 * [all files, basically]: Added definition of ext2fs_get_mem,
1689 ext2fs_free_mem, and ext2fs_resize_mem in ext2fs.h, and
1690 changed all library routines to use these wrapper functions.
1692 * dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND
1693 instead of the system error messages.
1695 * ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
1698 * ext2fs.h: Added function declarations and constants for bmap.c
1701 * ext2_err.et.in: Added new error messages EXT2_FILE_RO and
1702 EXT2_ET_MAGIC_EXT2_FILE
1704 * Makefile.in: Added files bmap.c and fileio.c, and temporarily
1705 commented out brel_ma.c and irel_ma.c
1707 * bmap.c: New file which maps a file's logical block number to its
1708 physical block number.
1710 * fileio.c: New file which implements simple file reading and
1713 * alloc.c (ext2fs_alloc_block): New function which allocates a
1714 block, zeros it, and updates the filesystem accounting
1715 records appropriately.
1717 Wed Oct 22 16:47:27 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1719 * ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
1720 EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL,
1721 EXT2_INODE_ALLOC_FAIL, EXT2_NOT_DIRECTORY
1723 * Change various library files to use these functions instead of
1724 EINVAL, ENOENT, etc.
1726 Mon Oct 20 19:32:40 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1728 * llseek.c: Check HAVE_LLSEEK_PROTOTYPE to see whether or not we
1729 need to declare llseek().
1731 Sun Oct 19 18:56:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1733 * Rename io.h to be ext2_io.h (avoid namespace collisions)
1735 * Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
1737 Fri Oct 3 13:35:59 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1739 * llseek.c (ext2fs_llseek): Fix type error for ext2fs_llseek()
1741 * icount.c (ext2fs_icount_validate):
1742 * bmove.c (process_block): Fix lint error in type for fprintf().
1744 Mon Sep 15 11:45:09 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1746 * inode.c (ext2fs_check_directory): Add support for the callback
1747 to return the error code EXT2_ET_CALLBACK_NOTHANDLED.
1749 Thu Sep 4 12:28:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1751 * bitmaps.c (ext2fs_set_bitmap_padding): New function which sets the
1752 padding of the bitmap to be all one's.
1754 Wed Sep 3 14:27:30 1997 Theodore Y. Ts'o <tytso@edt.mit.edu>
1756 * llseek.c: Added missing semicolon to glibc fixup declaration of
1759 * bmove.c: Add #include of errno.h
1761 Sat Aug 23 22:47:46 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1763 * Makefile.in (ELF_SO_VERSION): Bump version to be 2.4 since we've
1764 added a new field to the io_channel (app_data).
1766 * io.h: Add a new element to the io_channel structure, app_data.
1768 * initialize.c, openfs.c: Set io->app_data to point at the
1771 Thu Aug 14 08:14:17 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1773 * io.h: Change the prototype of ext2fs_llseek() to use int's
1774 instead of unsigned int's.
1776 * llseek.c: Change to allow PIC and !HAVE_LLSEEK. Add a prototype
1777 to make life easer for GNU Libc 2.
1779 * rw_bitmaps.c: On the PowerPC, the big-endian variant of the ext2
1780 filesystem has its bitmaps stored as 32-bit words with bit
1781 0 as the LSB of each word. Thus a bitmap with only bit 0
1782 set would be, as a string of bytes, 00 00 00 01 00 ... To
1783 cope with this, we byte-reverse each word of a bitmap if
1784 we have a big-endian filesystem, that is, if we are *not*
1785 byte-swapping other word-sized numbers.
1787 Mon Aug 11 03:30:48 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1789 * dosio.c: New file to do DOS/BIOS disk accesses.
1791 * namei.c (open_namei): Make pathlen be of type size_t.
1793 * llseek.c: Always #include stdlib.h since it's need to define
1796 * io.h: Use errcode_t for magic numbers.
1798 * icount.c (get_icount_el): Use size_t where appropriate
1800 * dupfs.c (ext2fs_dup_handle):
1801 * dblist.c (dir_block_cmp): Use size_t where appropriate.
1803 * read_bb.c (ext2fs_read_bb_inode):
1804 * cmp_bitmaps.c (ext2fs_compare_inode_bitmap): Use blk_t, ino_t
1805 and size_t where appropriate.
1807 * closefs.c (ext2fs_flush): Use dgrp_t instead of int where
1810 * openfs.c (ext2fs_open):
1811 * check_desc.c (ext2fs_check_desc): Use blk_t instead of int where
1814 * rw_bitmaps.c (read_bitmaps):
1816 * inode.c (ext2fs_write_inode):
1817 * initialize.c (ext2fs_initialize):
1818 * brel_ma.c: Fix to make be 16-bit safe.
1820 * link.c (ext2fs_link):
1821 * unlink.c (ext2fs_unlink):
1822 * lookup.c (lookup_proc):
1823 * ismounted.c (ext2fs_check_if_mounted):
1824 * block.c (xlate_func): Add #pragma argsused for Turbo C.
1826 Sun Aug 10 10:05:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1828 * block.c (ext2fs_block_iterate2): Use retval which is a errcode_t
1831 * bitmaps.c (make_bitmap): Use size_t instead of int where
1834 * bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
1836 * alloc.c (ext2fs_new_inode): Use ino_t instead of int for the
1839 * get_pathname.c: Use ino_t instead of int where appropriate.
1841 * ext2fs.h: Make the magic structure element be errcode_t instead
1844 * alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
1845 bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
1846 cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c
1847 dirblock.c dupfs.c expanddir.c freefs.c get_pathname.c
1848 icount.c initialize.c inline.c inode.c irel_ma.c link.c
1849 llseek.c lookup.c mkdir.c namei.c newdir.c read_bb.c
1850 read_bb_file.c rs_bitmap.c rw_bitmaps.c swapfs.c
1851 test_io.c tst_badblocks.c tst_iscan.c unix_io.c unlink.c
1852 valid_blk.c version.c: Add an #ifdef for HAVE_UNISTD_H
1854 Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1856 * unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno
1857 is zero, then return EXT2_IO_LLSEEK_FAILED.
1859 * ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
1861 * Release of E2fsprogs 1.11
1863 Mon Jun 16 23:53:06 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1865 * dblist.c (ext2fs_dblist_count): Added new function which returns
1866 the number of directory blocks in dblist.
1868 Sat Jun 14 01:39:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1870 * unix_io.c (unix_flush): Make the io_channel flush function do a
1871 fsync to flush the kernel buffers to disk.
1873 Wed Jun 11 18:25:31 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1875 * inode.c (ext2fs_inode_scan_goto_blockgroup): Fix bug; the
1876 current inode number wasn't being set by the
1877 goto_blockgroup function.
1879 Mon Jun 9 10:45:48 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1881 * bmove.c (ext2fs_move_blocks): New function which takes a bitmap
1882 of blocks which need to be moved, and moves those blocks
1883 to another location in the filesystem.
1885 * rs_bitmap.c (ext2fs_resize_generic_bitmap): When expanding a
1886 bitmap, make sure all of the new parts of the bitmap are
1889 Sun Jun 8 16:24:39 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1891 * bitmaps.c (ext2fs_copy_bitmap): Fix bug; the destination bitmap
1892 wasn't being returned to the caller.
1894 * alloc_tables.c (ext2fs_allocate_group_table): Add new function
1895 ext2fs_allocate_group_table() which sets the group tables
1896 for a particular block group. The relevant code was
1897 factored out of ext2fs_allocate_tables().
1899 * dblist.c (make_dblist): Adjust the initial size of the directory
1900 block list to be a bit more realistic (ten plus twice the
1901 number of directories in the filesystem).
1903 Thu May 8 22:19:09 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1905 * badblocks.c (ext2fs_badblocks_list_test): Fix bug where
1906 ext2fs_badblocks_list_test would test the list (and exceed
1907 array boundaries) if there were no bad blocks on the bad
1908 blocks list. (Showed up when user tried: mke2fs -c -b 4096).
1910 Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
1912 * Release of E2fsprogs version 1.10
1914 Thu Apr 24 10:13:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
1916 * alloc_tables.c (ext2fs_allocate_tables): Correctly place the
1917 inode and block bitmaps based on the RAID 0 stride
1918 parameter (which is passed by mke2fs).
1920 * ext2fs.h: Add "stride" parameter to ext2_filsys, to be used by
1921 mke2fs to communicate the stride length to
1922 ext2fs_allocate_tables()
1924 Wed Apr 23 21:50:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
1926 * initialize.c (ext2fs_initialize): Fix to compile under Linux 1.2
1927 systems. (We can't assume that the new filesystem types
1930 Wed Apr 23 18:40:53 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1932 * alloc_tables.c (ext2fs_allocate_tables): Make sure that we
1933 allocate the inode and block bitmaps inside block group at
1936 Mon Apr 21 00:06:28 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1938 * alloc.c (ext2fs_new_block): Fix bug where if goal==0 and the
1939 filesystem has no free blocks, ext2fs_new_block would loop
1942 * dupfs.c (ext2fs_dup_handle): Duplicate an ext2 filesystem handle
1944 * freefs.c (ext2fs_free_inode_cache): Decrement refcount and only
1945 free if refcount goes to zero.
1947 * inode.c (create_icache): Initialize refcount to 1.
1949 * ext2fsP.h: Added refcount to ext2_inode_cache
1951 * dblist.c (ext2fs_copy_dblist): New function to copy a directory
1954 * badblocks.c (ext2fs_badblocks_copy): New function to copy a
1955 badblocks structure.
1957 Sun Apr 20 23:19:51 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1959 * bitmaps.c (ext2fs_copy_bitmap): New function to copy a bitmap.
1961 * unix_io.c, test_io.c (unix_open, test_open): Initialize the
1963 (unix_close, test_close): Decrement the refcount and only
1964 close the io_channel if the refcount goes to 0.
1966 * io.h: Add refcount to the io_channel structure. Add new macro
1967 interface io_channel_bumpcount() to bump the refcount.
1969 Thu Apr 17 20:25:03 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1971 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Use the inode
1972 cache in the filesystem handle, instead of the inode cache
1973 in a static variable.
1975 * freefs.c: Added static function to free the inode cache (called by
1978 * ext2fsP.h: Added definition of the ext2_inode_cache structures.
1980 * ext2fs.h: Added pointer to the inode_cache structure.
1982 * block.c (block_iterate_ind, block_iterate_dind,
1983 block_iterate_tind): If there are holes in the indirect,
1984 doubly indirect, or triply indirect blocks, increment the
1985 block count field automatically.
1987 Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1989 * Release of E2fsprogs version 1.09
1991 Mon Apr 14 20:38:56 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
1993 * version.c (ext2fs_parse_version_string): Check the passed in
1994 version string (instead of the hard-coded one).
1996 * alloc_tables.c (ext2fs_allocate_tables): If the last block is
1997 greater filesystem size, clamp it to prevent allocating a
1998 block or inode bitmap beyond the filesystem.
2000 * initialize.c (ext2fs_initialize): Fix bug where the metatdata
2001 overhead calculation was accidentally removed.
2003 Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2005 * Release of E2fsprogs version 1.08
2007 Thu Apr 10 13:15:15 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2009 * dblist.c (ext2fs_set_dir_block): New function which sets the
2010 block of a dblist entry, given the directory inode and
2013 Sat Apr 5 12:42:42 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2015 * alloc_tables.c (ext2fs_allocate_tables): Allocate the bitmap and
2016 inode bitmaps at staggered locations across the block
2017 groups, to avoid concentrating the bitmaps on a small
2018 number of disks when using striped RAID arrays.
2020 * initialize.c (ext2fs_initialize): By default, choose the maximum
2021 possible number of blocks per group (based on the size of
2022 the bitmaps in the blocksize).
2024 Fri Apr 4 11:28:16 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2026 * initialize.c (ext2fs_initialize): Add support for
2027 EXT2_COMPAT_SPARSE_SUPER feature.
2029 * closefs.c (ext2fs_bg_has_super): New function to determine
2030 whether or a particular block group should have a
2031 superblock and block group descriptor. Used for the
2032 EXT2_COMPAT_SPARSE_SUPER feature is turned on.
2033 (ext2fs_flush): Check ext2fs_bg_has_super to see whether
2034 or not the superblock should be written out for the block
2037 * ext2fs.h (EXT2_COMPAT_SPARSE_SUPER): Define compatibility flag
2038 for sparse duplicate superblocks.
2040 * version.c (ext2fs_get_library_version): New function which
2041 returns the library version.
2043 * version.c (ext2fs_parse_version_string): New function which
2044 parses a version string and returns a version number,
2045 so application programs can compare version numbers as
2048 Wed Mar 26 00:43:52 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2050 * icount.c (ext2fs_create_icount): Change function so that it also
2051 takes a new argument which contains a "hint" icount
2052 structure. This "hint" icount allows the create function
2053 to set up the sorted list in advance. This reduces
2054 significantly the amount of data moving needed to insert
2055 these inodes into the list later.
2057 * icount.c (ext2fs_icount_validate): New function which validates
2058 that the icount structure's rep invariant.
2060 * icount.c (get_icount_el): Completely revamped implementation
2061 to subsume put_icount_el(). Put_icount_el() used to
2062 use an O(N) implementation to insert in the middle
2063 of the icount list. It now uses a O(ln N) to search
2064 for where the icount should be inserted, and then uses
2065 a memcpy to move the list down (instead of a for loop).
2067 * icount.c (ext2fs_icount_fetch, ext2fs_icount_store,
2068 ext2fs_icount_increment, ext2fs_icount_decrement): Check
2069 to see if the inode is within bounds; if it isn't, return
2072 * bitops.h (ext2fs_test_generic_bitmap): Fix error message given
2073 when a bad inode number is passed to test_generic_bitmap
2074 to be EXT2FS_TEST_ERROR instead of the wrong
2075 EXT2FS_UNMARK_ERROR.
2077 Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso@mit.edu>
2079 * Release of E2fsprogs version 1.07
2081 Sun Mar 2 16:46:18 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2083 * Makefile.in (ELF_VERSION): Change version to be 2.2
2085 Tue Feb 11 14:54:02 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2087 * alloc.c (ext2fs_get_free_blocks): Change routine to use
2088 ext2fs_fast_test_block_bitmap_range().
2090 * bitops.h (ext2fs_fast_test_block_bitmap_range,
2091 ext2fs_test_block_bitmap_range: New inline functions which
2092 test to see whether a contiguous range of blocks is
2095 Thu Feb 6 10:00:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2097 * badblocks.c (ext2fs_badblocks_list_create): Rename sybmols to use
2098 use ext2fs_badblocks_* instead of badblocks_*
2100 * bb_compat.c: New file which translates between old badblocks_*()
2101 names to ext2fs_badblocks_*()
2103 * unlink.c (ext2fs_unlink): New file, moved ext2fs_unlink() from
2104 link.c (since e2fsck doesn't use ext2fs_unlink()).
2106 * rs_bitmap.c (ext2fs_resize_generic_bitmap): New file, contains
2107 bitmap resizing routine moved from bitmaps.c, since e2fsck
2108 doesn't need to use this function.
2110 * lookup.c (ext2fs_lookup): Moved ext2fs_lookup to its own file,
2111 since e2fsck only needs ext2fs_lookup.
2113 Mon Feb 3 10:11:40 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2115 * inode.c (ext2fs_open_inode_scan): Set fs->badblocks if it is not
2116 already set; this is needed so that programs like dump
2117 which use the inode scan functions will deal with
2118 filesystems that have bad blocks in the inode table.
2120 Sun Feb 2 00:17:36 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2122 * ext2fs.h (struct_badblocks_list, struct_badblocks_iterate):
2123 Moved to ext2fsP.h, since it doesn't need to be part of
2124 the public interface.
2126 * dir_iterate.c: Move ext2_dir_iterate out of namei.c.
2128 Sat Feb 1 10:14:55 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2130 * dblist.c (ext2fs_get_num_dirs): New file, which implements a
2131 directory block list abstraction. (Code moved from
2134 * ext2fs.h, inode.c: Moved definition of ext2_struct_inode_scan to
2135 to inode.c (since no one else should be peeking inside it!)
2137 * valid_blk.c (ext2_inode_has_valid_blocks): New function.
2139 * openfs.c (ext2fs_open): Check the feature set in the ext2
2140 superblock, and refuse to open filesystems if they contain
2141 incompatible features. (Can be overriden with the
2144 Sun Jan 12 11:31:46 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2146 * block.c (ext2fs_block_iterate2): Added new function
2147 ext2fs_block_iterate2 which changes the function
2148 signature of the callback function to include the
2149 referencing block and offset.
2151 * inode.c (ext2fs_inode_scan_goto_blockgroup): Added new function
2152 ext2fs_inode_scan_goto_blockgroup which allows an
2153 application to jump to a particular block group while
2154 doing an inode scan.
2156 Wed Jan 1 23:50:12 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2158 * dirblock.c: Include string.h, since we use memcpy().
2160 Tue Dec 3 12:27:29 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2162 * getsize.c (ext2fs_get_device_size): The ioctl BLKGETSIZE returns
2163 a long not an int; this doesn't matter on i386 machines,
2164 but it does on Alpha's.
2166 Fri Nov 29 20:57:37 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2168 * inode.c (ext2fs_write_inode, ext2fs_read_inode): If the inode
2169 table pointer is NULL, then return an error indicating
2170 that the inode table is missing.
2171 (get_next_blockgroup, get_next_blocks,
2172 ext2fs_get_next_inode): Don't treat a missing inode table
2173 as permanent error. Return MISSING_INODE_TABLE, but as an
2174 advisory error code, much like BAD_BLOCK_IN_INODE_TABLE.
2176 * rw_bitmaps.c (ext2fs_write_block_bitmap,
2177 ext2fs_write_inode_bitmap): If the inode or block bitmap
2178 block is zero, then don't write out the inode or block
2179 bitmap. The idea here is to avoid stomping on the
2181 (read_bitmaps): If the inode or block bitmap block is
2182 zero, then fill in that portion of the inode or block
2183 bitmap with all zeros.
2185 * inode.c (ext2fs_get_next_inode): Fix bug in handling of bad
2186 blocks in inode table when the inode table size is
2187 non-standard (and can therefore span blocks).
2189 Tue Oct 29 20:13:14 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2191 * alloc.c (ext2fs_new_block): Fix fencepost error in
2192 ext2fs_new_block; make sure we don't try to allocate the
2193 first block beyond the end of the filesystem.
2195 Mon Oct 14 11:00:48 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2197 * inode.c (check_for_inode_bad_blocks): New function called by
2198 get_next_blocks() to avoid reading in bad blocks marked in
2199 fs->badblocks. Inodes located in bad blocks are returned
2200 by ext2fs_get_next_inode() returns the error code
2201 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE.
2203 * alloc_tables.c (ext2fs_allocate_tables): New function which
2204 performs the part of mke2fs's job of allocating the
2207 * test_io.c (test_close): IO manager which is used for testing
2210 Sun Oct 13 04:31:57 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2212 * inode.c (ext2fs_get_next_inode): Separate out the function of
2213 setting up for a new block group to get_next_blockgroup().
2214 Separate out the function of reading in blocks of the
2215 inode table to get_next_blocks().
2217 * ext2fs.h: Add the badblocks list to the ext2_filsys entry
2219 * badblocks.c (badblocks_list_add, badblocks_list_test): Add
2220 blocks to the badblock list in sorted order. This allows
2221 badblocks_list_test to be coded using a binary search for
2224 Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2226 * Release of E2fsprogs version 1.06
2228 Mon Oct 7 00:44:17 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2230 * ext2fs.h, block.c, closefs.c, dirblock.c, inode.c, native.c,
2231 open.c: Change EXT2_SWAP to EXT2_FLAG_SWAP for
2234 * closefs.c (ext2fs_flush): If the flag EXT2_MASTER_SB_ONLY is
2235 set, then only write out the master superblock.
2237 Sun Oct 6 21:45:26 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2239 * block.c (ext2fs_block_iterate): Fixed bug which caused
2240 block_iterate to fail to handle HURD created filesystems;
2241 it tested the inode translator field before the inode was
2244 Tue Sep 17 14:08:24 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2246 * initialize.c (ext2fs_initialize): Make sure the description for
2247 the inode bitmap is set correctly.
2249 * bitmaps.c (ext2fs_allocate_generic_bitmap): Fix minor type typo.
2251 Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2253 * Release of E2fsprogs version 1.05
2255 Sat Sep 7 07:36:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2257 * initialize.c: Override the kernel's idea of default
2258 checkinterval from 0 (never) to 180 days.
2260 Wed Aug 28 03:20:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2262 * namei.c (ext2fs_namei_follow): New function which follows
2263 symbolic link (if any) at the target.
2265 Tue Aug 27 01:48:43 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2267 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Add support
2268 for shortcut function fs->read_inode() and fs->write_inode().
2269 Added inode_cache to reduce CPU time spent in doing
2272 * swapfs.c (ext2fs_swap_super): Swap the new fields in a V2
2275 * namei.c (ext2fs_follow_link): New function.
2276 (ext2fs_namei): Extended to have support for chasing
2277 symbolic links. ext2fs_namei() still returns an inode
2278 which is a symbolic link. Symbolic links are only chased
2279 while resolving the containing directory. To chase
2280 symbolic links of the final result, use
2281 ext2fs_follow_link().
2283 Mon Aug 26 23:46:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2285 * ext2_err.et.in: Added new error code EXT2_ET_SYMLINK_LOOP.
2287 * bitops.h (ext2fs_set_bit, ext2fs_celar_bit): Use asm inlines
2288 provided by Pete A. Zaitcev (zaitcev@lab.sun.mcst.ru).
2290 Thu Aug 22 00:40:18 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2292 * initialize.c (ext2fs_initialize): On systems where the byte
2293 order is not i386 compatible, set the swap_byte flag.
2295 * inode.c (inocpy_with_swap): Check to see if inode contains a
2296 fast symlink before swapping the inode block fields. This
2297 required adding a new argument to inocpy_with_swap to
2298 determine whether the mode field is in host order or not.
2300 Wed Aug 21 00:45:42 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2302 * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit): On
2303 the sparc, if EXT2_STD_BITOPS set, use the standard
2304 i386-compatible bitmask operations, instead on the
2305 non-standard native bitmask operators.
2307 Fri Aug 9 11:11:35 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2309 * block.c (ext2fs_block_iterate): Cause block iterator to return
2310 the HURD translator block (along with everything else).
2311 If the flag BLOCK_FLAG_DATA_ONLY is passed to the block
2312 iterator, then don't return any meta data blocks
2313 (including the HURD translator).
2315 Wed Jul 17 17:13:34 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2317 * gen_uuid.c: New file, which generates DCE-compatible UUIDs.
2319 * uuid.c: New file, containing UUID utility functions.
2321 Tue Jul 16 10:19:16 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2323 * ext2fs.h: Add a definition of the "real" ext2 superblock.
2325 Fri May 24 14:54:55 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2327 * ext2fs.h: Fix erroneous ino_t type used in block_bitmap type.
2329 Sun May 19 15:39:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2331 * openfs.c (ext2fs_open): If the blocksize in the superblock is
2332 zero, return the error EXT2_ET_CORRUPT_SUPERBLOCK, since
2333 that's a basic value that must be correct for the rest of
2334 the library to work.
2336 * ext2_err.et.in (EXT2_ET_CORRUPT_SUPERBLOCK): Added new error
2339 Thu May 16 11:12:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2341 * Release of E2fsprogs version 1.04
2343 Wed Mar 27 00:33:40 1996 <tytso@rsts-11.mit.edu>
2345 * Release of E2fsprogs version 1.03
2347 Tue Mar 26 12:06:32 1996 <tytso@rsts-11.mit.edu>
2349 * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit):
2350 Change the m68k bit numbering for bitmasks to match with
2351 the bit numbering used by all other ext2 implementations.
2353 Thu Mar 7 03:37:00 1996 <tytso@rsts-11.mit.edu>
2355 * inode.c (ext2fs_get_next_inode, ext2fs_close_inode_scan,
2356 ext2fs_open_inode_scan): Support dynamically-sized inodes.
2358 Wed Mar 6 12:26:29 1996 <tytso@rsts-11.mit.edu>
2360 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Support
2361 dynamically-sized inodes.
2363 * openfs.c (ext2fs_open): Allow dynamic revision filesystem to be
2366 Tue Mar 5 03:49:37 1996 <tytso@rsts-11.mit.edu>
2368 * initialize.c (ext2fs_initialize): Catch an error condition where
2369 the passed in size is *really* too small.
2371 * alloc.c (ext2fs_new_inode):
2372 * ext2fs.h (EXT2_FIRST_INODE): Add support for dynamic revision to
2375 Wed Feb 21 15:56:17 1996 <tytso@rsts-11.mit.edu>
2377 * getsize.c (ext2fs_get_device_size): Open the device read-only
2378 when trying to determine its size.
2380 Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
2382 * Release of E2fsprogs version 1.02
2384 Sat Dec 9 09:57:50 1995 <tytso@rsts-11.mit.edu>
2386 * rw_bitops.c (ext2fs_write_block_bitmap):
2387 * bitops.c (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
2388 * bitops.h (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
2389 Rename {test,set,clear}_bit to ext2fs_{test,set,clear}_bit,
2390 to avoid conflicts with with kernel include files. Also
2391 rename ADDR and CONST_ADDR to EXT2FS_ADDR and
2394 Thu Oct 26 12:09:16 1995 <tytso@rsts-11.mit.edu>
2396 * ext2_err.et: Updated message in EXT2_ET_BASE to say version 0.5c
2398 * swapfs.c (ext2fs_swap_super): Put an #ifdef check around
2399 s_def_resuid and s_def_resgid for backwards compatibility.
2401 Fri Oct 20 23:33:31 1995 <tytso@rsts-11.mit.edu>
2403 * bitops.h: Added #ifdef's for Sparc.
2405 Wed Sep 6 22:14:46 1995 <tytso@rsts-11.mit.edu>
2407 * getsize.c: #include <sys/ioctl.h> under Linux to pick up ioctl()
2410 * closefs.c: #include <string.h> to pick up memset() declaration
2412 Mon Sep 4 21:45:29 1995 Remy Card <card@bbj>
2414 * Makefile.in: Added support for BSD shared libraries.
2416 * initialize.c (ext2fs_initialize): Correctly set the s_creator_os
2419 Mon Sep 4 09:55:30 1995 <tytso@rsts-11.mit.edu>
2421 * unix_io.c (unix_open): Add a double check; if the passed in name
2422 is NULL, return EXT2_ET_BAD_DEVICE_NAME.
2424 * ext2_err.et (EXT2_ET_BAD_DEVICE_NAME): Added new error code
2426 Wed Aug 16 15:44:10 1995 <tytso@rsts-11.mit.edu>
2428 * inode.c (ext2fs_check_directory): Use LINUX_S_ISDIR instead of
2431 Tue Aug 15 13:08:36 1995 <tytso@rsts-11.mit.edu>
2433 * getsize.c (ext2fs_get_device_size): Add support for reading the
2434 partition size from a BSD disk label.
2436 Thu Aug 10 09:33:26 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2438 * getsize.c (ext2fs_get_device_size): New function that determins
2439 the size of a device. Used by mke2fs and e2fsck.
2441 Sat Aug 12 03:09:54 1995 Remy Card <card@bbj>
2443 * Makefile.in (install): Install static libraries in $(ulibdir)
2444 (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
2446 Wed Aug 9 17:04:23 1995 Theodore Y. Ts'o <tytso@dcl>
2448 * bitmaps.c (ext2fs_free_inode_bitmap, ext2fs_free_block_bitmap):
2449 Move these functions to freefs.c.
2451 * closefs.c (ext2fs_flush): If swapping blocks, clear the group
2452 descriptors shadow memory to keep purify quiet. (This
2453 also has the nice benefit that the unused portion of the
2454 shadow descriptors are zeroed out.)
2456 * dirblock.c (ext2fs_write_dir_block): We need to use
2457 dirent->rec_len *before* it's byteswapped to find the
2458 location of the next directory structure!
2460 * alloc.c (ext2fs_new_inode): Fix bug which could potentially
2461 cause ext2fs_new_inode to loop infinitely if we're trying
2462 to allocate an inode in group #0 and there are no free
2463 inodes at all in the system.
2465 * closefs.c: #include <errno.h> if it exists.
2467 Sun Aug 6 13:27:50 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2469 * ext2fs.h (BLOCK_FLAG_HOLE): Added new definition for
2470 BLOCK_FLAG_APPEND. Added documentation for the block
2473 Sat Aug 5 11:44:05 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2475 * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
2476 installation directories correctly.
2478 Tue Jul 18 09:27:38 1995 <tytso@rsx-11.mit.edu>
2480 * namei.c (process_dir_block):
2481 * mkdir.c (ext2fs_mkdir):
2482 * expanddir.c (expand_dir_proc): Use ext2fs_{read,write}_dir_block
2483 to read/write the directory block.
2485 * dirblock.c (ext2fs_read_dir_block), ext2fs_write_dir_block): New
2486 file containing functions for reading and writing
2487 directory blocks (byte swapping if necesssary)
2489 * block.c (block_iterate_ind, block_iterate_dind,
2490 block_iterate_tind): Byte swap the block addresses if
2491 EXT2_SWAP_BYTES is set (and swap them back before writing
2494 * inode.c (inocpy_with_swap): New function.
2495 (ext2fs_get_next_inode, ext2fs_read_inode, ext2fs_write_inode):
2496 Call inocpy_with_swap if EXT2_SWAP_BYTES if set.
2498 * closefs.c (ext2fs_flush): If EXT2_SWAP_BYTES is set, then swap
2499 the superblock and group descriptors before writing it out.
2501 * openfs.c (ext2fs_open): If the magic number is byte-swapped,
2502 then set the EXT2_SWAP_BYTES and byte-swap the superblock
2503 and group descriptors.
2505 * swapfs.c (ext2fs_swap_super, ext2fs_swap_group_desc): New functions
2506 to desp ext2 filesystem structures.
2508 * bitops.c (set_bit, clear_bit, test_bit): Use modifications
2509 supplied by Pete A. Zaitcev so that the C language
2510 versions of these functions are more portable. They will
2511 now work on both little and big endian systems, and the
2512 assumption that 32-bit integers are used is gone.
2514 * bitops.h (ext2_swab16, ext2_swab32): Added new functions for
2515 doing byte swapping.
2517 * ext2fs.h (EXT2_SWAP_BYTES): Add new flag which indicates that
2518 byte swapping should take place.
2520 Sun Jul 16 06:21:43 1995 <tytso@rsx-11.mit.edu>
2522 * Makefile.in, cmp_bitmaps.c (ext2fs_compare_block_bitmap_end,
2523 ext2fs_compare_inode_bitmap_end): Added new file
2524 containing routines to compare bitmaps.
2526 * ext2_err.et (EXT2_ET_NEQ_BLOCK_BITMAP, EXT2_ET_NEQ_INODE_BITMAP):
2527 Added new error codes.
2529 Sat Jul 15 04:23:37 1995 <tytso@rsx-11.mit.edu>
2531 * inode.c (ext2fs_get_next_inode): Don't check scan->inode_buffer;
2532 if the magic number is correct, it will be allocated.
2534 Fri Jul 14 19:02:59 1995 <tytso@rsx-11.mit.edu>
2536 * block.c (block_iterate_ind, block_iterate_dind,
2537 block_iterate_tind): Don't recompute block_nr each loop;
2538 just increment it! Factor check of BLOCK_FLAG_APPEND out
2539 of the loop. Factor mask of BLOCK_CHANGED into changed
2540 variable out of the loop. (block_iterate_ind, in
2541 particular, gets called a lot, so every little
2542 optimization helps.)
2544 Thu Jul 13 08:02:45 1995 <tytso@rsx-11.mit.edu>
2546 * block.c (block_iterate_ind, block_iterate_dind,
2547 block_iterate_tind): Precompute limit of loop to speed up
2548 block_iterate_ind and company.
2550 * bitops.h (ext2fs_fast_mark_block_bitmap,
2551 ext2fs_fast_unmark_block_bitmap, ext2fs_fast_test_block_bitmap,
2552 ext2fs_fast_mark_inode_bitmap, ext2fs_fast_unmark_inode_bitmap,
2553 ext2fs_fast_test_inode_bitmap): Add fast version of these
2554 functions, which don't do range checking.
2556 * bitops.h (ext2fs_get_block_bitmap_start,
2557 ext2fs_get_inode_bitmap_start, ext2fs_get_block_bitmap_end,
2558 ext2fs_get_inode_bitmap_end): Add new accessor functions
2559 which return the start and end points of the bitmaps.
2561 Tue Jul 11 18:59:41 1995 <tytso@rsx-11.mit.edu>
2563 * llseek.c (ext2_llseek): If the offset is small enough, use lseek
2564 instead of llseek. The errno if the offset is too large
2565 and lseek is not supported should be EINVAL, not -EINVAL.
2567 Thu Jun 15 23:43:02 1995 Remy Card <card@bbj>
2569 * Makefile.in: Added support for ELF shared libraries.
2570 Fixed typos in the compilation rules.
2571 (distclean): Added Makefile.
2573 * llseek.c (llseek): New function, if llseek() does not exist in the
2575 (ext2_llseek): Changed to call llseek().
2577 Mon Jun 12 08:29:07 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2579 * ext2fs.h: Use __u32 to define blk_t, instead of unsigned long.
2581 Sun Jun 11 15:02:54 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2583 * mkdir.c (ext2fs_mkdir): Use LINUX_S_IFDIR instead of S_IFDIR.
2585 * ext2fs.h (LINUX_S_IFDIR): Define a linux specific versions of
2586 the S_*, which are normally defined in <sys/stat.h>. This
2587 allows us to compile e2fsprogs on a non-Linux system,
2588 which may have a different value for S_IFDIR.
2590 Sat Jun 10 23:47:05 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
2592 * bitops.c (clear_bit, set_bit): Remove calls to cli() and sti();
2593 this is a user-mode application!
2595 Thu Jun 8 13:13:22 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
2597 * llseek.c: Put the include of <linux/unistd.h> inside the #ifdef
2598 __linux__ so that non-linux systems won't see it.
2600 * alloc.c: Include <errno.h> if possible.
2601 * badblocks.c: Ditto.
2602 * bb_inode.c: Ditto.
2605 * expanddir.c: Ditto.
2606 * get_pathname.c: Ditto.
2607 * initialize.c: Ditto.
2614 * rw_bitmaps.c: Ditto.
2617 * Makefile.in: Rewritten to conform to GNU coding standards and
2618 support separate compilation directories.
2620 Thu May 11 04:13:12 1995 <tytso@rsx-11.mit.edu>
2622 * initialize.c (ext2fs_initialize): Don't allow more than one
2623 bitmaps's worth of inodes in a group.
2625 Sat Mar 11 14:07:11 1995 Theodore Y. Ts'o <tytso@localhost>
2627 * llseek.c (ext2_llseek): Added error checking to the llseek()
2628 compat code to protect against overflow. This only
2629 applies to 1.0 and early 1.1 kernels, which don't support
2630 the llseek() system call.
2632 Thu Nov 24 16:29:00 1994 Theodore Y. Ts'o (tytso@rt-11)
2634 * unix_io.c (unix_open): Initialize the read_error and write_error
2635 io_channel pointers to be null.
2637 * bb_inode.c (clear_bad_block_proc): If an illegal block number is
2638 found, clear it but don't try to update the filesystem
2639 accounting information, since that's hopeless anyway.
2641 * block.c (bloblock_iterate_ind, bloblock_iterate_dind,
2642 bloblock_iterate_tind): Check to see if the indirect blocks are
2643 valid before trying to read them.
2645 * ext2_err.et (EXT2_ET_BAD_IND_BLOCK, EX2_ET_BAD_DIND_BLOCK,
2646 EXT2_ET_BAD_TIND_BLOCK): Add new error codes.
2648 * bitops.h (ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
2649 ext2fs_test_block_bitmap, ext2fs_mark_inode_bitmap,
2650 ext2fs_unmark_inode_bitmap, ext2fs_test_inode_bitmap): If an
2651 illegal block or inode number is passed in, return instead
2652 of trying to test, set, or clear the bit.
2654 Mon Nov 7 21:32:33 1994 Remy Card <card@bbj>
2656 * Makefile: Added a dummy install target in case shared libraries
2659 Mon Oct 24 14:11:44 1994 (tytso@rsx-11)
2661 * bitmaps.c (ext2fs_allocate_block_bitmap): Fix calculation of how
2662 the real last block of the bitmap should be calculated.
2664 Wed Sep 7 10:05:36 1994 (tytso@rsx-11)
2666 * bitmaps.c (ext2fs_fudge_inode_bitmap_end,
2667 ext2fs_fudge_block_bitmap_end, ext2fs_clear_inode_bitmap,
2668 ext2fs_clear_block_bitmap, ext2fs_free_inode_bitmap,
2669 ext2fs_free_block_bitmap): Add magic number checking for
2670 the inode and block bitmaps.
2672 * bitmaps.c (ext2fs_allocate_block_bitmap): Fix to set the correct
2673 magic number for a block bitmap instead of an inode bitmap.
2675 * inode.c (ext2fs_close_inode_scan, ext2fs_get_next_inode): Add
2676 magic number checking for the inode_scan structure.
2678 * badblocks.c (badblocks_list_free, badblocks_list_add,
2679 badblocks_list_test, badblocks_list_iterate_begin,
2680 badblocks_list_iterate, badblocks_list_iterate_end): Add
2681 magic number checking for the badblocks_list and
2682 badblocks_iterate structures.
2684 * ext2_err.et (EXT2_ET_MAGIC_UNIX_IO_CHANNEL):
2685 * unix_io.c (unix_open, unix_close, unix_set_blksize, unix_read_blk,
2686 unix_write_blk, unix_flush): Add magic number checking
2687 both for io_channel structure and unix_private_data
2690 * openfs.c (ext2fs_open): Add check for io_manager structure's
2693 * rw_bitmaps.c (ext2fs_write_inode_bitmap, ext2fs_write_block_bitmap,
2694 ext2fs_read_inode_bitmap, ext2fs_read_block_bitmap,
2695 ext2fs_read_bitmaps, ext2fs_write_bitmaps):
2696 * read_bb.c (ext2fs_read_bb_inode):
2697 * read_bb_file.c (ext2fs_read_bb_FILE):
2698 * newdir.c (ext2fs_new_dir_block):
2699 * namei.c (ext2fs_dir_iterate, ext2fs_lookup, ext2fs_namei):
2700 * link.c (ext2fs_link, ext2fs_unlink):
2701 * inode.c (ext2fs_open_inode_scan, ext2fs_read_inode,
2702 ext2fs_write_inode, ext2fs_get_blocks,
2703 ext2fs_check_directory):
2704 * get_pathname.c (ext2fs_get_pathname):
2705 * expanddir.c (ext2fs_expand_dir):
2706 * block.c (ext2fs_block_iterate):
2707 * bitmaps.c (ext2fs_allocate_inode_bitmap,
2708 ext2fs_allocate_block_bitmap):
2709 * bb_inode.c (ext2fs_update_bb_inode):
2710 * alloc.c (ext2fs_new_inode,ext2fs_new_block,ext2fs_get_free_blocks):
2711 * check_desc.c (ext2fs_check_desc):
2712 * closefs.c (ext2fs_close, ext2fs_flush):
2713 * freefs.c (ext2fs_free): Add check for ext2_filsys magic number.
2718 * check_desc.c (ext2fs_check_desc): Move ext2fs_check_desc from
2719 openfs.c into its own file.
2721 * ext2fs.h (EXT2_CHECK_MAGIC): Added macro for checking for
2722 structure magic numbers.
2724 * closefs.c (ext2fs_flush): Folded in Remy Card's changes to clear
2725 the EXT2_VALID_FS flag in the backup superblock blocks, so that if
2726 someone uses the -b option to specify the use of the backup
2727 superblock --- this usually means that the main superblock is
2731 * ext2_err.et (EXT2_ET_REV_TOO_HIGH):
2732 * openfs.c (ext2fs_open): Folded in Remy Card's changes to add a
2733 revision level to the superblock.
2735 Sun Aug 21 00:50:08 1994 Theodore Y. Ts'o (tytso@rt-11)
2742 * initialize.c: Completely revamped the inode and block bitmap
2743 structures, so that they can be better chance of being extensible
2744 in a shared library. They are now their own type, instead of
2745 being a char *. Also, the function signatures of
2746 ext2fs_test_block_bitmap, ext2fs_mark_block_bitmap,
2747 ext2fs_unmark_block_bitmap, ext2fs_test_inode_bitmap,
2748 ext2fs_mark_inode_bitmap, and ext2fs_unmark_inode_bitmap were
2749 changed to eliminate the ext2_filsys argument, since it is no
2752 Wed Aug 17 21:46:44 1994 Remy Card (card@bbj)
2754 * unix_io.c (unix_read_blk and unix_write_blk): use the llseek
2755 system call if available.
2757 * llseek.c: new file. This is the stub calling the llseek system
2758 call which allows supports for 2GB+ file systems.
2760 * initialize.c (ext2fs_initialize): Ext2fs_initialize now stores
2761 the creator operating system.
2763 Wed Aug 17 10:03:24 1994 Theodore Y. Ts'o (tytso@rt-11)
2765 * initialize.c (ext2fs_initialize): Ext2fs_initialize now sets up
2766 the group descriptor statistics in addition to everything else.
2767 This relieves mke2fs of the responsibility of doing it.
2769 * bitops.c, bitops.h: Add assembly inline functions for the 68000.
2770 Added a new #define, _EXT2_HAVE_ASM_BITOPS_ to control whether or
2771 not the generic C function equivalents should be included or not.
2773 * openfs.c (ext2fs_open): If a superblock is specified, then use
2774 the backup group descriptors that go along with this superblock,
2775 instead of using the primary group descriptors. This allows
2776 e2fsck to recover filesystems where the primary group descriptors