1 2006-03-17 Theodore Ts'o <tytso@mit.edu>
3 * initialize.c (calc_reserved_gdt_blocks): Fix a signed vs
4 unsigned problem which caused mke2fs -O resize_inode to
5 bomb out on large filesystems. (Addresses Debian Bug
8 * ext2_fs.h (EXT2_IOC_GETVERSION_NEW, EXT2_IOC_SETVERSION_NEW,
9 EXT2_IOC_GROUP_EXTEND, EXT2_IOC_GROUP_ADD): Add ioctl
12 2005-12-10 Theodore Ts'o <tytso@mit.edu>
14 * Makefile.in: Add a dependency to make sure that the
15 subdirectories are created before creating all of the
18 2005-12-10 Theodore Ts'o <tytso@mit.edu>
20 * res_gdt.c (ext2fs_create_resize_inode): Fix type-punning warning.
22 * read_bb_file.c (ext2fs_read_bb_FILE): Use a data structure
23 instead of stuffing a function pointer dirctly into a void
24 pointer, since that isn't portable.
26 * mkjournal.c (ext2fs_add_journal_inode): Fix possiblely
27 uninitialized use of variable warning.
29 * initialize.c (calc_reserved_gdt_blocks): Fix signed vs. unsigned
32 * ext2fs.h: Make the type of the 'now' field to be time_t to avoid
35 * bitops.h (ext2fs_find_first_bit_set): Fix signed vs unsigned
38 * tst_badblocks.c (file_test_invalid): Add test which confirms
39 proper detection of invalid block numbers in
40 ext2fs_read_bb_FILE().
42 2005-11-20 Theodore Ts'o <tytso@mit.edu>
44 * bitops.h: We no longer have the sparc assembly code in the
45 header file any more, so we shouldn't set
46 _EXT2_HAVE_AS_BITOPS_. This would break compiles on the
47 sparc architectures when using gcc.
49 2005-11-13 Theodore Ts'o <tytso@mit.edu>
51 * ext2fs.h: Add #include <string.h> since the inline functions use
52 memcpy(). (Addresses Sourceforge Bug #1251062)
54 2005-11-09 Theodore Ts'o <tytso@mit.edu>
56 * Fix a bug when writing an external journal device on an big
57 endian machine (such as a S/390), where when the number of
58 block groups is zero, we never end up writing out the
59 primary superblock at all.
61 2005-09-24 Theodore Ts'o <tytso@mit.edu>
63 * ext2fs.h, bb_inode.c, closefs.c, initialize.c, mkdir.c,
64 mkjournal.c, res_gdt.c: If fs->now is non-zero, use that
65 as the time instead of the system time when setting
66 various filesystem fields (last modified time, last write
69 2005-08-28 Matthias Andree <matthias.andree@gmx.de>
71 * Fix compiler warnings about missing memcpy prototypes.
73 2005-07-25 Theodore Ts'o <tytso@mit.edu>
75 * test_io.c (safe_getenv): Pass in zero to the unusued arguments
76 of prctl(PR_GET_DUMPABLE) to avoid false positives from
79 2005-07-19 Theodore Ts'o <tytso@mit.edu>
81 * mkjournal.c (ext2fs_add_journal_inode): Check for the case where
82 the filesystem is apparently not mounted, but the device
83 is still busy. This can happen when the luser doesn't
84 bother to mount /proc and has a bogus /etc/mtab, but still
85 wants to mount the filesystem before using tune2fs(?!?).
86 Add a safety check to save him from his own stupidity, at
87 least on 2.6 kernels. (Addresses Debian Bug #319002)
89 2005-07-09 Andreas Dilger <adilger@clusterfs.com>
91 * getsize.c (ext2fs_get_device_size): Use fstat/fstat64 to get
92 size of regular files. Fix file descriptor leaks in error
95 2006-06-30 Theodore Ts'o <tytso@mit.edu>
97 * Release of E2fsprogs 1.38
99 2005-06-30 Theodore Ts'o <tytso@mit.edu>
101 * bitops.h, bitops.c (ext2fs_set_bit, ext2fs_clear_bit,
102 ext2fs_test_bit): Change these function prototypes to be
103 unsigned int's. Negative bit numbers were never allowed
104 (and never made any sense), so this should be a safe
105 change. This is needed to allow safe use of block numbers
106 greater than or equal to 2**31.
108 2005-06-27 Stephen Tweedie <sct@redhat.com>
110 * ext2fs.h (ext2fs_resize_mem): Fix C99 strict type aliasing
111 problems. Addresses Red Hat Bugzilla #161183.
113 2005-06-19 Theodore Ts'o <tytso@mit.edu>
115 * getsectsize.c (BLKSSZGET): Clean up test for when to manually
116 define the BLKSSZGET ioctl.
118 2005-05-29 Theodore Ts'o <tytso@mit.edu>
120 * ismounted.c (ext2fs_check_mount_point): Add test to see if the
121 device appears to be busy; this only works on Linux 2.6+
122 systems, but provides some additional bullet-proofing in
125 2005-05-08 Theodore Ts'o <tytso@mit.edu>
127 * test_io.c (safe_getenv): Fix bug so it would fetch the right
128 environment variable.
130 2005-04-09 Theodore Ts'o <tytso@mit.edu>
132 * inode.c (ext2fs_write_new_inode),
133 ind_block.c (ext2fs_read_ind_block): Add missing return
134 value in error return case. (Otherwise we return garbage
135 instead of the error code.)
137 2005-03-31 Theodore Ts'o <tytso@mit.edu>
139 * test_io.c (test_open): If called by a setuid/setgid or an
140 otherwise privileged program, be paranoid and ignore the
141 TEST_IO_* environment variables.
143 2005-03-21 Theodore Ts'o <tytso@mit.edu>
145 * Release of E2fsprogs 1.37
147 2005-03-21 Theodore Ts'o <tytso@mit.edu>
149 * ext2_ext_attr.h (EXT2_XATTR_LEN, EXT2_XATTR_SIZE): Add new
150 convenience cpp macros.
152 2005-03-20 Theodore Ts'o <tytso@mit.edu>
154 * mkdir.c (ext2fs_mkdir): Call ext2fs_write_new_inode() instead of
155 ext2fs_write_inode().
157 * inode.c (ext2fs_write_new_inode): New function which should be
158 used when the caller is writing an inode for the first
159 time. It makes sure that the extra portion of the large
160 inode is initialized properly.
162 2005-03-18 Theodore Ts'o <tytso@mit.edu>
164 * Makefile.in: Fix clean target to remove tst_getsectsize.
166 * getsize.c (ext2fs_get_device_size): Check to see if the number
167 of blocks is greater than 2**32 when we are doing a binary
168 search to determine the device size. Thanks to Stephen
169 Tweedie for the patch.
171 2006-02-05 Theodore Ts'o <tytso@mit.edu>
173 * Release of E2fsprogs 1.36
175 2005-02-05 Theodore Ts'o <tytso@mit.edu>
177 * Makefile.in: Remove ext2fs.pc on a "make distclean"
179 2005-02-04 Theodore Ts'o <tytso@mit.edu>
181 * Makefile.in (clean): Remove tst_getsize when doing a make clean
183 2005-02-03 Theodore Ts'o <tytso@mit.edu>
185 * bitops.c: Make the generic functions more efficient.
187 * bitops.h: Drop SPARC assembly code. It's less efficient than GCC
188 3.4 compiled code and also triggers nasty compiler
189 warnings on sparc64. Thanks to Matthias Andree for his
190 analysis and suggestion.
192 2005-01-27 Theodore Ts'o <tytso@mit.edu>
194 * res_gdt.c (ext2fs_create_resize_inode): Create the resize inode
195 even if s_reserved_gdt_blocks is zero.
197 2005-01-26 Theodore Ts'o <tytso@mit.edu>
199 * ext2fs.pc.in: Add pkg-config files.
201 2005-01-25 Theodore Ts'o <tytso@mit.edu>
203 * ext2fs.h: Add definition of struct ext2_inode_large
205 * ext2_fs.h: Add new function prototypes
207 * ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr): The
208 ext2fs_swap_ext_attr() has been moved to swapfs.c, and
209 given a new argument, has_header.
211 * swapfs.c (ext2fs_swap_ext_attr): Moved from ext_attr.c, and
212 takes an argument which controls whether or not there is
213 an EA header which needs to be byteswaped.
214 (ext2fs_swap_inode_full): New function which byte-swaps
217 * inode.c (ext2fs_get_next_inode_full, ext2fs_read_inode_full,
218 ext2fs_write_inode_full): New functions, originally from
219 Alex Tomas, but which needed to be substantially fixed so
220 that the tests wouldn't cause major stack overwrite bugs
221 in byte-swapping is enabled.
223 2005-01-18 Theodore Ts'o <tytso@mit.edu>
225 * Makefile.in: Fix the kernel compile-time echo commands to be
226 consistent and portable
228 2005-01-07 Theodore Ts'o <tytso@mit.edu>
230 * unlink.c (ext2fs_unlink): If both the name and the inode number
231 are unspecified, then return an error, so that we don't do
232 something surprising such as unconditionally deleting the
233 first directory entry.
234 (unlink_proc): Delete directory entries by coalescing it
235 with the previous entry, to avoid directory fragmentation.
237 2005-01-06 Theodore Ts'o <tytso@mit.edu>
239 * version.c (ext2fs_parse_version_string): Change parsing
240 algorithm so that version strings such as 1.36-rc1 returns
241 a non-surprising result (i.e., 136, and not 1361).
243 2005-01-05 Theodore Ts'o <tytso@mit.edu>
245 * block.c (block_iterate_ind, block_iterate_dind,
246 block_iterate_tind): Move the code which byte swaps and
247 read/writes indirect blocks to ext2fs_{read,write}_ind_block.
248 This saves 400 bytes, and we need them for the
249 resize_inode handling.
251 * ind_block.c (ext2fs_read_ind_block, ext2fs_write_ind_block): New
254 * res_gdt.c (ext2fs_create_resize_inode): Use
255 ext2fs_{read,write}_ind_block so that byte swapping is
256 handled on big-endian systems.
258 * dupfs.c (ext2fs_dup_handle): Make sure the new filesystem handle
259 has its own copy of the orig_super data structure. (This
260 is a better way of fixing a double-free problem in
261 resize2fs which Fedora attempted to fix in
262 e2fsprogs-1.35-double_free.patch. Addresses Red Hat
265 2004-12-23 Theodore Ts'o <tytso@mit.edu>
267 * inode.c (ext2fs_flush_icache): When flushing the icache, clear
268 the last-read block information as well.
270 * ext2fs.h (BMAP_SET), bmap.c (ext2fs_bmap): Add support for new
271 flag, BMAP_SET, which allows the caller to set a
272 particular logical->physical block mapping.
274 * ext2_err.et.in (EXT2_ET_SET_BMAP_NO_IND): New error code
276 * initialize.c (calc_reserved_gdt_blocks): #ifdef out all
277 debugging printf statements.
279 * res_gdt.c (ext2fs_create_resize_inode): Return
280 EXT2_ET_RESIZE_INODE_CORRUPT if the resize inode is not
281 what we expect. #ifdef out all debugging printf
284 * ext2_err.et.in (EXT2_ET_RESIZE_INODE_CORRUPT): Add new error code.
286 2004-12-22 Theodore Ts'o <tytso@mit.edu>
288 * swapfs.c (ext2fs_swap_super): Byteswap the reserved_gdt_blocks
291 2004-12-15 Theodore Ts'o <tytso@mit.edu>
293 * sparse.c (ext2fs_list_backups, ext2fs_bg_has_super),
294 res_gdt.c (list_backups), closefs.c (ext2fs_bg_has_super),
295 ext2fs.h: Move ext2fs_list_backups() to res_gdt.c, and
296 ext2fs_bg_has_super() back to closefs.c. There's no
297 reason for the new file, since list_backups() isn't being
298 used by any other functions, and can be made static, and
299 all users of the ext2fs filesystem will have to call
300 ext2fs_close() anyway.
302 2004-12-15 Theodore Ts'o <tytso@mit.edu>
304 * Applied resize inode patch from Andreas Dilger
306 * res_gdt.c (ext2fs_create_resize_inode): New function that
307 creates the resize inode.
309 * initialize.c (ext2fs_initialize): Reserve space for the resize
312 * ext2fs.h (EXT2_LIB_FEATURE_COMPAT_SUPP): Add
313 EXT2_FEATURE_COMPAT_RESIZE_INODE to the list of supported
315 Add function prototypes for res_gdt.c and sparse.c.
317 * closefs.c (ext2fs_super_and_bgd_loc): Take the reserved blocks
318 into account when calculating the number of overhead
321 * closefs.c (ext2fs_bg_has_super, test_root), sparse.c: Move these
322 functions to the new file sparse.c
324 * alloc_sb.c (ext2fs_reserve_super_and_bgd): Reserve the blocks
325 saved in the resize inode as being in use.
327 * ext2_err.et.in (EXT2_ET_RES_GDT_BLOCKS): Add new error code.
329 * Makefile.in (srcdir): Add res_gdt.c and sparse.c to the ext2fs
332 2004-12-14 Theodore Ts'o <tytso@mit.edu>
334 * Makefile.in: Use Linux-kernel-style makefile output for "make
337 * Makefile.in (installdirs): Use $(MKINSTALLDIRS) macro
340 2004-11-30 Theodore Ts'o <tytso@mit.edu>
342 * unix_io.c (unix_set_option): Add support for the offset option.
344 * test_io.c (test_set_option): Add support for the set_option method.
346 * ext2_io.h: Add new io_channel method, set_option(), and change
347 io_channel_write_byte() from a macro to a library function.
349 * ext2fs.h, openfs.c(ext2fs_open2): New version of ext2fs_open
350 which adds a new parameter, io_options.
351 (ext2fs_open): If there is a question mark in the
352 filename, and no io_options are specified, assumed that
353 the text following the question mark are io_options.
355 * io_manager.c, Makefile.in: New source file which contains
356 high-level functions for the io_channel layer.
358 * freefs.c (ext2fs_free): Make sure we don't free the io_channel
361 * Makefile.in: Use Linux-kernel-style makefile output to make it
362 easier to see errors/warnings.
364 2004-11-29 Theodore Ts'o <tytso@mit.edu>
366 * ext2_fs.h (EXT2_EXTENTS_FL, EXT3_FEATURE_INCOMPAT_EXTENTS,
367 EXT2_MAX_BLOCK_LOG_SIZE): Add definition for extent
368 feature and inode flag. Change maximum allowable block
371 2004-10-08 Theodore Ts'o <tytso@mit.edu>
373 * getsize.c (ext2fs_get_device_size): Add support for Windows
374 9x/NT under Cygwin. Thanks to Sam Robb
375 (samrobb@users.sourceforge.net) for pointing this and the
376 suggested code patch.
378 2004-09-17 Theodore Ts'o <tytso@mit.edu>
380 * getsize.c: Clean up header #include's.
382 * llseek.c (ext2fs_llseek): On non-linux systems, use lseek64() if
383 it is present. (Addresses Debian bug #269044)
385 2004-07-28 Theodore Ts'o <tytso@mit.edu>
387 * rw_bitmaps.c (read_bitmaps), block.c (block_iterate_ind,
388 block_iterate_dind, block_iterate_tind), inode.c
389 (ext2fs_read_inode): If EXT2_FLAG_IMAGE_FILE is set, so
390 read the metadata from fs->image_io instead of fs->io.
392 * initialize.c (ext2fs_initialize), openfs.c (ext2fs_open):
393 Initialize fs->image_io to be the same as fs->io.
395 * ext2_err.et.in (EXT2_ET_NOT_IMAGE_FILE): Add new error code.
397 * openfs.c (ext2fs_get_data_io, ext2fs_set_data_io,
398 ext2fs_rewrite_to_io): New functions that allow
399 applications to manipulate fs->image_io and fs->io safely.
401 * freefs.c (ext2fs_free): If fs->image_io is different fs->io,
402 then call io_channel_close on fs->image_io.
404 * ext2fs.h: Add image_io element to the ext2_filsys data
405 structure. Add ext2fs_get_data_io() ext2fs_set_data_io(),
406 and ext2fs_rewrite_to_io() prototypes.
408 2004-05-26 Theodore Ts'o <tytso@mit.edu>
410 * closefs.c (ext2fs_flush): Make sure the master superblock is
411 written last, and only after other I/O has been flushed to
412 disk. Thanks to Junfeng Yang from the Stanford
413 Metacompilation group for pointing a potential ordering
414 constraint problem if we don't write things out in the
417 * test_io.c: Implement the ability to abort after n reads or
418 writes to a particular block. The block is specified by
419 TEST_IO_BLOCK environment variable, and the read/write
420 count by the TEST_IO_READ_ABORT and TEST_IO_WRITE_ABORT
421 environment variables. The block data is now only dumped
422 if the 0x10 bit is set in TEST_IO_FLAGS.
424 2004-04-03 Theodore Ts'o <tytso@mit.edu>
426 * ext2_types.h.in: Remove check for _UUID_TYPES since uuid_types.h
429 2004-03-08 Theodore Ts'o <tytso@mit.edu>
431 * getsize.c (ext2fs_get_device_size): Only use the BLKGETSIZE64
432 ioctl on Linux 2.6 since it is unreliable in Linux 2.4.
433 (Addresses Debian Bug #236528). Fix typo in the ioctl
436 2004-03-02 Theodore Ts'o <tytso@mit.edu>
438 * getsize.c (ext2fs_get_device_size): Update getsize functions to
439 use Apple Darwin and Linux 64-bit ioctl's
441 2004-02-29 Brian Bergstrand <brian@bergstrand.org>
443 * Makefile.in: Use $(BSDLIB_PIC_FLAG) to determine whether to use
446 2004-02-28 Theodore Ts'o <tytso@mit.edu>
448 * Release of E2fsprogs 1.35
450 2004-02-21 Theodore Ts'o <tytso@mit.edu>
452 * ext2fs.h (ext2fs_resize_mem): Fix C++ problem. (Addresses Red
453 Hat Bugzilla #112448; thanks Thomas Woerner from Red Hat.)
455 2004-02-14 Theodore Ts'o <tytso@mit.edu>
457 * namei.c (follow_link): Correctly deal with symlinks that have
458 extended attribute information. (Addresses Debian Bug
461 2004-01-30 Theodore Ts'o <tytso@mit.edu>
463 * ext2_fs.h: Reserve an extra 4 bytes for the journal backup,
464 which we're using due to a typo in the e2fsck code. (Oops)
466 * swapfs.c (ext2fs_swap_inode): Fix byte swap bug which causes SE
467 Linux created symlinks with mandatory attributes to fail
468 to be properly handled on big endian systems. (Addresses
470 (ext2fs_swap_super): Byte swap some new fields in the
471 superblock, including the journal backup fields.
473 2003-12-02 Theodore Ts'o <tytso@mit.edu>
475 * alloc.c, bb_inode.c, bitops.c, block.c, check_desc.c, closefs.c,
476 dir_iterate.c, dirblock.c, expanddir.c, ext2fs.h,
477 get_pathname.c, icount.c, imager.c, initalize.c, inode.c,
478 lookup.c, openfs.c, read_bb.c, read_bb_file.c,
479 rw_bitmaps.c, unix_io.c, unlink.c, write_bb_file.c: Fix
480 gcc -Wall complaints. Mainly marking variables as being
481 unsued, and catching signed vs. unsigned comparisons.
483 2003-09-03 Theodore Ts'o <tytso@mit.edu>
485 * closefs.c (ext2fs_super_and_bgd_loc): New function which
486 centralizes the calculation of the superblock and block
488 (ext2fs_flush): Use ext2fs_super_and_bgd_lock to figure
489 out where to write the superblock and block group
492 * alloc_sb.c (ext2fs_reserve_super_and_bgd): New function which
493 reserves space in the block bitmap using
494 ext2fs_super_and_bgd_loc.
496 * initialize.c (ext2fs_initialize): Use
497 ext2fs_reserve_super_and_bgd to initialize the block bitmap.
499 2003-08-20 Theodore Ts'o <tytso@mit.edu>
501 * inode_io.c (ext2fs_inode_io_intern2), ext2fs.h: Add new function
502 allows the caller to pass in the inode data structure.
504 * fileio.c (ext2fs_file_open2), ext2fs.h: Add new function which
505 allows the caller to pass in the inode to be used in the
508 * ext2_fs.h: Add a backup of the location of the journal inode
509 blocks to the superblock.
511 * mkjournal.c (write_journal_inode): Save the location of the
512 journal inode to the backup location in the superblock.
514 2003-08-01 Philipp Thomas <pthomas@suse.de>
516 * alloc.c, badblocks.c, bb_inode.c, bitmaps.c, block.c, bmap.c,
517 bmove.c, brel_ma.c, closefs.c, dblist.c, dblist_dir.c,
518 dir_iterate.c, dirblock.c, dupfs.c, expanddir.c, ext2fs.h,
519 ext_attr.c, fileio.c, freefs.c, get_pathname.c, icount.c,
520 initialize.c, inode.c, inode_io.c, irel_ma.c, mkdir.c,
521 mkjournal.c, namei.c, newdir.c, openfs.c, rs_bitmap.c,
522 rw_bitmaps.c, test_io.c, unix_io.c: ext2fs_getmem(),
523 ext2fs_free_mem(), and ext2fs_resize_mem() all now take a
524 'void *' instead of a 'void **' in order to avoid pointer
525 aliasing problems with GCC 3.x.
527 2003-07-25 Theodore Ts'o <tytso@mit.edu>
529 * Release of E2fsprogs 1.34
531 2003-07-06 Theodore Ts'o <tytso@mit.edu>
533 * kernel-jbd.h, flushb.c: Fix gcc -Wall nitpicks (indented cpp
536 * ext2_types.h.in, initialize.c: Fix gcc -Wall nitpicks
539 * ismounted.c: Fix gcc -Wall nitpicks (Don't use exit as a goto label)
541 * llseek.c: Fix gcc -Wall nitpicks (don't use #elsif)
543 * lookup.c, read_bb.c: Fix gcc -Wall nitpicks (indent
544 non-traditional #pragma)
546 * test_io.c: Fix gcc -Wall nitpicks (const/unsigned type issues)
548 2003-06-24 <tytso@snap.thunk.org>
550 * badblocks.c, ext2fs.h (ext2fs_u32_list_find,
551 ext2fs_u32_list_test, ext2fs_u32_list_del,
552 ext2fs_badblocks_list_del): Add functions to delete a
553 block from the badblocks list.
554 * tst_badblocks.c: Add test cases for ext2fs_badblocks_list_del().
556 2003-05-21 Theodore Ts'o <tytso@mit.edu>
558 * getsectsize.c (ext2fs_get_device_sectsize): New function which
559 returns the hardware sector size (if it is available).
561 2003-05-13 Theodore Ts'o <tytso@mit.edu>
563 * unix_io.c: Add #ifdef NO_IO_CACHE which disables all userspace
564 caching by the unix_io layer. Not enabled, only for
567 2003-05-05 Theodore Ts'o <tytso@mit.edu>
569 * test_io.c: Pay attention to the environment variables
570 TEST_IO_LOGFILE, TEST_IO_FLAGS, and TEST_IO_BLOCK to
571 determine whether or not we should log io activity, and to
574 2003-05-03 Theodore Ts'o <tytso@mit.edu>
576 * tst_badblocks.c (file_test): Use tmpfile() instead of mktemp().
578 2003-04-29 Theodore Ts'o <tytso@mit.edu>
580 * getsize.c (ext2fs_get_device_size): Allow windows code to get
581 the resize for filesystems that are in regular files.
583 2003-04-21 Theodore Ts'o <tytso@mit.edu>
585 * Release of E2fsprogs 1.33
587 2003-04-21 Theodore Ts'o <tytso@mit.edu>
589 * Makefile.in: Use DYLD_LIBRAY_PATH so that "make check" works on
590 Darwin systems when building with shared libraries.
592 2003-04-18 Theodore Ts'o <tytso@mit.edu>
594 * unix_io.c: Use __CYGWIN__ instead of CYGWIN.
596 2003-04-17 Theodore Ts'o <tytso@mit.edu>
598 * getsize.c: Add Cygwin/Windows version of ext2fs_get_device_size()
600 2003-04-12 Theodore Ts'o <tytso@mit.edu>
602 * unix_io.c (raw_read_blk): Add Cygwin support (the Windows block
603 device only accepts sector aligned read requests.
605 * ismounted.c (check_mntent_file): Deal with OS's that don't
608 * imager.c: If the OS doesn't define ssize_t, typedef it to int.
610 2003-04-11 Theodore Ts'o <tytso@mit.edu>
612 * ext2_fs.h (EXT2_FEATURE_RO_COMPAT_BTREE_DIR): Comment out unused
615 2003-03-30 Theodore Ts'o <tytso@mit.edu>
617 * Makefile.in: Use the compile_et --build-tree option.
619 2003-03-14 Theodore Ts'o <tytso@mit.edu>
621 * getsize.c: Add support for Apple Darwin's ioctl to get the hard
624 * badblocks.c (ext2fs_u32_list_count), ext2fs.h: Add new function
625 which returns the number of entries in the list.
627 2003-03-10 Theodore Ts'o <tytso@mit.edu>
629 * fileio.c (ext2fs_file_lseek): Fix bug added when adding 64-bit
630 support; avoid null dereference when ret_pos is NULL.
632 2003-03-06 Theodore Tso <tytso@mit.edu>
634 * ext2_types.h.in: Don't redefine types if other e2fsprogs
635 *_types.h files have been included already.
637 * kernel-jbd.h: Use C99 variadic cpp macros if not using GCC.
638 (Older GCC's don't support the C99 variadic macros.)
640 * flushb.c (ext2fs_sync_device),
641 ismounted.c (ext2fs_check_mount_point): Avoid GCC extension:
642 #warning not supported by Solaris suncc
644 * ext2_ext_attr.h: Avoid GCC extension: 0 length arrays in
645 structure definition. Not needed for now in
648 2003-01-25 Theodore Ts'o <tytso@mit.edu>
650 * dirhash.c: Fix gcc -Wall nits.
652 2003-01-22 Theodore Ts'o <tytso@mit.edu>
654 * unix_io.c (unix_write_blk): Fix up GCC -Wall nits.
656 2003-01-21 Theodore Ts'o <tytso@mit.edu>
658 * fileio.c (ext2fs_file_read, ext2_file_lseek,
659 ext2_file_get_size): Add 64-bit support.
661 * ext2fs.h (EXT2_I_SIZE): Add macro which caluates a 64bit size
662 from i_size and i_size_high.
664 2003-01-19 Theodore Ts'o <tytso@mit.edu>
666 * initialize.c (ext2fs_initialize): If the user specifies a really
667 large number of inodes, then reduce the number of blocks
668 per group until we find a workable set of filesystem
671 * ext2_err.et.in (EXT2_ET_TOO_MANY_INODES): Add new error code.
673 2002-11-09 Theodore Ts'o <tytso@mit.edu>
675 * Release of E2fsprogs 1.32
677 2002-11-09 Theodore Ts'o <tytso@mit.edu>
679 * unix_io.c (find_cached_block, reuse_cache, unix_read_blk,
680 unix_write_blk): Optimize routines so that we don't end up
681 searching the cache twice when a block isn't in the
682 cache. If reads are larger than READ_DIRECT_SIZE, don't
683 let them go through the cache.
685 * unix_io.c (find_cached_block): Fixed bug which caused some clean
686 blocks to be erroneously marked as dirty, so they would
687 get written back to the disk before they are evicted from
688 the cache. Harmless, but it slows down e2fsck
691 2002-11-08 Theodore Ts'o <tytso@mit.edu>
693 * Release of E2fsprogs 1.31
695 2002-11-08 <tytso@snap.thunk.org>
697 * Makefile.in (check): Skip trying to compile test_byteswap
698 if --disable-byteswaap had been given to configure.
700 2002-11-07 <tytso@snap.thunk.org>
702 * closefs.c (write_bgdesc, ext2fs_flush): Fix bug in meta_bg
703 support when the MASTER_SB_ONLY flag is set. Some of
704 the descriptor blocks that should have been written out
705 were getting skipped.
707 2002-10-31 Theodore Ts'o <tytso@mit.edu>
709 * Release of E2fsprogs 1.30
711 2002-10-31 Theodore Ts'o <tytso@mit.edu>
713 * ext2_fs.h: Add support for a new inode flag, which is to be used
714 for indicating the top of directory hierarchies for the
715 Orlov block allocator.
717 * ismounted.c (check_mntent, check_mntent_file): Add better
718 support for loopback-mounted filesystems. Check /etc/mtab
719 if /proc/mounts doesn't turn up any mount flags, since
720 /etc/mtab has the loopback image filename, instead of
721 /dev/loop0. Also, check based on st_dev and st_ino, so
722 that if a relative pathname or a pathnames using symbolic
723 links are used, we can detect the the filesystem correctly
724 in those cases. (Addresses Sourceforge bug #619119)
726 * flushb.c (ext2fs_sync_device): If the BLKFLSBUF ioctl succeeds,
727 don't try the FDFLUSH ioctl that was required for floppies
728 with older kernels. This avoids needless whining from the
729 MD device driver. (Addresses Sourceforge bug #545832).
731 * openfs.c (ext2fs_open): Fix bug which caused us to pass the
732 wrong group_block to ext2fs_descriptor_block_loc if we're
733 using the backup superblock/block group descriptors.
734 (ext2fs_descriptor_block_loc): If we're using the backup
735 superblock descriptors, use the backup descriptor block in
736 the next block group.
738 2002-10-30 Theodore Ts'o <tytso@mit.edu>
740 * alloc_tables.c (ext2fs_allocate_group_table): Allocate the inode
741 table so that it buts up against the bitmap blocks, to
742 avoid block fragmentation.
744 * closefs.c (write_bgdesc), initalize.c (ext2fs_initialize): Fix
745 bug; only allocate group descriptor blocks up to
748 2002-10-25 Theodore Ts'o <tytso@mit.edu>
750 * ext2_fs.h: Add a new superblock field, s_mkfs_time, so that we
751 know when a filesystem was created. (Sometimes this can
754 * initialize.c (ext2fs_initialize): Set the s_mkfs_time field.
756 2002-10-20 Theodore Ts'o <tytso@valinux.com>
758 * ext2_fs.h (EXT3_DEFM_JMODE): Add new default mount options for
759 the journal data mode.
761 * closefs.c (ext2fs_flush, write_bgdesc), ext2_fs.h, ext2fs.h,
762 openfs.c (ext2fs_descriptor_block_loc, ext2fs_open), initialize.c
763 (ext2fs_initialize), swapfs.c (ext2fs_swap_super): Add support for
764 the meta_blockgroup filesystem format.
766 2002-10-15 <tytso@snap.thunk.org>
768 * ext2_fs.h: Add new field in superblock for default mount options.
770 2002-10-13 Theodore Ts'o <tytso@mit.edu>
772 * ext2fs.h: Add #include of header files necessary for ext2fs.h to
775 2002-10-02 Theodore Y. Ts'o <tytso@mit.edu>
777 * rw_bitmaps.c (ext2fs_write_block_bitmap,
778 ext2fs_read_block_bitmap): Don't set the CHANGED bit just
779 because the bitmap is getting written to disk. Make
780 ext2fs_swap_bitmap be a static function, since it's not
781 intended to be exported.
783 * swapfs.c (ext2fs_swap_super): Byte-swap the hash seed
785 2001-09-24 Theodore Tso <tytso@mit.edu>
787 * Release of E2fsprogs 1.29
789 2001-08-31 Theodore Tso <tytso@thunk.org>
791 * Release of E2fsprogs 1.28
793 2002-08-31 Theodore Ts'o <tytso@valinux.com>
795 * dblist.c (ext2fs_dblist_sort): New function which allows the
796 caller to pass in a special sort comparison function.
798 2002-08-20 Theodore Ts'o <tytso@mit.edu>
800 * valid_blk.c (ext2fs_inode_has_valid_blocks): Fix bug which
801 failed to accurately characterize non-standard slow
802 symlinks. (Which don't appear in practice on real-life
803 systems, fortunately.)
805 2002-08-17 Theodore Ts'o <tytso@mit.edu>
807 * Makefile.in: Remove inode_io.o from the standard object files,
808 and only build it if debugfs is enabled (it requires
809 fileio.o, which is only built if --disable-debugfs isn't
810 specified to configure).
812 * dirhash.c (ext2fs_dirhash): Change the MD4 hash in a backwards
813 incompatible way so that it is no longer
814 endian-dependent. Add the TEA hash. Allow the seed
815 parameter to be optional.
817 * ext2_fs.h: Remove the HALF_MD4_SEED and HALF_MD4_64 hashes.
818 These features are all now in the HALF_MD4 hash. Add
819 definition for EXT2_HASH_TEA.
821 * ext2fs.h (ext2fs_dirhash): Change function prototype so it takes
822 a pointer instead of an array.
824 2002-08-16 Theodore Ts'o <tytso@mit.edu>
826 * ext2_err.et.in (EXT2_ET_BAD_EA_BLOCK_NUM): New error code
828 * ext2fs.h (ext2fs_inode_data_blocks): New function which returns
829 the number of data blocks used by an inode exclusive of
832 * ext_attr.c (ext2fs_adjust_ea_refcount): New function which
833 adjusts the reference count in an extended attribute block.
835 * valid_blk.c (ext2fs_inode_has_valid_blocks): Add code to
836 correctly deal with extended attribute blocks in symbolic
839 2002-08-13 <tytso@snap.thunk.org>
841 * Makefile.in: Move dupfs.o and test_io.o from the
842 needed-by-debugfs object list to the needed-by-resizer
843 object list. Fixes compile problem if the system is built
844 with only --disable-debugfs.
846 2002-07-29 Theodore Ts'o <tytso@mit.edu>
848 * link.c (ext2fs_link): When adding a new link to a directory,
851 2002-07-23 Theodore Ts'o <tytso@mit.edu>
853 * dirhash.c (ext2fs_dirhash): Fix bug which caused MD4
854 calculations for names > 32 characters to be completely
855 bogus. Changed MD4 calculation to match what is currently
856 being used in the CVS gkernel tree.
858 2002-07-19 Theodore Ts'o <tytso@mit.edu>
860 * ext2_fs.h: Add s_hash_seed and s_def_hash_version to the
861 superblock definition.
863 * badblocks.c, freefs.c, ext2fs.h: Use the badblocks functions to
864 create a set of u32_list functions.
866 * dirhash.c (halfMD4Transform): Shift the hash by one bit,
867 since that's required by the directory indexing code.
869 2002-07-14 Theodore Ts'o <tytso@mit.edu>
871 * ext2fs.h, read_bb_file.c: Change private to priv_data, to avoid
872 using a C++ reserved word.
874 * unix_io.c (unix_open): Only attempt the setrlimit workaround if
875 the kernel version is 2.4.10 -- 2.4.17, since otherwise an
876 old version of glibc (built against 2.2 headers) will
877 interact badly with the workaround to actually cause more
878 problems. I hate it when the glibc folks think they're
879 being smarter than the kernel....
881 2002-06-28 Andreas Dilger <adilger@clusterfs.com>
883 * ext2_fs.h: Add superblock field for reserved group descriptors.
885 2002-06-28 Theodore Ts'o <tytso@mit.edu>
887 * bitops.h: Add #define's for ext2fs_{l,b}e{32,16}_to_cpu and
888 ext2fs_cpu_to_{l,b}e{32,16}
890 2002-06-27 Theodore Ts'o <tytso@mit.edu>
892 * ismounted.c (check_mntent): In AIX 4.3, MOUNTED isn't defined.
893 Add appropriate fallbacks in this case.
895 2002-06-26 Theodore Ts'o <tytso@mit.edu>
897 * dirhash.c (ext2fs_dirhash): Change function signature to support
898 a hash seed, and to return the minor hash (for 64-bit hash
899 support). Add support for the half MD4, half MD4 with
900 seed, and half MD4 with seed and 64 bits.
902 2002-06-15 Theodore Ts'o <tytso@mit.edu>
904 * ext2_fs.h (EXT2_DIRSYNC_FL): Add new file.
906 2002-06-09 Andreas Dilger <adilger@clusterfs.com>
908 * ext2_fs.h: Add macros for maximum block/inode counts:
909 EXT2_INODES_PER_BLOCK, EXT2_MAX_BLOCKS_PER_GROUP,
910 and EXT2_MAX_INODES_PER_GROUP.
912 * openfs.c (ext2fs_open): Check that the number of blocks in a group
913 is less than 2^16, otherwise we need an INCOMPAT flag (not
914 in existence yet, if ever) to open such a filesystem.
916 * initialize.c (ext2fs_initialize): Limit the number of blocks and
917 inodes in a group to less than 2^16.
919 2002-06-09 Andreas Dilger <adilger@clusterfs.com>
921 * ext2_fs.h: Further minor cleanups of the header. Consolidate
922 some checks for __KERNEL__ into one place.
924 2002-05-22 Andreas Dilger <adilger@clusterfs.com>
926 * ext2_fs.h: Remove macros accessing u.ext2_sb field and use
927 the EXT2_SB() macro instead. Remove kernel function
928 prototypes also. This matches the 2.5 kernel, and
929 is also cleaner for other reasons. Whitespace cleanup.
931 2002-05-21 Theodore Ts'o <tytso@mit.edu>
933 * ext2_ext_attr.h: Update to V2 version of the Bestbits format.
935 2002-05-16 Andreas Dilger <adilger@clusterfs.com>
937 * ext2_fs.h: Change limits to support filesystems with 8k blocks.
939 * initialize.c (ext2fs_initialize): Remove assumption that
940 blocksizes are always <= 4k.
942 2002-05-11 Theodore Ts'o <tytso@mit.edu>
944 * bmap.c (ext2fs_bmap): Fix bug which caused ext2fs_bmap to fail
945 silently if inode pointer is NULL (and ext2fs_bmap is
946 expected to read the inode itself).
948 2002-04-27 Theodore Ts'o <tytso@mit.edu>
950 * ismounted.c (check_mntent_file, is_swap_device): Verify that the
951 file we are checking is a block device file before looking
952 at st_rdev, since it's not valid for normal files.
953 (is_swap_device): Move so that it is outside the
954 HAVE_MNTENT_H, so that it is always built.
956 2002-03-11 Theodore Tso <tytso@mit.edu>
958 * dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
959 functions which take an extra flags argument. The flag
960 EXT2_DIRBLOCK_V2_STRUCT will reverse when the name_len
961 field is byte swampped on big-endian machines, since in
962 the V2 structure, name_len is a char field which is
963 doesn't need to be byte swapped --- except if an
964 old-style kernel had byte-swapped the name_len field
965 as part of the V1 structure.
967 * ext2_err.et.in (EXT2_ET_DIRHASH_UNSUPP): New error code
969 * dirhash.c (ext2fs_dirhash): New function which calculates the
970 hash for a filename in an indexed directory.
972 2002-03-08 Theodore Tso <tytso@mit.edu>
974 * Release of E2fsprogs 1.27
976 2002-03-07 Theodore Tso <tytso@mit.edu>
978 * ext2fs.h (ext2fs_inode_io_intern): Add missing function prototype.
980 * bmap.c, fileio.c, inode_io.c, tst_badblocks.c,
981 tst_byteswap.c: Fix gcc -Wall complaints
983 * Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
984 (From Philipp Thomas <pthomas@suse.de>)
986 2002-02-25 Theodore Tso <tytso@mit.edu>
988 * ext2_fs.h: Add structure definitions for the directory indexing
991 2002-02-23 Theodore Tso <tytso@mit.edu>
993 * unix_io.c (unix_open): Fix 2.4 resource limit workaround so that
994 it doesn't break things on mis32, sparc32, and alpha
997 2002-02-21 Theodore Tso <tytso@mit.edu>
999 * ismounted.c (is_swap_device): Fix file descriptor/memory leak;
1000 we were missing an fclose().
1002 2002-02-20 Theodore Tso <tytso@mit.edu>
1004 * Makefile.in, inode_io.c, ext2fs.h, ext2_err.et.in: Add new io
1005 abstraction interface which exports an ext2 inode.
1007 * ext2fs.h, fileio.c (ext2fs_file_flush): Export ext2fs_file_flush
1008 as a public interface. Change void * to const void * in
1009 ext2fs_file_write's interface.
1011 * test_io.c (test_close), unix_io.c (unix_close): Remove unneeded
1012 conditional; save a few bytes.
1014 2002-02-12 Theodore Tso <tytso@mit.edu>
1016 * Makefile.in (tst_badblocks): Add some extra .o files when
1017 linking the debugging program tst_badblocks which are
1018 needed if we aren't compiling with inline functions enable.
1020 * kernel-list.h (__inline__): On non-gcc and non-Watcom compilers,
1021 define away __inline__ since it may not be supported.
1023 * kernel-jbd.h (jbd_debug): For systems that don't do STDC, use a
1024 stripped down jbd_debug that doesn't use variadic
1025 arguments. This will cause warnings under AIX, but things
1028 2002-02-03 Theodore Tso <tytso@thunk.org>
1030 * Release of E2fsprogs 1.26
1032 2002-02-03 Theodore Tso <tytso@mit.edu>
1034 * mkdir.c (ext2fs_mkdir): Change to use ext2fs_inode_alloc_stats2
1035 so that the number of directories in use is adjusted
1038 * alloc_stats.c (ext2fs_inode_alloc_stats2): Add new function
1039 which optionally will modify the number of directories
1042 2002-01-03 Theodore Tso <tytso@mit.edu>
1044 * dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
1045 Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
1046 which will return deleted directory entries.
1047 ext2fs_dir_iterate2 takes a new callback function which
1048 is identical with the one used by
1049 ext2fs_dblist_dir_iterate(). If the directory entry is
1050 deleted, the callback function will be called with the
1051 entry paraemter set to DIRENT_DELETED_FILE.
1053 * Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
1054 ext2fs_block_alloc_stats): New functions which update
1055 block/inode allocation statistics in the bitmaps, block
1056 group descriptors, and superblock.
1058 * mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
1059 expanddir.c (expand_dir_proc), bb_inode.c
1060 (clear_bad_block_proc, set_bad_block_proc,
1061 ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
1062 Update to use new block/inode allocation statistics.
1064 2001-12-24 Theodore Tso <tytso@mit.edu>
1066 * ismounted.c (is_swap_device): New function used by
1067 ext2fs_check_if_mounted and ext2fs_check_mount_point which
1068 determines whether or not the specified device is a swap
1069 device by using /proc/swaps. More bulletproofing for
1070 idiotic/careless system administrators!
1072 * ext2fs.h, openfs.c (ext2fs_open), initialize.c
1073 (ext2fs_initialize), mkdir.c (ext2fs_mkdir): Add a new
1074 field to struct_ext2_filsys, umask. This field is
1075 initialize to 022, and affects ext2fs_mkdir in the obvious
1076 way. (In the future umask should also affect new file
1077 creation routines, but the fileio functions don't
1078 currently support this yes.)
1080 * ismounted.c (check_mntent_file): Stat all of the entries in
1081 /etc/mtab and/or /proc/mounts in order to catch dim-witted
1082 system administrators who might have created alias
1085 2001-12-23 Theodore Tso <tytso@mit.edu>
1087 * Makefile.in, jfs_user.h: Move linux/jbd.h to
1088 ext2fs/kernel-jbd.h, to avoid using the system header
1089 file version of hbd.h when using diet glibc (since it
1090 forcibly adds /usr/include to the beginning of the
1091 include search path.)
1093 * kernel-jbd.h, kernel-list.h, jfs_compat.h: Move files from
1094 include/linux directory.
1096 2001-12-16 Theodore Tso <tytso@mit.edu>
1098 * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap),
1099 ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr),
1100 fileio.c (ext2fs_file_write): Fix gcc -Wall nits
1102 * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
1105 2001-12-03 Theodore Tso <tytso@mit.edu>
1107 * unix_io.c (unix_open): Make sure the ulimit workaround works
1108 regardless of the version of glibc which is used to
1111 2001-11-26 Theodore Tso <tytso@mit.edu>
1113 * unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
1114 trying to unset the filesize limit if at all possible,
1115 if a block device is getting opened. (The filesize limit
1116 shouldn't be applied against writes to a block device, but
1117 starting in 2.4.10, the kernel is doing this.)
1119 2001-11-05 Theodore Tso <tytso@mit.edu>
1121 * mkjournal.c (ext2fs_add_journal_inode): When creating a .journal
1122 file on adding a journal to an already-mounted filesystem,
1123 try to clear the ext2 file attributes on an already
1124 existing .journal file so that we don't fail if on a
1125 partially added journal to the filesystem.
1127 * ext2_fs.h: Define a new ext2 file attribute, EXT2_NOTAIL_FL,
1128 which signals that a particular inode should not have the
1129 last bits of data (the "tail") be merged with another
1130 file. This is necessary to keep LILO happy.
1132 2001-09-20 Theodore Tso <tytso@thunk.org>
1134 * Release of E2fsprogs 1.25
1136 2001-09-16 Theodore Tso <tytso@mit.edu>
1138 * ext2_ext_attr.h: Remove unneeded #include of <linux/config.h>
1139 which was breaking the build on the Hurd. (Addresses
1140 Debian bug #112414).
1142 2001-09-13 Theodore Ts'o <tytso@mit.edu>
1144 * ismounted.c (check_mntent_file): We now validate the entry in
1145 /etc/mtab to make sure the filesystem is really mounted,
1146 since some broken distributions (read: Slackware) have
1147 buggy boot scripts that don't initialize /etc/mtab before
1148 checking non-root filesystems. (Slackware also doesn't
1149 check the root filesystem separately, and reboot if the
1150 root filesystem had changes applied to it, which is
1151 dangerous and broken.)
1153 2001-09-02 Theodore Tso <tytso@thunk.org>
1155 * Release of E2fsprogs 1.24a
1157 2001-08-30 Theodore Tso <tytso@thunk.org>
1159 * Release of E2fsprogs 1.24
1161 2001-08-30 Theodore Tso <tytso@valinux.com>
1163 * getsize.c (ext2fs_get_device_size): Back out BLKGETSIZE64
1164 changes, since the ioctl number has been reused by another
1167 2001-08-15 Theodore Tso <tytso@valinux.com>
1169 * Release of E2fsprogs 1.23
1171 2001-08-05 Theodore Tso <tytso@valinux.com>
1173 * alloc.c (ext2fs_new_inode, ext2fs_new_block): Use the fast
1174 version of the bitmap test routines to speed up these
1175 routines. (At some point I may want to make these
1176 routines use the find_first_bit functions, but that will
1177 add a lot of complexity since it means that these
1178 functions will have to break the bitmap abstraction
1179 boundary. It's not clear it's worth it.)
1181 * mkjournal.c (mkjournal_proc): Remember the last block allocated
1182 to speed up ext2fs_new_block().
1184 2001-07-29 Theodore Tso <tytso@valinux.com>
1186 * finddev.c (scan_dir): Fix memory leak; we weren't calling
1187 closedir() when exiting the function in all cases.
1189 2001-07-27 Theodore Tso <tytso@valinux.com>
1191 * mkjournal.c (ext2fs_create_journal_superblock): Set the first
1192 block usable in the journal for external journals to be 2
1193 or 3, depending on the blocksize, so that the existing
1194 kernel code does the right thing.
1196 * getsize.c (ext2fs_get_device_size): Add support for the
1197 BLKGETSIZE64 ioctl. (Ioctl defined by unofficial patches
1198 from Ben LaHaise, but it's likely this interface won't
1201 * mkjournal.c (ext2fs_add_journal_device): Use the correct block
1202 when writing the journal superblock, too. (Oops! Needed
1203 to make 1k filesystems with external journal to work.)
1205 2001-07-26 Theodore Tso <tytso@valinux.com>
1207 * mkjournal.c (ext2fs_add_journal_device): Use the correct block
1208 to find the journal superblock if the blocksize is 1024.
1210 2001-07-21 Theodore Tso <tytso@valinux.com>
1212 * ext2_err.et.in (EXT2_ET_LOAD_EXT_JOURNAL): Add new error code
1214 2001-07-20 Theodore Tso <tytso@valinux.com>
1216 * ext_attr.c (ext2fs_write_ext_attr): When writing the extended
1217 attribute block, set the filesystem changed bit.
1219 * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
1220 Comment out these functions since we're not using them.
1222 2001-07-10 Theodore Tso <tytso@valinux.com>
1224 * closefs.c (write_primary_superblock): After writing changes to
1225 the primary superblock, update the original superblock
1226 copy so we don't have to re-write those changes in the
1228 (ext2fs_flush): Clear the superblock dirty flag after
1229 we've flushed out changes to disk.
1231 2001-07-07 Theodore Tso <tytso@valinux.com>
1233 * bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx
1234 to avoid register conflicts when compiling in PIC mode.
1236 2001-07-04 Theodore Tso <tytso@valinux.com>
1238 * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
1239 Add new functions (C and in i386 assembler) which quickly
1240 find bits set in a bitmask.
1242 2001-06-23 Theodore Tso <tytso@valinux.com>
1244 * Makefile.in, ext_attr.c, ext2_attr.c, ext2fs.h: Add new files
1245 ext2_ext_attr.h and ext_attr.c for extended attributes
1248 * Release of E2fsprogs 1.22
1250 2001-06-22 Theodore Tso <tytso@valinux.com>
1252 * mkjournal.c (ext2fs_add_journal_inode): Move close of file
1253 descriptor so that adding a journal to a mounted
1254 filesystem doesn't die. (Fixes a bug accidentally
1255 introduced in e2fsprogs 1.21.)
1257 * mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
1258 HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
1259 fchflags without defining UF_NODUMP. (Addresses Debian
1262 * flushb.c: Use platform independent method of defining the
1263 BLKFLSBUF and FDFLUSH ioctl's. Also include sys/mount.h
1264 since on newer glibc's BLKFLSBUF is defined there.
1266 * bitops.h: The C language versions of ext2fs_swab16/32 need to be
1267 included if EXT2FS_ENABLE_SWAPFS is defined, since we need
1268 to support byte swapping even if we don't support the
1269 conversion functions. (Fixes Debian bug #101686).
1271 * dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2
1272 since the byte-swapping code all assumes the
1273 ext2_dir_entry structure. (It's a question of whether or
1274 not name_len should be byte-swapped or not, and whether
1275 it's a 16 bit or 8 bit field.)
1277 2001-06-15 Theodore Tso <tytso@valinux.com>
1279 * Release of E2fsprogs 1.21
1281 2001-06-15 Theodore Tso <tytso@valinux.com>
1283 * Makefile.in: Fix bug in installation of ext2_types.h. It is a
1284 file which is generated and is therefore found in the
1285 build directory, not source directory.
1287 * ismounted.c (check_mntent_file): Use a test file in / to check
1288 to see if the root filesystem is mounted read-only. This
1289 protects against the case where /etc might not be on /, as
1290 well as the case where /etc/mtab doesn't exist. (Both are
1291 should-never happen scenarios, but you never know...)
1293 2001-06-14 Theodore Tso <tytso@valinux.com>
1295 * ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.
1296 Remove unneeded #pragma argsused, since the arguments are
1299 2001-06-13 Theodore Tso <tytso@valinux.com>
1301 * ext2_types.h.in: If linux/types.h has been defined, then don't
1302 try to redefine the typedefs.
1304 * Makefile.in (HFILES): Add ext2_types.h to the list of files
1305 which should be installed.
1307 * ismounted.c (check_mntent_file): Work around GNU hurd brain
1308 damage. Addresses Debian bug #100304.
1310 * Makefile.in: Limit some .o files from being included into the
1311 library if --disable-debugfs, --disable-swapfs,
1312 --disable-imager, or --disable-resizer are used.
1314 2001-06-12 Theodore Tso <tytso@valinux.com>
1316 * inode.c, tst_iscan.c: Stop using the compatibility badblocks
1317 function, and use the ext2fs_badblocks_* functions
1320 2001-06-11 Theodore Tso <tytso@valinux.com>
1322 * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
1323 ext2fs_mark_generic_bitmap and
1324 ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal
1325 functions. (This saves space and doesn't significantly
1326 change the speed of e2fsck on a P-III.)
1328 * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c,
1329 inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only
1330 include the byte-swapping logic if ENABLE_SWAPFS is turned
1331 on or if we're on a big-endian machine.
1333 * initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to
1334 set EXT2_FLAG_SWAP_BYTES, instead of using
1337 * native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
1338 autoconf to determine whether or not return
1339 EXT2_FLAG_SWAP_BYTES.
1341 2001-06-10 Theodore Tso <tytso@valinux.com>
1343 * Makefile.in: Remove the dependence on the libe2p library.
1345 * mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags
1346 with direct usage of the ioctl/fchflags so that we don't
1347 have to depend on the libe2p library.
1349 2001-06-08 Theodore Tso <tytso@valinux.com>
1351 * ext2_types.h.in: Use unsigned ints in favor of unsigned longs
1352 when trying to find a 32-bit wide type.
1354 * icount.c (insert_icount_el): Fix the code used to estimate the
1355 size of the new icount array to be more intelligent, to
1356 avoid reallocating the array too many times. Thanks to
1357 Enrique Perez-Terron for pointing this out.
1359 2001-06-02 Theodore Tso <tytso@valinux.com>
1361 * valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks
1362 for a symlink to determine whether it is a fast symlink.
1364 2001-06-01 Theodore Tso <tytso@valinux.com>
1366 * Makefile.in, dosio.c, ext2_fs.h, ext2_types.h.in, ext2fs.h:
1367 Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in.
1369 2001-05-25 Theodore Tso <tytso@valinux.com>
1371 * Release of E2fsprogs 1.20
1373 2001-05-25 Theodore Tso <tytso@valinux.com>
1375 * ismounted.c: More cleanups for ismounted.c, some from Andreas,
1376 some to clean up Andreas's patches. Use strncpy instead
1377 of strcpy to save the root's mountpoint. Clean up #ifdef
1378 structure. Remove uneeded variable in testing/debug driver.
1380 2001-05-24 Andreas Dilger <adilger@turbolinux.com>
1382 * ismounted.c: Add check for root device which doesn't depend on
1383 /etc/fstab or /proc/mounts to be correct. Don't call
1384 endmntent() before we are done with mnt struct.
1386 2001-05-23 Theodore Tso <tytso@valinux.com>
1388 * ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error
1391 2001-05-21 Theodore Tso <tytso@valinux.com>
1393 * ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to
1394 make room for pre-existing usage of
1395 EXT2_FEATURE_COMPAT_EXT_ATTR. Add flag EXT2_INDEX_FL with
1396 the same codepoint as EXT2_BTREE_FL.
1398 2001-05-20 Theodore Tso <tytso@valinux.com>
1400 * ext2fs.h: #include <> instead of "" for ext2fs and et header
1401 files, since they will be installed in /usr/include
1403 2001-05-14 Theodore Tso <tytso@valinux.com>
1405 * alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
1406 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
1407 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
1408 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
1409 expanddir.c, ext2_fs.h, fileio.c, finddev.c, flushb.c,
1410 freefs.c, get_pathname.c, getsize.c, icount.c, imager.c,
1411 initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
1412 link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c,
1413 newdir.c, nt_io.c, openfs.c, read_bb.c, read_bb_file.c,
1414 rs_bitmap.c, rw_bitmaps.c, swapfs.c, test_io.c,
1415 tst_badblocks.c, tst_byteswap.c, tst_getsize.c,
1416 tst_iscan.c, unix_io.c, unlink.c, valid_blk.c, version.c,
1417 write_bb_file.c, ext2_fs.h: Moved file from include/linux.
1418 Adjust all files in this directroy to include this file.
1420 * mkjournal.c (ext2fs_create_journal_superblock): Remove redundant
1423 2001-05-05 Theodore Tso <tytso@valinux.com>
1425 * fileio.c (ext2fs_file_read): Factored out common code and
1426 cleaned up function. Fixed a bug where if there was an
1427 error reading from the disk, the number of bytes read
1428 wasn't reliably set. (Fixes Debian bug #79163)
1429 (ext2fs_file_write): Factored out common code and made
1430 function more efficient; if writing a full block, don't
1431 bother to do a read-modify-write cycle.
1433 2001-05-04 Theodore Tso <tytso@valinux.com>
1435 * dirblock.c (ext2fs_read_dir_block): Check for an directory
1436 record length which isn't a multiple four, and treat that
1437 as an invalid. Scan the directory and return an error
1438 (EXT2_ET_DIR_CORRUPTED) if the directory records are
1440 (ext2fs_write_dir_block): If while byte-swapping the
1441 directory block, if there's an error, abort and return
1442 EXT2_ET_DIR_CORRUPTED.
1444 2001-05-02 Theodore Tso <tytso@valinux.com>
1446 * ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add
1447 image_header field in the ext2_filsys structure
1449 * block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind):
1450 * inode.c (ext2fs_read_inode):
1451 * rw_bitmaps.c (read_bitmaps):
1452 * openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
1454 * imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make
1455 sure the full bitmap is saved.
1457 2001-05-01 Theodore Tso <tytso@valinux.com>
1459 * e2image.h (struct ext2_image_hdr): Add space for the device name
1460 in the image header.
1462 * dir_iterate.c (ext2fs_process_dir_block): Add a double-check to
1463 make sure the rec_len is a multiple of 4, to prevent
1464 bus-errors on architectures which care about mis-aligned
1467 2001-04-25 Theodore Tso <tytso@valinux.com>
1469 * getsize.c (ext2fs_get_device_size): Use an unsigned long to
1470 query the device sizes using the BLKGETSIZE ioctl.
1472 2001-04-16 Theodore Tso <tytso@valinux.com>
1474 * ismounted.c (check_mntent): Check /proc/mounts on Linux systems
1475 before checking /etc/mtab. The EXT2_MF_READONLY flag is
1476 now set from the /etc/mtab options field for all
1477 filesystems, not just the root filesystem. Add debugging
1478 code to make it easier to test ext2fs_check_if_mounted().
1480 * mkjournal.c (ext2fs_create_journal_superblock): Add safety
1481 check; return an error if there's an attempt to create a
1482 journal less than 1024 filesystem blocks.
1484 * ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
1485 EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
1487 2001-02-20 Theodore Tso <tytso@valinux.com>
1489 * bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly
1492 * tst_byteswap.c: New function to test the byteswap functions.
1493 Add to regression test suite.
1495 2001-02-08 Theodore Tso <tytso@valinux.com>
1497 * e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
1499 2001-02-07 Theodore Tso <tytso@valinux.com>
1501 * mkjournal.c (ext2fs_create_journal_superblock): Fix the setting
1502 of s_first for external devices to always be 1, since
1503 jsb->s_first is always relative to the start of the
1504 journal superblock. Use htonl(1) when setting s_nr_users.
1506 2001-01-17 Theodore Ts'o <tytso@valinux.com>
1508 * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
1509 device number of the filesystem (instead of the journal)
1510 was being dropped into s_journal_dev.
1512 2001-01-15 Theodore Ts'o <tytso@valinux.com>
1514 * initialize.c (ext2fs_initialize): Add support for initializing
1515 the ext2 superblock for external journal devices. This
1516 basically means we don't bother to allocate any block
1519 * openfs.c (ext2fs_open): Only open external journal devices if
1520 the new flag EXT2_FLAG_JOURNAL_DEV_OK is passed to
1521 ext2fs_open. When opening such devices, don't try to read
1522 the block group descriptors, since they're not there.
1524 * ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code
1526 * mkjournal.c: Export a new function,
1527 ext2fs_create_journal_superblock(), which allocates and
1528 returns a buffer containing a journal superblock. This is
1529 needed by mke2fs to create an external journal. Rewrote
1530 ext2fs_add_journal_device() so that it no longer creates
1531 the external journal, but rather adds a filesystem to an
1532 existing external journal. It handles all of the UUID
1535 * ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported
1536 by the library. Define the EXT2_FLAG_JOURNAL_DEV_OK.
1537 Changed function prototype for ext2fs_add_journal_device().
1539 2001-01-14 Theodore Ts'o <tytso@valinux.com>
1541 * closefs.c (ext2fs_flush): Don't write out anything beyond the
1542 primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is
1545 2001-01-12 Theodore Ts'o <tytso@valinux.com>
1547 * imager.c: Fix gcc -Wall complaints and a series of bugs where
1548 retval wasn't set correctly. (Thanks to Andreas Dilger
1549 for pointing this out.)
1551 2001-01-11 <tytso@snap.thunk.org>
1553 * flushb.c (ext2fs_sync_device): New function which centralizes
1554 all of the places which might try to use the BLKFLSBUF
1555 or FDFLUSH ioctls (and usually failing to define them
1556 since the system header files don't usually do this for
1557 us, and we're trying to avoid usage of kernel include
1560 2001-01-10 <tytso@snap.thunk.org>
1562 * alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c,
1563 bmove.c, brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c,
1564 dir_iterate.c, expanddir.c, ext2fs.h, ext2fsP.h, fileio.c,
1565 finddev.c, get_pathname.c, icount.c, inode.c, irel.h,
1566 irel_ma.c, ismounted.c, link.c, lookup.c, mkdir.c,
1567 mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
1568 tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to
1569 ext2_ino_t, to protect applications that attempt to
1570 compile -D_FILE_OFFSET_BITS=64, since this inexplicably
1571 changes ino_t(!?). So we use ext2_ino_t to avoid an
1572 unexpected ABI change.
1574 2001-01-05 <tytso@snap.thunk.org>
1576 * dirblock.c (ext2fs_read_dir_block): Fix a potential case where
1577 we may overrun allocated memory in case of a corrupted
1578 filesystem (or an e2fsck test case :-) when byte-swapping
1579 the directory block.
1581 * ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
1583 * mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
1584 complaints including a missing return 0 at the end of
1585 ext2fs_add_journal_device.
1587 2001-01-03 <tytso@snap.thunk.org>
1589 * Makefile.in: Link in libe2p when creating libext2fs as a shared
1590 library, since mkjournal.c now references fsetflags().
1592 * mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas
1593 Dilger's changes (with fixups) to allow on-line creation
1596 * ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
1597 EXT2_FLAG_SUPER_ONLY, which the close routines to only
1598 update the superblock, and not the group descriptors.
1600 2000-12-30 Andreas Dilger <adilger@turbolinux.com>
1602 * ismounted.c: add ext2fs_check_mount_point() function, which will
1603 optionally return the mount point of a device if mounted
1605 2000-12-14 Andreas Dilger <adilger@turbolinux.com>
1607 * mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
1608 ext2fs_add_journal_inode()
1610 2001-01-01 <tytso@snap.thunk.org>
1612 * ext2fs.h: Remove definition of ext2fs_sb. Note: this may break
1613 source (but not binary) compatibility of some users of the
1614 ext2 library. They should just simply do a global search
1615 and replace of struct ext2fs_sb with struct
1616 ext2_super_block, and use their own private copy of
1617 ext2_fs.h if they aren't already.
1619 * closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c:
1620 Replace use of ext2fs_sb with ext2_super_block.
1622 2000-12-31 <tytso@snap.thunk.org>
1624 * ext2fs.h: Cleaned up header file by removing definitions of
1625 feature flags that might not have been defined in older
1626 ext2 header files. Now that we're using our own
1627 include/linux/ext2fs.h header file, this can never happen.
1629 * jfs_dat.h: Removed old header file which is no longer needed.
1631 2000-12-13 Theodore Ts'o <tytso@valinux.com>
1633 * closefs.c (ext2fs_update_dynamic_rev): New function suggested
1634 by Andreas Dilger to update the filesystem revision to
1637 * swapfs.c (ext2fs_swap_super): Add byte swapping for the journal
1640 2000-12-09 <tytso@snap.thunk.org>
1642 * ext2fs.h, mkjournal.c (ext2fs_add_journal_inode,
1643 ext2fs_add_journal_device): Add a new argument to the APIs
1644 of these function, which is a flags word. This is used to
1645 allow the creation of a V1 superblock for those folks who
1646 are using ext3 0.3b in production. Note, the user-land
1647 interface for getting at this flag won't be documented, as
1648 the V1 superblock is deprecated.
1650 * mkjournal.c (init_journal_superblock): Sync Stephen's changes
1651 which creates a V2 superblock instead of a V1 superblock.
1653 2000-11-21 <tytso@snap.thunk.org>
1655 * test_io.c (test_write_blk, test_write_byte): Fix typos pointed
1656 out by Andreas Dilger.
1658 2000-11-05 <tytso@snap.thunk.org>
1660 * imager.c (ext2fs_image_{inode,super,bitmap}_{read,write},
1661 ext2_fs.h, Makefile.in: New file that has routines that
1662 save ext2fs metadata to a file.
1664 * ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
1666 * e2image.h: New file which defines the file format for the ext2
1667 image file. (Saved copy of ext2 metadata to a file as a
1668 saving throw against worst-case damage.)
1670 2000-11-01 <tytso@snap.thunk.org>
1672 * inode.c (ext2fs_flush_icache): Add new function
1673 ext2fs_flush_icache() which flushes the internal inode
1674 cache. Applications which modify the inode table blocks
1675 directly must call this function.
1677 2000-10-26 <tytso@snap.thunk.org>
1679 * mkjournal.c: Add #include of netinet/in.h, since Solaris
1680 requires it for ntohl().
1682 * ext2_io.h (io_channel_write_byte): Add new interface to allow
1683 callers to write specific byte ranges. This is an
1684 optional interface, which not all IO channels may
1687 * unix_io.c (unix_write_byte):
1688 * test_io.c (test_write_byte): Add implementation of the
1689 write_byte function.
1691 * closefs.c (write_primary_superblock, ext2fs_flush): Add a new
1692 function which writes the primary superblock. If the IO
1693 channel supports writing raw bytes directly, only fields
1694 which were modified are written to the disk. This makes
1695 it safe(r) to use utilities like tune2fs on a mounted
1698 * freefs.c (ext2fs_free): Free the original superblock if it is
1701 * openfs.c (ext2fs_open): Store a copy of the original superblock
1704 * ext2fs.h: Add a field to store the original superblock in the
1705 ext2 context structure.
1707 2000-10-24 <tytso@snap.thunk.org>
1709 * llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we
1710 don't need to use llseek).
1712 2000-10-24 <tytso@valinux.com>
1714 * Makefile.in, ext2fs.h, jfs_dat.h, mkjournal.c: Add functions for
1715 creating an ext3 journal on a filesystem.
1717 2000-08-21 <tytso@valinux.com>
1719 * ext2_err.et.in (EXT2_JOURNAL_NOT_BLOCK): Add new error code.
1721 2000-08-22 <tytso@valinux.com>
1723 * unix_io.c: Make massive changes to support a multiple block
1724 writethrough cacheing.
1726 * ext2_io.h: Added flags field to the io_channel structure.
1728 2000-08-19 <tytso@valinux.com>
1730 * finddev.c, ext2fs.h, Makefile.in: Add new file, finddev.c, which
1731 provides the function ext2fs_find_block_device(). This
1732 function returns the pathname to a block device, given its
1735 2000-07-13 <tytso@valinux.com>
1737 * Release of E2fsprogs 1.19
1739 2000-07-07 Theodore Ts'o <tytso@valinux.com>
1741 * ext2fs.h (EXT2_LIB_FEATURE_INCOMPAT_SUPP): Add
1742 EXT3_FEATURE_INCOMPAT_RECOVER (aka needs_recovery) to the
1743 list of filesystem flags supported by the library.
1745 2000-07-04 Theodore Ts'o <tytso@valinux.com>
1747 * ext2fs.h: Update to include latest journalling additions to the
1750 * dll/jump.funcs: Add new jumptable entries for
1751 ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
1752 ext2fs_badblocks_equal.
1754 * tst_badblocks.c: Update test program to test
1755 ext2fs_read_bb_FILE2 and ext2fs_write_FILE.
1757 * write_bb_file.c (ext2fs_write_bb_FILE): New function which
1758 writes out bad blocks list to a file.
1760 * read_bb_file.c (ext2fs_read_bb_FILE2): Add new function which
1761 changes the callback function to take two additional
1762 arguments; a private blind pointer supplied by the caller,
1763 and pointer to a char * containing a pointer to the
1766 * badblocks.c (ext2fs_badblocks_equal): Add new function which
1767 returns true if two badblocks list are equal.
1769 * Makefile.in: Remove explicit link of -lc in the shared library.
1770 (It shouldn't be necessary, and is harmful in some cases).
1772 2000-06-10 Theodore Ts'o <tytso@valinux.com>
1774 * getsize.c (main): Add debugging code under #ifdef DEBUG
1776 2000-05-27 Theodore Ts'o <tytso@valinux.com>
1778 * mkdir.c (ext2fs_mkdir): Read the parent directory's inode
1779 earlier, so that if there's an error reading it, we can
1780 more cleanly back out of the operation.
1782 2000-05-25 <tytso@snap.thunk.org>
1784 * getsize.c (ext2fs_get_device_size): Use open64() instead of
1785 open() if it exists. Under linux, manually define the
1786 ioctl for BLKGETSIZE if it isn't already defined and it's
1789 * unix_io.c (unix_open): Use open64() instead of open() if it
1792 * llseek.c: Simplify header includes of unistd.h. If lseek64 is
1793 available (and prototypes are defined) use it in
1794 preference to llseek.
1796 * Makefile: Add hack dependency rule so that parallel makes work
1799 2000-05-18 Theodore Ts'o <tytso@valinux.com>
1801 * ext2fs.h: Add appropriate ifdef's to support C++ compilation.
1803 2000-04-03 Theodore Ts'o <tytso@valinux.com>
1805 * block.c: Readibility tweak in conditionals involving
1808 * ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine
1809 how to define __s64 and __u64. Turn off "compression is
1810 experimental" warning if the cpp macro
1811 I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is defined.
1813 2000-02-11 <tytso@snap.thunk.org>
1815 * ext2fs.h: Define EXT2FS_COMPRESSED_BLKADDR and HOLE_BLKADDR.
1816 Conditionally include Compression as a supported type if
1817 ENABLE_COMPRESSION (via --enable-compression) is turned on.
1819 * swapfs.c (ext2fs_swap_super): Swap the compression usage bitmap.
1821 2000-02-08 <tytso@snap.thunk.org>
1823 * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
1824 ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
1825 ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap):
1826 Change to return the previous state of the bit that is
1827 being marked or unmarked. For speed optimization.
1829 2000-02-02 Theodore Ts'o <tytso@valinux.com>
1831 * getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
1833 * swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not
1834 needed any more; we know it will always be i_generation.
1835 Add support for swapping the high bits of the uid and gid.
1837 1999-11-19 <tytso@valinux.com>
1839 * mkdir.c (ext2fs_mkdir): Only update the parent's inode link
1840 counts if the link was successful. Patch suggested by
1843 * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
1844 the source directory.
1846 1999-11-10 <tytso@valinux.com>
1848 * Release of E2fsprogs 1.18
1850 1999-11-08 <tytso@valinux.com>
1852 * Makefile.in (tst_badblocks): Add freefs.o to the object list,
1853 since ext2fs_badblocks_list_free was moved to freefs.c.
1855 * tst_badblocks.c: Use the newer badblocks API names. Add
1856 duplicate blocks to the test inputs to test dealing with
1857 adding blocks which are already in the badblocks list.
1859 * badblocks.c (ext2fs_badblocks_list_add): If appending to the end
1860 of the list, use a shortcut O(1) operations instead of an
1861 O(n) operation. (Idea suggested by David Beattie.)
1863 * freefs.c (ext2fs_free): Use ext2fs_badblocks_list_free() instead
1864 of badblocks_list_free(), to save a procedure call.
1866 1999-10-26 <tytso@valinux.com>
1868 * Release of E2fsprogs 1.17
1870 1999-10-26 <tytso@valinux.com>
1872 * ext2fs.h: Add kludge to deal with the fact that egcs cpp doesn't
1873 seem to handle ~0UL the same way as they used to.
1875 1999-10-25 <tytso@valinux.com>
1877 * nt_io.c (_OpenNtName): Open the device using
1878 FILE_SYNCHRONOUS_IO_NONALERT instead of
1879 FILE_SYNCHRONOUS_IO_ALERT
1880 (nt_open): At the end of the device open routine, unlock
1881 the drive but do not dismount it.
1883 * initialize.c (CREATOR_OS): Use __GNU__ instead of __gnu__ to
1886 1999-10-22 <tytso@valinux.com>
1888 * Release of E2fsprogs 1.16
1890 1999-10-22 <tytso@valinux.com>
1892 * mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link().
1894 * link.c (ext2fs_link): This call now uses the low three bits of
1895 the flags parameter to pass the directory filetype
1896 information; it will set the directory entry FILETYPE
1897 information if the filesystem supports it.
1899 * newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock
1900 option is set, then create the '.' and '..' entries with
1901 the filetype set to EXT2_FT_DIR.
1903 1999-09-24 <tytso@valinux.com>
1905 * nt_io.c: New file which supports I/O under Windows NT.
1907 1999-09-07 <tytso@valinux.com>
1909 * ext2fs.h: Add new fields for journalling and define new
1910 feature bits used by newer filesystems: IMAGIC_INODES,
1911 HAS_JOURNAL, RECOVER.
1913 * expanddir.c (ext2fs_expand_dir, expand_dir_proc): Change where
1914 we update the inode block count and size files so that the
1915 block count field is updated correctly when we create an
1918 1999-07-18 Theodore Ts'o <tytso@valinux.com>
1920 * Release of E2fsprogs 1.15
1922 1999-06-23 <tytso@valinux.com>
1924 * swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3
1925 kernels that use i_generation instead of i_version. Patch
1926 supplied by Jon Bright <sircus@sircus.demon.co.uk>.
1928 1999-06-21 <tytso@valinux.com>
1930 * dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
1931 directory entry before calling the callback function.
1932 This should prevent some core dumps of insufficiently
1933 paranoid callback functions.
1935 1999-05-29 <tytso@rsts-11.mit.edu>
1937 * ext2fs.h: Add feature definition for AFS IMAGIC inodes.
1939 * fileio.c (ext2fs_file_open): Remove obsolete comment stating
1940 that we don't handle writing yet (we do). Fixed bug where
1941 we weren't allocating a big enough buffer for ext2_bmap.
1943 1999-05-03 <tytso@rsts-11.mit.edu>
1945 * openfs.c (ext2fs_open): Check to make sure that the number of
1946 blocks per group is not zero --- if so, it must be a bad
1949 1999-01-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
1951 * Release of E2fsprogs 1.14
1953 1999-01-07 Theodore Ts'o <tytso@rsts-11.mit.edu>
1955 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if
1956 the inode number is zero; if it's zero, return
1957 EXT2_ET_BAD_INODE_NUM.
1959 1998-12-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
1961 * initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead
1962 of EXT2_FIRST_INO to ensure compatibility with Linux 1.2
1965 Mon Jan 4 02:32:09 1999 Theodore Y. Ts'o <tytso@mit.edu>
1967 * llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the
1968 non-Linux case to use EINVAL by default, unless it isn't
1969 defined, in which case we use EXT2_ET_INVALID_ARGUMENT
1972 1998-12-15 Theodore Ts'o <tytso@rsts-11.mit.edu>
1974 * Release of E2fsprogs 1.13
1976 1998-12-03 Theodore Ts'o <tytso@rsts-11.mit.edu>
1978 * Makefile.in: Updated dependencies.
1980 1998-09-22 Theodore Ts'o <tytso@rsts-11.mit.edu>
1982 * initialize.c (ext2fs_initialize): Make sure that we allocate
1983 enough inodes so that we can make a valid filesystem.
1985 1998-09-02 Theodore Ts'o <tytso@rsts-11.mit.edu>
1987 * rw_bitmaps.c: Fixed signed/unsigned warnings.
1989 * fileio.c (ext2fs_file_set_size): Remove unneeded extern from the
1990 function declaration.
1992 * dblist.c (make_dblist): Add safety check in case the dblist
1993 pointer passed in is null (in which case, assign it to
1994 fs->dblist). Fixed some signed/unsigned warnings.
1996 * bmap.c: Make addr_per_block be of type blk_t to avoid
1997 signed/unsigned warnings.
1999 * namei.c (ext2fs_follow_link): Remove uneeded extern from the
2000 function declaration.
2002 * get_pathname.c (get_pathname_proc): Use return value from
2003 ext2fs_get_mem, instead of checking if &gp->name is
2006 * dir_iterate.c (ext2fs_process_dir_block):
2007 * dblist_dir.c (ext2fs_dblist_dir_iterate): Remove uneeded extern
2008 from the function declaration.
2010 * block.c (ext2fs_block_iterate2): If the read_inode call fails,
2011 return the error directly instead of jumping to the
2012 cleanup routine, since we don't need to do any cleanup.
2014 * alloc_table.c (ext2fs_allocate_group_table): Make this
2015 function take a dgrp_t for its group argument.
2017 * ext2fs.h: Make dgrp_t an __u32 type, and make
2018 fs->desc_group_count be of type dgrp_t.
2020 1998-07-27 Theodore Ts'o <tytso@rsts-11.mit.edu>
2022 * badblocks.c (ext2fs_badblocks_list_add): Use a bigger increment
2023 than 10 blocks when we need to expand the size of the
2026 1998-07-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
2028 * Release of E2fsprogs 1.12
2030 1998-06-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
2032 * closefs.c (ext2fs_flush): Update the s_block_group_nr field as
2033 appropriate for all of the block group copies, so that
2034 it's clear where the beginning of the filesystem is on the
2035 disk. (For when the partition table gets scrod.)
2037 * ext2fs.h: Change the name of the feature from
2038 EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE to
2039 EXT2_FEATURE_INCOMPAT_FILESIZE (to match with the kernel).
2041 1998-06-18 Theodore Ts'o <tytso@rsts-11.mit.edu>
2043 * inode.c (get_next_blockgroup): Fix bug where if
2044 get_next_blockgroup() is called early because of a missing
2045 inode table in a block group, the current_inode counter
2046 wasn't incremented correctly.
2048 1998-06-16 Theodore Ts'o <tytso@rsts-11.mit.edu>
2050 * read_bb.c (ext2fs_read_bb_inode): Make function more robust
2051 against a completely trashed bad block inode.
2053 1998-06-10 Theodore Ts'o <tytso@rsts-11.mit.edu>
2055 * alloc_tables.c (ext2fs_allocate_group_table): Fix bug so that if
2056 the stride length hits a bad value, we retry the block
2057 allocation starting at the beginning of the block group.
2059 * ext2fs.h, bb_inode.c, block.c, bmove.c, dir_iterate.c,
2060 expanddir.c, ext2fsP.h, read_bb.c: Change blkcnt_t to be
2061 e2_blkcnt_t to avoid collision with LFS API.
2063 1998-05-01 Theodore Ts'o <tytso@rsts-11.mit.edu>
2065 * initialize.c (ext2fs_initialize): Initialize s_inodes_count in a
2066 way that avoids overflows on disk sizes greater than 4GB.
2068 1998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
2070 * ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the
2071 return type for comparison functions for qsort.
2073 * dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function
2076 1998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
2078 * ext2fs.h, bitops.h: Add support for the Watcom C compiler to do
2081 * ext2fs.h, dosio.c: Use asm/types.h instead of linux/types.h to
2082 evade a potential problem with glibc's header files trying
2083 to spike out linux/types.h.
2085 * ext2fs.h (ext2fs_resize_mem): Change the function prototype to
2086 include the old size of the memory, which is needed for
2087 some braindamaged memory allocation systems that don't
2090 * badblocks.c (ext2fs_badblocks_list_add):
2091 bb_inode.c (clear_bad_block_proc):
2092 dblist.c (ext2fs_add_dir_block):
2093 icount.c (insert_icount_el):
2094 irel_ma.c (ima_put):
2095 rs_bitmap.c (ext2fs_resize_generic_bitmap): Update functions to
2096 pass the old size of the memory to be resized to
2097 ext2fs_resize_mem().
2099 1998-03-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
2101 * Makefile.in: Change to use new installation directory variables
2102 convention. Fix uninstall rules to take $(DESTDIR) into
2105 1998-03-29 Theodore Ts'o <tytso@rsts-11.mit.edu>
2107 * ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform
2108 with 32 bit longs, then we need to manually define __s64
2109 and __u64, since the current kernel header files don't
2110 define these if __STRICT_ANSI__ is defined. This is a
2111 problem if we are compiling with full GCC warnings, since
2112 we do need 64 bit support.
2114 * Makefile.in (OBJS): Remove bmove.o from files to be built,
2115 since we're not using ext2fs_move_blocks() and there
2116 is some question as to its usefulness in its current
2119 * bmap.c (block_bmap): Remove unused function.
2121 * bmove.c (process_block): Fix -Wall warning.
2123 1998-03-23 Theodore Ts'o <tytso@rsts-11.mit.edu>
2125 * block.c (ext2fs_block_iterate3): Make the ref_offset field
2126 contain the offset into the inode.i_blocks array when
2127 ref_block is zero. Since we haven't done a formal
2128 release of e2fsprogs since block_iterate2 was first
2129 introduced, I removed block_iterate2, and renamed
2130 block_iterate3 to be block_iterate2.
2132 * bb_inode.c, bmove.c, dblist_dir.c, dir_iterate.c,
2133 expanddir.c, ext2fs.h, ext2fsP.h, read_bb.c: Change
2134 use of block_iterate and block_iterate2 to
2135 block_iterate2 with the new prototype for the
2136 interator function. (using blkcnt_t forr blockcount)
2138 1998-03-21 Theodore Ts'o <tytso@rsts-11.mit.edu>
2140 * ext2fs.h: Add new superblock fields (s_algorithm_usage_bitmap,
2141 s_prealloc_blocks, s_prealloc_dir_blocks). Added
2142 conditional defines of new features COMPAT_DIR_PREALLOC,
2143 RO_COMPAT_LARGE_FILE RO_COMPAT_BTREE_DIR,
2144 INCOMPAT_COMPRESSION, INCOMPAT_DIRNAME_SIZE. Changed
2145 the library to declare that we support COMPAT_DIR_PREALLOC,
2146 INCOMPAT_DIRNAME_SIZE, RO_COMPAT_LARGE_FILE.
2148 * fileio.c: Rename function ext2fs_file_llseek to be
2149 ext2fs_file_lseek, which is more accurate.
2151 * block.c: Add new function ext2fs_block_iterate3 which calls
2152 the iterator function with the blockcount argument of
2153 type blkcnt_t. This version of the function is
2154 allowed to handle large files; the other fucntions are
2157 * ext2fs.h: Add new type blkcnt_t
2159 * ext2_err.et.in: Add error code EXT2_ET_FILE_TOO_BIG
2161 * block.c (ext2fs_block_iterate2): Fix bug where the block count
2162 field wasn't getting correctly incremented for sparse
2163 files when the indirect or doubly-indirect block
2164 specified in the inode was zero.
2166 Sun Mar 8 22:42:47 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2168 * unlink.c (unlink_proc):
2169 * lookup.c (lookup_proc):
2170 * link.c (link_proc):
2171 * get_pathname.c (get_pathname_proc):
2172 * dir_iterate.c (ext2fs_process_dir_block): Mask off high 8 bits
2173 from dirent->name_len, so it can be used for other
2176 * ext2fs.h: Add definition of EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE,
2177 and indicate that we have support for this incompatible
2180 Mon Feb 23 08:46:33 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2182 * ext2_err.et.in: Added new error code, EXT2_ET_CANCEL_REQUESTED.
2184 Fri Feb 20 23:58:01 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2186 * dblist.c (ext2fs_get_num_dirs): Improve the estimation of the
2187 number of directories when the block group information is
2190 1998-02-20 Theodore Y. Ts'o <tytso@edt.mit.edu>
2192 * inode.c (ext2fs_get_next_inode): Always do the check to see if the
2193 inode table is missing so that we catch the case where the
2194 first block group is missing.
2196 * getsize.c, ismounted.c, unix_io.c: #include errno.h since it's
2199 Mon Feb 16 16:16:00 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2201 * ext2_io.h, ext2fs.h: Protect against being included multiple times.
2203 * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
2205 * test_io.c (test_flush): Add a debugging printf when the flush
2208 * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
2209 read in, return right away.
2211 Sun Feb 1 08:20:24 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2213 * bitops.h: Don't try to do i386 inline asm functions if the
2216 * ext2fs.h: If EXT2_FLAT_INCLUDES is defined, #include e2_types.h,
2217 instead of linux/types.h, and e2_bitops.h instead of
2220 * icount.c, version.c: Don't #include <et/com_err.h>, as it isn't
2223 Sat Jan 17 13:13:31 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2225 * inode.c (ext2fs_open_inode_scan): Initialize the group variables
2226 so that we don't need to call get_next_blockgroup() the
2227 first time around. Saves a bit of time, and prevents us
2228 from needing to assign -1 to current_group (which is an
2231 * icount.c (insert_icount_el): Cast the estimated number of inodes
2232 from a float to an ino_t.
2234 * alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
2235 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
2236 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
2237 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
2238 expanddir.c, ext2fs.h, fileio.c, freefs.c,
2239 get_pathname.c, getsize.c, icount.c, initialize.c,
2240 inline.c, inode.c, irel_ma.c, ismounted.c, link.c,
2241 lookup.c, mkdir.c, namei.c, native.c, newdir.c,
2242 openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
2243 rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
2244 tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c,
2245 valid_blk.c, version.c: If EXT2_FLAT_INCLUDES is
2246 defined, then assume all of the
2247 ext2-specific header files are in a flat directory.
2249 * block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
2250 all assignments from void * to be compatible with C++.
2252 Tue Jan 6 11:28:15 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2254 * closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
2255 make sure the contents of the disk are flushed to disk.
2257 Mon Dec 29 14:39:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2259 * dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
2260 avoid C++ namespace clash.
2262 * bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
2263 avoid C++ namespace clash.
2265 * ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
2266 irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
2267 ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
2268 unlink.c: Change private to be priv_data (to avoid C++
2271 Fri Nov 28 09:26:31 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2273 * dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more
2274 paranoid about validating the directory counts from the
2275 block group information.
2277 * all files: Don't include stdlib.h anymore; include it in
2278 ext2_fs.h, since that file requires stdlib.h
2280 Thu Nov 20 16:07:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2282 * expanddir.c (ext2fs_expand_dir): Check to make sure the block
2283 bitmap is loaded, and return an error if it is not.
2284 (expand_dir_proc): Only use ext2fs_write_dir_block when
2285 writing a directory block, not when writing out a fresh
2288 Tue Nov 11 22:46:45 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2290 * Makefile.in, tst_getsize.c: Added new file which is used to test
2291 the ext2fs_get_device_size function.
2293 * ext2_err.et.in (EXT2_ET_UNIMPLEMENTED): Added new error code.
2295 Sun Nov 2 20:36:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2297 * ext2fs.h: Make ext2fs_get_mem take an unsigned argument.
2299 * fileio.c (ext2fs_file_get_size, ext2fs_file_set_size,
2300 ext2fs_file_get_fs): New functions added.
2303 Fri Oct 31 12:16:52 1997 <tytso@EDT.MIT.EDU>
2305 * bitops.c (ext2fs_warn_bitmap, ext2fs_warn_bitmap2): Don't call
2306 com_err if OMIT_COM_ERR is defined.
2308 Thu Oct 30 11:33:57 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2310 * Rename new error codes to _ET_ in them for consistency.
2312 Sat Oct 25 00:06:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2314 * [all files, basically]: Added definition of ext2fs_get_mem,
2315 ext2fs_free_mem, and ext2fs_resize_mem in ext2fs.h, and
2316 changed all library routines to use these wrapper functions.
2318 * dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND
2319 instead of the system error messages.
2321 * ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
2324 * ext2fs.h: Added function declarations and constants for bmap.c
2327 * ext2_err.et.in: Added new error messages EXT2_FILE_RO and
2328 EXT2_ET_MAGIC_EXT2_FILE
2330 * Makefile.in: Added files bmap.c and fileio.c, and temporarily
2331 commented out brel_ma.c and irel_ma.c
2333 * bmap.c: New file which maps a file's logical block number to its
2334 physical block number.
2336 * fileio.c: New file which implements simple file reading and
2339 * alloc.c (ext2fs_alloc_block): New function which allocates a
2340 block, zeros it, and updates the filesystem accounting
2341 records appropriately.
2343 Wed Oct 22 16:47:27 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2345 * ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
2346 EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL,
2347 EXT2_INODE_ALLOC_FAIL, EXT2_NOT_DIRECTORY
2349 * Change various library files to use these functions instead of
2350 EINVAL, ENOENT, etc.
2352 Mon Oct 20 19:32:40 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2354 * llseek.c: Check HAVE_LLSEEK_PROTOTYPE to see whether or not we
2355 need to declare llseek().
2357 Sun Oct 19 18:56:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2359 * Rename io.h to be ext2_io.h (avoid namespace collisions)
2361 * Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
2363 Fri Oct 3 13:35:59 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2365 * llseek.c (ext2fs_llseek): Fix type error for ext2fs_llseek()
2367 * icount.c (ext2fs_icount_validate):
2368 * bmove.c (process_block): Fix lint error in type for fprintf().
2370 Mon Sep 15 11:45:09 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2372 * inode.c (ext2fs_check_directory): Add support for the callback
2373 to return the error code EXT2_ET_CALLBACK_NOTHANDLED.
2375 Thu Sep 4 12:28:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2377 * bitmaps.c (ext2fs_set_bitmap_padding): New function which sets the
2378 padding of the bitmap to be all one's.
2380 Wed Sep 3 14:27:30 1997 Theodore Y. Ts'o <tytso@edt.mit.edu>
2382 * llseek.c: Added missing semicolon to glibc fixup declaration of
2385 * bmove.c: Add #include of errno.h
2387 Sat Aug 23 22:47:46 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2389 * Makefile.in (ELF_SO_VERSION): Bump version to be 2.4 since we've
2390 added a new field to the io_channel (app_data).
2392 * io.h: Add a new element to the io_channel structure, app_data.
2394 * initialize.c, openfs.c: Set io->app_data to point at the
2397 Thu Aug 14 08:14:17 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2399 * io.h: Change the prototype of ext2fs_llseek() to use int's
2400 instead of unsigned int's.
2402 * llseek.c: Change to allow PIC and !HAVE_LLSEEK. Add a prototype
2403 to make life easer for GNU Libc 2.
2405 * rw_bitmaps.c: On the PowerPC, the big-endian variant of the ext2
2406 filesystem has its bitmaps stored as 32-bit words with bit
2407 0 as the LSB of each word. Thus a bitmap with only bit 0
2408 set would be, as a string of bytes, 00 00 00 01 00 ... To
2409 cope with this, we byte-reverse each word of a bitmap if
2410 we have a big-endian filesystem, that is, if we are *not*
2411 byte-swapping other word-sized numbers.
2413 Mon Aug 11 03:30:48 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2415 * dosio.c: New file to do DOS/BIOS disk accesses.
2417 * namei.c (open_namei): Make pathlen be of type size_t.
2419 * llseek.c: Always #include stdlib.h since it's need to define
2422 * io.h: Use errcode_t for magic numbers.
2424 * icount.c (get_icount_el): Use size_t where appropriate
2426 * dupfs.c (ext2fs_dup_handle):
2427 * dblist.c (dir_block_cmp): Use size_t where appropriate.
2429 * read_bb.c (ext2fs_read_bb_inode):
2430 * cmp_bitmaps.c (ext2fs_compare_inode_bitmap): Use blk_t, ino_t
2431 and size_t where appropriate.
2433 * closefs.c (ext2fs_flush): Use dgrp_t instead of int where
2436 * openfs.c (ext2fs_open):
2437 * check_desc.c (ext2fs_check_desc): Use blk_t instead of int where
2440 * rw_bitmaps.c (read_bitmaps):
2442 * inode.c (ext2fs_write_inode):
2443 * initialize.c (ext2fs_initialize):
2444 * brel_ma.c: Fix to make be 16-bit safe.
2446 * link.c (ext2fs_link):
2447 * unlink.c (ext2fs_unlink):
2448 * lookup.c (lookup_proc):
2449 * ismounted.c (ext2fs_check_if_mounted):
2450 * block.c (xlate_func): Add #pragma argsused for Turbo C.
2452 Sun Aug 10 10:05:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2454 * block.c (ext2fs_block_iterate2): Use retval which is a errcode_t
2457 * bitmaps.c (make_bitmap): Use size_t instead of int where
2460 * bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
2462 * alloc.c (ext2fs_new_inode): Use ino_t instead of int for the
2465 * get_pathname.c: Use ino_t instead of int where appropriate.
2467 * ext2fs.h: Make the magic structure element be errcode_t instead
2470 * alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
2471 bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
2472 cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c
2473 dirblock.c dupfs.c expanddir.c freefs.c get_pathname.c
2474 icount.c initialize.c inline.c inode.c irel_ma.c link.c
2475 llseek.c lookup.c mkdir.c namei.c newdir.c read_bb.c
2476 read_bb_file.c rs_bitmap.c rw_bitmaps.c swapfs.c
2477 test_io.c tst_badblocks.c tst_iscan.c unix_io.c unlink.c
2478 valid_blk.c version.c: Add an #ifdef for HAVE_UNISTD_H
2480 Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2482 * unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno
2483 is zero, then return EXT2_IO_LLSEEK_FAILED.
2485 * ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
2487 * Release of E2fsprogs 1.11
2489 Mon Jun 16 23:53:06 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2491 * dblist.c (ext2fs_dblist_count): Added new function which returns
2492 the number of directory blocks in dblist.
2494 Sat Jun 14 01:39:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2496 * unix_io.c (unix_flush): Make the io_channel flush function do a
2497 fsync to flush the kernel buffers to disk.
2499 Wed Jun 11 18:25:31 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2501 * inode.c (ext2fs_inode_scan_goto_blockgroup): Fix bug; the
2502 current inode number wasn't being set by the
2503 goto_blockgroup function.
2505 Mon Jun 9 10:45:48 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2507 * bmove.c (ext2fs_move_blocks): New function which takes a bitmap
2508 of blocks which need to be moved, and moves those blocks
2509 to another location in the filesystem.
2511 * rs_bitmap.c (ext2fs_resize_generic_bitmap): When expanding a
2512 bitmap, make sure all of the new parts of the bitmap are
2515 Sun Jun 8 16:24:39 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2517 * bitmaps.c (ext2fs_copy_bitmap): Fix bug; the destination bitmap
2518 wasn't being returned to the caller.
2520 * alloc_tables.c (ext2fs_allocate_group_table): Add new function
2521 ext2fs_allocate_group_table() which sets the group tables
2522 for a particular block group. The relevant code was
2523 factored out of ext2fs_allocate_tables().
2525 * dblist.c (make_dblist): Adjust the initial size of the directory
2526 block list to be a bit more realistic (ten plus twice the
2527 number of directories in the filesystem).
2529 Thu May 8 22:19:09 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2531 * badblocks.c (ext2fs_badblocks_list_test): Fix bug where
2532 ext2fs_badblocks_list_test would test the list (and exceed
2533 array boundaries) if there were no bad blocks on the bad
2534 blocks list. (Showed up when user tried: mke2fs -c -b 4096).
2536 Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
2538 * Release of E2fsprogs version 1.10
2540 Thu Apr 24 10:13:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
2542 * alloc_tables.c (ext2fs_allocate_tables): Correctly place the
2543 inode and block bitmaps based on the RAID 0 stride
2544 parameter (which is passed by mke2fs).
2546 * ext2fs.h: Add "stride" parameter to ext2_filsys, to be used by
2547 mke2fs to communicate the stride length to
2548 ext2fs_allocate_tables()
2550 Wed Apr 23 21:50:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
2552 * initialize.c (ext2fs_initialize): Fix to compile under Linux 1.2
2553 systems. (We can't assume that the new filesystem types
2556 Wed Apr 23 18:40:53 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2558 * alloc_tables.c (ext2fs_allocate_tables): Make sure that we
2559 allocate the inode and block bitmaps inside block group at
2562 Mon Apr 21 00:06:28 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2564 * alloc.c (ext2fs_new_block): Fix bug where if goal==0 and the
2565 filesystem has no free blocks, ext2fs_new_block would loop
2568 * dupfs.c (ext2fs_dup_handle): Duplicate an ext2 filesystem handle
2570 * freefs.c (ext2fs_free_inode_cache): Decrement refcount and only
2571 free if refcount goes to zero.
2573 * inode.c (create_icache): Initialize refcount to 1.
2575 * ext2fsP.h: Added refcount to ext2_inode_cache
2577 * dblist.c (ext2fs_copy_dblist): New function to copy a directory
2580 * badblocks.c (ext2fs_badblocks_copy): New function to copy a
2581 badblocks structure.
2583 Sun Apr 20 23:19:51 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2585 * bitmaps.c (ext2fs_copy_bitmap): New function to copy a bitmap.
2587 * unix_io.c, test_io.c (unix_open, test_open): Initialize the
2589 (unix_close, test_close): Decrement the refcount and only
2590 close the io_channel if the refcount goes to 0.
2592 * io.h: Add refcount to the io_channel structure. Add new macro
2593 interface io_channel_bumpcount() to bump the refcount.
2595 Thu Apr 17 20:25:03 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2597 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Use the inode
2598 cache in the filesystem handle, instead of the inode cache
2599 in a static variable.
2601 * freefs.c: Added static function to free the inode cache (called by
2604 * ext2fsP.h: Added definition of the ext2_inode_cache structures.
2606 * ext2fs.h: Added pointer to the inode_cache structure.
2608 * block.c (block_iterate_ind, block_iterate_dind,
2609 block_iterate_tind): If there are holes in the indirect,
2610 doubly indirect, or triply indirect blocks, increment the
2611 block count field automatically.
2613 Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2615 * Release of E2fsprogs version 1.09
2617 Mon Apr 14 20:38:56 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2619 * version.c (ext2fs_parse_version_string): Check the passed in
2620 version string (instead of the hard-coded one).
2622 * alloc_tables.c (ext2fs_allocate_tables): If the last block is
2623 greater filesystem size, clamp it to prevent allocating a
2624 block or inode bitmap beyond the filesystem.
2626 * initialize.c (ext2fs_initialize): Fix bug where the metatdata
2627 overhead calculation was accidentally removed.
2629 Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2631 * Release of E2fsprogs version 1.08
2633 Thu Apr 10 13:15:15 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2635 * dblist.c (ext2fs_set_dir_block): New function which sets the
2636 block of a dblist entry, given the directory inode and
2639 Sat Apr 5 12:42:42 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2641 * alloc_tables.c (ext2fs_allocate_tables): Allocate the bitmap and
2642 inode bitmaps at staggered locations across the block
2643 groups, to avoid concentrating the bitmaps on a small
2644 number of disks when using striped RAID arrays.
2646 * initialize.c (ext2fs_initialize): By default, choose the maximum
2647 possible number of blocks per group (based on the size of
2648 the bitmaps in the blocksize).
2650 Fri Apr 4 11:28:16 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2652 * initialize.c (ext2fs_initialize): Add support for
2653 EXT2_COMPAT_SPARSE_SUPER feature.
2655 * closefs.c (ext2fs_bg_has_super): New function to determine
2656 whether or a particular block group should have a
2657 superblock and block group descriptor. Used for the
2658 EXT2_COMPAT_SPARSE_SUPER feature is turned on.
2659 (ext2fs_flush): Check ext2fs_bg_has_super to see whether
2660 or not the superblock should be written out for the block
2663 * ext2fs.h (EXT2_COMPAT_SPARSE_SUPER): Define compatibility flag
2664 for sparse duplicate superblocks.
2666 * version.c (ext2fs_get_library_version): New function which
2667 returns the library version.
2669 * version.c (ext2fs_parse_version_string): New function which
2670 parses a version string and returns a version number,
2671 so application programs can compare version numbers as
2674 Wed Mar 26 00:43:52 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2676 * icount.c (ext2fs_create_icount): Change function so that it also
2677 takes a new argument which contains a "hint" icount
2678 structure. This "hint" icount allows the create function
2679 to set up the sorted list in advance. This reduces
2680 significantly the amount of data moving needed to insert
2681 these inodes into the list later.
2683 * icount.c (ext2fs_icount_validate): New function which validates
2684 that the icount structure's rep invariant.
2686 * icount.c (get_icount_el): Completely revamped implementation
2687 to subsume put_icount_el(). Put_icount_el() used to
2688 use an O(N) implementation to insert in the middle
2689 of the icount list. It now uses a O(ln N) to search
2690 for where the icount should be inserted, and then uses
2691 a memcpy to move the list down (instead of a for loop).
2693 * icount.c (ext2fs_icount_fetch, ext2fs_icount_store,
2694 ext2fs_icount_increment, ext2fs_icount_decrement): Check
2695 to see if the inode is within bounds; if it isn't, return
2698 * bitops.h (ext2fs_test_generic_bitmap): Fix error message given
2699 when a bad inode number is passed to test_generic_bitmap
2700 to be EXT2FS_TEST_ERROR instead of the wrong
2701 EXT2FS_UNMARK_ERROR.
2703 Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso@mit.edu>
2705 * Release of E2fsprogs version 1.07
2707 Sun Mar 2 16:46:18 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2709 * Makefile.in (ELF_VERSION): Change version to be 2.2
2711 Tue Feb 11 14:54:02 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2713 * alloc.c (ext2fs_get_free_blocks): Change routine to use
2714 ext2fs_fast_test_block_bitmap_range().
2716 * bitops.h (ext2fs_fast_test_block_bitmap_range,
2717 ext2fs_test_block_bitmap_range: New inline functions which
2718 test to see whether a contiguous range of blocks is
2721 Thu Feb 6 10:00:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2723 * badblocks.c (ext2fs_badblocks_list_create): Rename sybmols to use
2724 use ext2fs_badblocks_* instead of badblocks_*
2726 * bb_compat.c: New file which translates between old badblocks_*()
2727 names to ext2fs_badblocks_*()
2729 * unlink.c (ext2fs_unlink): New file, moved ext2fs_unlink() from
2730 link.c (since e2fsck doesn't use ext2fs_unlink()).
2732 * rs_bitmap.c (ext2fs_resize_generic_bitmap): New file, contains
2733 bitmap resizing routine moved from bitmaps.c, since e2fsck
2734 doesn't need to use this function.
2736 * lookup.c (ext2fs_lookup): Moved ext2fs_lookup to its own file,
2737 since e2fsck only needs ext2fs_lookup.
2739 Mon Feb 3 10:11:40 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2741 * inode.c (ext2fs_open_inode_scan): Set fs->badblocks if it is not
2742 already set; this is needed so that programs like dump
2743 which use the inode scan functions will deal with
2744 filesystems that have bad blocks in the inode table.
2746 Sun Feb 2 00:17:36 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2748 * ext2fs.h (struct_badblocks_list, struct_badblocks_iterate):
2749 Moved to ext2fsP.h, since it doesn't need to be part of
2750 the public interface.
2752 * dir_iterate.c: Move ext2_dir_iterate out of namei.c.
2754 Sat Feb 1 10:14:55 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2756 * dblist.c (ext2fs_get_num_dirs): New file, which implements a
2757 directory block list abstraction. (Code moved from
2760 * ext2fs.h, inode.c: Moved definition of ext2_struct_inode_scan to
2761 to inode.c (since no one else should be peeking inside it!)
2763 * valid_blk.c (ext2_inode_has_valid_blocks): New function.
2765 * openfs.c (ext2fs_open): Check the feature set in the ext2
2766 superblock, and refuse to open filesystems if they contain
2767 incompatible features. (Can be overriden with the
2770 Sun Jan 12 11:31:46 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2772 * block.c (ext2fs_block_iterate2): Added new function
2773 ext2fs_block_iterate2 which changes the function
2774 signature of the callback function to include the
2775 referencing block and offset.
2777 * inode.c (ext2fs_inode_scan_goto_blockgroup): Added new function
2778 ext2fs_inode_scan_goto_blockgroup which allows an
2779 application to jump to a particular block group while
2780 doing an inode scan.
2782 Wed Jan 1 23:50:12 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2784 * dirblock.c: Include string.h, since we use memcpy().
2786 Tue Dec 3 12:27:29 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2788 * getsize.c (ext2fs_get_device_size): The ioctl BLKGETSIZE returns
2789 a long not an int; this doesn't matter on i386 machines,
2790 but it does on Alpha's.
2792 Fri Nov 29 20:57:37 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2794 * inode.c (ext2fs_write_inode, ext2fs_read_inode): If the inode
2795 table pointer is NULL, then return an error indicating
2796 that the inode table is missing.
2797 (get_next_blockgroup, get_next_blocks,
2798 ext2fs_get_next_inode): Don't treat a missing inode table
2799 as permanent error. Return MISSING_INODE_TABLE, but as an
2800 advisory error code, much like BAD_BLOCK_IN_INODE_TABLE.
2802 * rw_bitmaps.c (ext2fs_write_block_bitmap,
2803 ext2fs_write_inode_bitmap): If the inode or block bitmap
2804 block is zero, then don't write out the inode or block
2805 bitmap. The idea here is to avoid stomping on the
2807 (read_bitmaps): If the inode or block bitmap block is
2808 zero, then fill in that portion of the inode or block
2809 bitmap with all zeros.
2811 * inode.c (ext2fs_get_next_inode): Fix bug in handling of bad
2812 blocks in inode table when the inode table size is
2813 non-standard (and can therefore span blocks).
2815 Tue Oct 29 20:13:14 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2817 * alloc.c (ext2fs_new_block): Fix fencepost error in
2818 ext2fs_new_block; make sure we don't try to allocate the
2819 first block beyond the end of the filesystem.
2821 Mon Oct 14 11:00:48 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2823 * inode.c (check_for_inode_bad_blocks): New function called by
2824 get_next_blocks() to avoid reading in bad blocks marked in
2825 fs->badblocks. Inodes located in bad blocks are returned
2826 by ext2fs_get_next_inode() returns the error code
2827 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE.
2829 * alloc_tables.c (ext2fs_allocate_tables): New function which
2830 performs the part of mke2fs's job of allocating the
2833 * test_io.c (test_close): IO manager which is used for testing
2836 Sun Oct 13 04:31:57 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2838 * inode.c (ext2fs_get_next_inode): Separate out the function of
2839 setting up for a new block group to get_next_blockgroup().
2840 Separate out the function of reading in blocks of the
2841 inode table to get_next_blocks().
2843 * ext2fs.h: Add the badblocks list to the ext2_filsys entry
2845 * badblocks.c (badblocks_list_add, badblocks_list_test): Add
2846 blocks to the badblock list in sorted order. This allows
2847 badblocks_list_test to be coded using a binary search for
2850 Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2852 * Release of E2fsprogs version 1.06
2854 Mon Oct 7 00:44:17 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2856 * ext2fs.h, block.c, closefs.c, dirblock.c, inode.c, native.c,
2857 open.c: Change EXT2_SWAP to EXT2_FLAG_SWAP for
2860 * closefs.c (ext2fs_flush): If the flag EXT2_MASTER_SB_ONLY is
2861 set, then only write out the master superblock.
2863 Sun Oct 6 21:45:26 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2865 * block.c (ext2fs_block_iterate): Fixed bug which caused
2866 block_iterate to fail to handle HURD created filesystems;
2867 it tested the inode translator field before the inode was
2870 Tue Sep 17 14:08:24 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2872 * initialize.c (ext2fs_initialize): Make sure the description for
2873 the inode bitmap is set correctly.
2875 * bitmaps.c (ext2fs_allocate_generic_bitmap): Fix minor type typo.
2877 Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2879 * Release of E2fsprogs version 1.05
2881 Sat Sep 7 07:36:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2883 * initialize.c: Override the kernel's idea of default
2884 checkinterval from 0 (never) to 180 days.
2886 Wed Aug 28 03:20:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2888 * namei.c (ext2fs_namei_follow): New function which follows
2889 symbolic link (if any) at the target.
2891 Tue Aug 27 01:48:43 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2893 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Add support
2894 for shortcut function fs->read_inode() and fs->write_inode().
2895 Added inode_cache to reduce CPU time spent in doing
2898 * swapfs.c (ext2fs_swap_super): Swap the new fields in a V2
2901 * namei.c (ext2fs_follow_link): New function.
2902 (ext2fs_namei): Extended to have support for chasing
2903 symbolic links. ext2fs_namei() still returns an inode
2904 which is a symbolic link. Symbolic links are only chased
2905 while resolving the containing directory. To chase
2906 symbolic links of the final result, use
2907 ext2fs_follow_link().
2909 Mon Aug 26 23:46:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2911 * ext2_err.et.in: Added new error code EXT2_ET_SYMLINK_LOOP.
2913 * bitops.h (ext2fs_set_bit, ext2fs_celar_bit): Use asm inlines
2914 provided by Pete A. Zaitcev (zaitcev@lab.sun.mcst.ru).
2916 Thu Aug 22 00:40:18 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2918 * initialize.c (ext2fs_initialize): On systems where the byte
2919 order is not i386 compatible, set the swap_byte flag.
2921 * inode.c (inocpy_with_swap): Check to see if inode contains a
2922 fast symlink before swapping the inode block fields. This
2923 required adding a new argument to inocpy_with_swap to
2924 determine whether the mode field is in host order or not.
2926 Wed Aug 21 00:45:42 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2928 * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit): On
2929 the sparc, if EXT2_STD_BITOPS set, use the standard
2930 i386-compatible bitmask operations, instead on the
2931 non-standard native bitmask operators.
2933 Fri Aug 9 11:11:35 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2935 * block.c (ext2fs_block_iterate): Cause block iterator to return
2936 the HURD translator block (along with everything else).
2937 If the flag BLOCK_FLAG_DATA_ONLY is passed to the block
2938 iterator, then don't return any meta data blocks
2939 (including the HURD translator).
2941 Wed Jul 17 17:13:34 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2943 * gen_uuid.c: New file, which generates DCE-compatible UUIDs.
2945 * uuid.c: New file, containing UUID utility functions.
2947 Tue Jul 16 10:19:16 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2949 * ext2fs.h: Add a definition of the "real" ext2 superblock.
2951 Fri May 24 14:54:55 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2953 * ext2fs.h: Fix erroneous ino_t type used in block_bitmap type.
2955 Sun May 19 15:39:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2957 * openfs.c (ext2fs_open): If the blocksize in the superblock is
2958 zero, return the error EXT2_ET_CORRUPT_SUPERBLOCK, since
2959 that's a basic value that must be correct for the rest of
2960 the library to work.
2962 * ext2_err.et.in (EXT2_ET_CORRUPT_SUPERBLOCK): Added new error
2965 Thu May 16 11:12:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
2967 * Release of E2fsprogs version 1.04
2969 Wed Mar 27 00:33:40 1996 <tytso@rsts-11.mit.edu>
2971 * Release of E2fsprogs version 1.03
2973 Tue Mar 26 12:06:32 1996 <tytso@rsts-11.mit.edu>
2975 * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit):
2976 Change the m68k bit numbering for bitmasks to match with
2977 the bit numbering used by all other ext2 implementations.
2979 Thu Mar 7 03:37:00 1996 <tytso@rsts-11.mit.edu>
2981 * inode.c (ext2fs_get_next_inode, ext2fs_close_inode_scan,
2982 ext2fs_open_inode_scan): Support dynamically-sized inodes.
2984 Wed Mar 6 12:26:29 1996 <tytso@rsts-11.mit.edu>
2986 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Support
2987 dynamically-sized inodes.
2989 * openfs.c (ext2fs_open): Allow dynamic revision filesystem to be
2992 Tue Mar 5 03:49:37 1996 <tytso@rsts-11.mit.edu>
2994 * initialize.c (ext2fs_initialize): Catch an error condition where
2995 the passed in size is *really* too small.
2997 * alloc.c (ext2fs_new_inode):
2998 * ext2fs.h (EXT2_FIRST_INODE): Add support for dynamic revision to
3001 Wed Feb 21 15:56:17 1996 <tytso@rsts-11.mit.edu>
3003 * getsize.c (ext2fs_get_device_size): Open the device read-only
3004 when trying to determine its size.
3006 Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
3008 * Release of E2fsprogs version 1.02
3010 Sat Dec 9 09:57:50 1995 <tytso@rsts-11.mit.edu>
3012 * rw_bitops.c (ext2fs_write_block_bitmap):
3013 * bitops.c (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
3014 * bitops.h (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
3015 Rename {test,set,clear}_bit to ext2fs_{test,set,clear}_bit,
3016 to avoid conflicts with with kernel include files. Also
3017 rename ADDR and CONST_ADDR to EXT2FS_ADDR and
3020 Thu Oct 26 12:09:16 1995 <tytso@rsts-11.mit.edu>
3022 * ext2_err.et: Updated message in EXT2_ET_BASE to say version 0.5c
3024 * swapfs.c (ext2fs_swap_super): Put an #ifdef check around
3025 s_def_resuid and s_def_resgid for backwards compatibility.
3027 Fri Oct 20 23:33:31 1995 <tytso@rsts-11.mit.edu>
3029 * bitops.h: Added #ifdef's for Sparc.
3031 Wed Sep 6 22:14:46 1995 <tytso@rsts-11.mit.edu>
3033 * getsize.c: #include <sys/ioctl.h> under Linux to pick up ioctl()
3036 * closefs.c: #include <string.h> to pick up memset() declaration
3038 Mon Sep 4 21:45:29 1995 Remy Card <card@bbj>
3040 * Makefile.in: Added support for BSD shared libraries.
3042 * initialize.c (ext2fs_initialize): Correctly set the s_creator_os
3045 Mon Sep 4 09:55:30 1995 <tytso@rsts-11.mit.edu>
3047 * unix_io.c (unix_open): Add a double check; if the passed in name
3048 is NULL, return EXT2_ET_BAD_DEVICE_NAME.
3050 * ext2_err.et (EXT2_ET_BAD_DEVICE_NAME): Added new error code
3052 Wed Aug 16 15:44:10 1995 <tytso@rsts-11.mit.edu>
3054 * inode.c (ext2fs_check_directory): Use LINUX_S_ISDIR instead of
3057 Tue Aug 15 13:08:36 1995 <tytso@rsts-11.mit.edu>
3059 * getsize.c (ext2fs_get_device_size): Add support for reading the
3060 partition size from a BSD disk label.
3062 Thu Aug 10 09:33:26 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3064 * getsize.c (ext2fs_get_device_size): New function that determins
3065 the size of a device. Used by mke2fs and e2fsck.
3067 Sat Aug 12 03:09:54 1995 Remy Card <card@bbj>
3069 * Makefile.in (install): Install static libraries in $(ulibdir)
3070 (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
3072 Wed Aug 9 17:04:23 1995 Theodore Y. Ts'o <tytso@dcl>
3074 * bitmaps.c (ext2fs_free_inode_bitmap, ext2fs_free_block_bitmap):
3075 Move these functions to freefs.c.
3077 * closefs.c (ext2fs_flush): If swapping blocks, clear the group
3078 descriptors shadow memory to keep purify quiet. (This
3079 also has the nice benefit that the unused portion of the
3080 shadow descriptors are zeroed out.)
3082 * dirblock.c (ext2fs_write_dir_block): We need to use
3083 dirent->rec_len *before* it's byteswapped to find the
3084 location of the next directory structure!
3086 * alloc.c (ext2fs_new_inode): Fix bug which could potentially
3087 cause ext2fs_new_inode to loop infinitely if we're trying
3088 to allocate an inode in group #0 and there are no free
3089 inodes at all in the system.
3091 * closefs.c: #include <errno.h> if it exists.
3093 Sun Aug 6 13:27:50 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3095 * ext2fs.h (BLOCK_FLAG_HOLE): Added new definition for
3096 BLOCK_FLAG_APPEND. Added documentation for the block
3099 Sat Aug 5 11:44:05 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3101 * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
3102 installation directories correctly.
3104 Tue Jul 18 09:27:38 1995 <tytso@rsx-11.mit.edu>
3106 * namei.c (process_dir_block):
3107 * mkdir.c (ext2fs_mkdir):
3108 * expanddir.c (expand_dir_proc): Use ext2fs_{read,write}_dir_block
3109 to read/write the directory block.
3111 * dirblock.c (ext2fs_read_dir_block), ext2fs_write_dir_block): New
3112 file containing functions for reading and writing
3113 directory blocks (byte swapping if necesssary)
3115 * block.c (block_iterate_ind, block_iterate_dind,
3116 block_iterate_tind): Byte swap the block addresses if
3117 EXT2_SWAP_BYTES is set (and swap them back before writing
3120 * inode.c (inocpy_with_swap): New function.
3121 (ext2fs_get_next_inode, ext2fs_read_inode, ext2fs_write_inode):
3122 Call inocpy_with_swap if EXT2_SWAP_BYTES if set.
3124 * closefs.c (ext2fs_flush): If EXT2_SWAP_BYTES is set, then swap
3125 the superblock and group descriptors before writing it out.
3127 * openfs.c (ext2fs_open): If the magic number is byte-swapped,
3128 then set the EXT2_SWAP_BYTES and byte-swap the superblock
3129 and group descriptors.
3131 * swapfs.c (ext2fs_swap_super, ext2fs_swap_group_desc): New functions
3132 to desp ext2 filesystem structures.
3134 * bitops.c (set_bit, clear_bit, test_bit): Use modifications
3135 supplied by Pete A. Zaitcev so that the C language
3136 versions of these functions are more portable. They will
3137 now work on both little and big endian systems, and the
3138 assumption that 32-bit integers are used is gone.
3140 * bitops.h (ext2_swab16, ext2_swab32): Added new functions for
3141 doing byte swapping.
3143 * ext2fs.h (EXT2_SWAP_BYTES): Add new flag which indicates that
3144 byte swapping should take place.
3146 Sun Jul 16 06:21:43 1995 <tytso@rsx-11.mit.edu>
3148 * Makefile.in, cmp_bitmaps.c (ext2fs_compare_block_bitmap_end,
3149 ext2fs_compare_inode_bitmap_end): Added new file
3150 containing routines to compare bitmaps.
3152 * ext2_err.et (EXT2_ET_NEQ_BLOCK_BITMAP, EXT2_ET_NEQ_INODE_BITMAP):
3153 Added new error codes.
3155 Sat Jul 15 04:23:37 1995 <tytso@rsx-11.mit.edu>
3157 * inode.c (ext2fs_get_next_inode): Don't check scan->inode_buffer;
3158 if the magic number is correct, it will be allocated.
3160 Fri Jul 14 19:02:59 1995 <tytso@rsx-11.mit.edu>
3162 * block.c (block_iterate_ind, block_iterate_dind,
3163 block_iterate_tind): Don't recompute block_nr each loop;
3164 just increment it! Factor check of BLOCK_FLAG_APPEND out
3165 of the loop. Factor mask of BLOCK_CHANGED into changed
3166 variable out of the loop. (block_iterate_ind, in
3167 particular, gets called a lot, so every little
3168 optimization helps.)
3170 Thu Jul 13 08:02:45 1995 <tytso@rsx-11.mit.edu>
3172 * block.c (block_iterate_ind, block_iterate_dind,
3173 block_iterate_tind): Precompute limit of loop to speed up
3174 block_iterate_ind and company.
3176 * bitops.h (ext2fs_fast_mark_block_bitmap,
3177 ext2fs_fast_unmark_block_bitmap, ext2fs_fast_test_block_bitmap,
3178 ext2fs_fast_mark_inode_bitmap, ext2fs_fast_unmark_inode_bitmap,
3179 ext2fs_fast_test_inode_bitmap): Add fast version of these
3180 functions, which don't do range checking.
3182 * bitops.h (ext2fs_get_block_bitmap_start,
3183 ext2fs_get_inode_bitmap_start, ext2fs_get_block_bitmap_end,
3184 ext2fs_get_inode_bitmap_end): Add new accessor functions
3185 which return the start and end points of the bitmaps.
3187 Tue Jul 11 18:59:41 1995 <tytso@rsx-11.mit.edu>
3189 * llseek.c (ext2_llseek): If the offset is small enough, use lseek
3190 instead of llseek. The errno if the offset is too large
3191 and lseek is not supported should be EINVAL, not -EINVAL.
3193 Thu Jun 15 23:43:02 1995 Remy Card <card@bbj>
3195 * Makefile.in: Added support for ELF shared libraries.
3196 Fixed typos in the compilation rules.
3197 (distclean): Added Makefile.
3199 * llseek.c (llseek): New function, if llseek() does not exist in the
3201 (ext2_llseek): Changed to call llseek().
3203 Mon Jun 12 08:29:07 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3205 * ext2fs.h: Use __u32 to define blk_t, instead of unsigned long.
3207 Sun Jun 11 15:02:54 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3209 * mkdir.c (ext2fs_mkdir): Use LINUX_S_IFDIR instead of S_IFDIR.
3211 * ext2fs.h (LINUX_S_IFDIR): Define a linux specific versions of
3212 the S_*, which are normally defined in <sys/stat.h>. This
3213 allows us to compile e2fsprogs on a non-Linux system,
3214 which may have a different value for S_IFDIR.
3216 Sat Jun 10 23:47:05 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3218 * bitops.c (clear_bit, set_bit): Remove calls to cli() and sti();
3219 this is a user-mode application!
3221 Thu Jun 8 13:13:22 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
3223 * llseek.c: Put the include of <linux/unistd.h> inside the #ifdef
3224 __linux__ so that non-linux systems won't see it.
3226 * alloc.c: Include <errno.h> if possible.
3227 * badblocks.c: Ditto.
3228 * bb_inode.c: Ditto.
3231 * expanddir.c: Ditto.
3232 * get_pathname.c: Ditto.
3233 * initialize.c: Ditto.
3240 * rw_bitmaps.c: Ditto.
3243 * Makefile.in: Rewritten to conform to GNU coding standards and
3244 support separate compilation directories.
3246 Thu May 11 04:13:12 1995 <tytso@rsx-11.mit.edu>
3248 * initialize.c (ext2fs_initialize): Don't allow more than one
3249 bitmaps's worth of inodes in a group.
3251 Sat Mar 11 14:07:11 1995 Theodore Y. Ts'o <tytso@localhost>
3253 * llseek.c (ext2_llseek): Added error checking to the llseek()
3254 compat code to protect against overflow. This only
3255 applies to 1.0 and early 1.1 kernels, which don't support
3256 the llseek() system call.
3258 Thu Nov 24 16:29:00 1994 Theodore Y. Ts'o (tytso@rt-11)
3260 * unix_io.c (unix_open): Initialize the read_error and write_error
3261 io_channel pointers to be null.
3263 * bb_inode.c (clear_bad_block_proc): If an illegal block number is
3264 found, clear it but don't try to update the filesystem
3265 accounting information, since that's hopeless anyway.
3267 * block.c (bloblock_iterate_ind, bloblock_iterate_dind,
3268 bloblock_iterate_tind): Check to see if the indirect blocks are
3269 valid before trying to read them.
3271 * ext2_err.et (EXT2_ET_BAD_IND_BLOCK, EX2_ET_BAD_DIND_BLOCK,
3272 EXT2_ET_BAD_TIND_BLOCK): Add new error codes.
3274 * bitops.h (ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
3275 ext2fs_test_block_bitmap, ext2fs_mark_inode_bitmap,
3276 ext2fs_unmark_inode_bitmap, ext2fs_test_inode_bitmap): If an
3277 illegal block or inode number is passed in, return instead
3278 of trying to test, set, or clear the bit.
3280 Mon Nov 7 21:32:33 1994 Remy Card <card@bbj>
3282 * Makefile: Added a dummy install target in case shared libraries
3285 Mon Oct 24 14:11:44 1994 (tytso@rsx-11)
3287 * bitmaps.c (ext2fs_allocate_block_bitmap): Fix calculation of how
3288 the real last block of the bitmap should be calculated.
3290 Wed Sep 7 10:05:36 1994 (tytso@rsx-11)
3292 * bitmaps.c (ext2fs_fudge_inode_bitmap_end,
3293 ext2fs_fudge_block_bitmap_end, ext2fs_clear_inode_bitmap,
3294 ext2fs_clear_block_bitmap, ext2fs_free_inode_bitmap,
3295 ext2fs_free_block_bitmap): Add magic number checking for
3296 the inode and block bitmaps.
3298 * bitmaps.c (ext2fs_allocate_block_bitmap): Fix to set the correct
3299 magic number for a block bitmap instead of an inode bitmap.
3301 * inode.c (ext2fs_close_inode_scan, ext2fs_get_next_inode): Add
3302 magic number checking for the inode_scan structure.
3304 * badblocks.c (badblocks_list_free, badblocks_list_add,
3305 badblocks_list_test, badblocks_list_iterate_begin,
3306 badblocks_list_iterate, badblocks_list_iterate_end): Add
3307 magic number checking for the badblocks_list and
3308 badblocks_iterate structures.
3310 * ext2_err.et (EXT2_ET_MAGIC_UNIX_IO_CHANNEL):
3311 * unix_io.c (unix_open, unix_close, unix_set_blksize, unix_read_blk,
3312 unix_write_blk, unix_flush): Add magic number checking
3313 both for io_channel structure and unix_private_data
3316 * openfs.c (ext2fs_open): Add check for io_manager structure's
3319 * rw_bitmaps.c (ext2fs_write_inode_bitmap, ext2fs_write_block_bitmap,
3320 ext2fs_read_inode_bitmap, ext2fs_read_block_bitmap,
3321 ext2fs_read_bitmaps, ext2fs_write_bitmaps):
3322 * read_bb.c (ext2fs_read_bb_inode):
3323 * read_bb_file.c (ext2fs_read_bb_FILE):
3324 * newdir.c (ext2fs_new_dir_block):
3325 * namei.c (ext2fs_dir_iterate, ext2fs_lookup, ext2fs_namei):
3326 * link.c (ext2fs_link, ext2fs_unlink):
3327 * inode.c (ext2fs_open_inode_scan, ext2fs_read_inode,
3328 ext2fs_write_inode, ext2fs_get_blocks,
3329 ext2fs_check_directory):
3330 * get_pathname.c (ext2fs_get_pathname):
3331 * expanddir.c (ext2fs_expand_dir):
3332 * block.c (ext2fs_block_iterate):
3333 * bitmaps.c (ext2fs_allocate_inode_bitmap,
3334 ext2fs_allocate_block_bitmap):
3335 * bb_inode.c (ext2fs_update_bb_inode):
3336 * alloc.c (ext2fs_new_inode,ext2fs_new_block,ext2fs_get_free_blocks):
3337 * check_desc.c (ext2fs_check_desc):
3338 * closefs.c (ext2fs_close, ext2fs_flush):
3339 * freefs.c (ext2fs_free): Add check for ext2_filsys magic number.
3344 * check_desc.c (ext2fs_check_desc): Move ext2fs_check_desc from
3345 openfs.c into its own file.
3347 * ext2fs.h (EXT2_CHECK_MAGIC): Added macro for checking for
3348 structure magic numbers.
3350 * closefs.c (ext2fs_flush): Folded in Remy Card's changes to clear
3351 the EXT2_VALID_FS flag in the backup superblock blocks, so that if
3352 someone uses the -b option to specify the use of the backup
3353 superblock --- this usually means that the main superblock is
3357 * ext2_err.et (EXT2_ET_REV_TOO_HIGH):
3358 * openfs.c (ext2fs_open): Folded in Remy Card's changes to add a
3359 revision level to the superblock.
3361 Sun Aug 21 00:50:08 1994 Theodore Y. Ts'o (tytso@rt-11)
3368 * initialize.c: Completely revamped the inode and block bitmap
3369 structures, so that they can be better chance of being extensible
3370 in a shared library. They are now their own type, instead of
3371 being a char *. Also, the function signatures of
3372 ext2fs_test_block_bitmap, ext2fs_mark_block_bitmap,
3373 ext2fs_unmark_block_bitmap, ext2fs_test_inode_bitmap,
3374 ext2fs_mark_inode_bitmap, and ext2fs_unmark_inode_bitmap were
3375 changed to eliminate the ext2_filsys argument, since it is no
3378 Wed Aug 17 21:46:44 1994 Remy Card (card@bbj)
3380 * unix_io.c (unix_read_blk and unix_write_blk): use the llseek
3381 system call if available.
3383 * llseek.c: new file. This is the stub calling the llseek system
3384 call which allows supports for 2GB+ file systems.
3386 * initialize.c (ext2fs_initialize): Ext2fs_initialize now stores
3387 the creator operating system.
3389 Wed Aug 17 10:03:24 1994 Theodore Y. Ts'o (tytso@rt-11)
3391 * initialize.c (ext2fs_initialize): Ext2fs_initialize now sets up
3392 the group descriptor statistics in addition to everything else.
3393 This relieves mke2fs of the responsibility of doing it.
3395 * bitops.c, bitops.h: Add assembly inline functions for the 68000.
3396 Added a new #define, _EXT2_HAVE_ASM_BITOPS_ to control whether or
3397 not the generic C function equivalents should be included or not.
3399 * openfs.c (ext2fs_open): If a superblock is specified, then use
3400 the backup group descriptors that go along with this superblock,
3401 instead of using the primary group descriptors. This allows
3402 e2fsck to recover filesystems where the primary group descriptors