1 2007-05-08 Eric Sandeen <sandeen@redhat.com>
3 * ext2_fs.h (inode_uid, inode_gid): The inode_uid() and
4 inode_gid() macros will automatically add the high bits
5 when reading uid/gid, on platforms that support it.
7 2007-04-19 Theodore Tso <tytso@mit.edu>
9 * ext2_fs.h, swapfs.c (ext2fs_swap_inode_full): Rename the
10 l_i_reserved1 field to be l_i_version (to be used for the
11 high 32 bits of the 64-bit inode version number).
13 2007-04-18 Theodore Tso <tytso@mit.edu>
15 * getsize.c (ext2fs_get_device_size): Make sure we don't leak a
16 file descriptor in some error cases.
18 2007-04-14 Theodore Tso <tytso@mit.edu>
20 * swapfs.c (ext2fs_swap_inode_full): Fix a problem byte-swapping
21 fast symlinks inodes that contain extended attributes.
22 (Addresses Red Hat Bugzilla #232663, LTC bugzilla #27634)
24 2007-04-06 Theodore Tso <tytso@mit.edu>
26 * icount.c (ext2fs_create_icount_tdb): Add support for using TDB
27 to store the icount data, so we don't run out of memory
28 when checking really large filesystems.
30 * ext2_err.et.in: Add new TDB error codes.
32 * icount.c, Makefile.in: Add a regression test suite for the
35 2007-04-04 Jim Garlick <garlick@llnl.gov>
37 * inode.c (ext2fs_write_new_inode): Fix memory leak.
39 2007-04-04 Theodore Tso <tytso@mit.edu>
41 * tdb.c, tdb.h, Makefile.in: Add the tdb library from Samba into
44 * tst_types.c: Add #include's to avoid compiler warnings.
46 2007-04-02 Theodore Tso <tytso@mit.edu>
48 * icount.c (get_icount_el): Prevent floating point precision
49 errors on really big filesystems from causing the search
50 interpolation algorithm loop forever. (Addresses Debian
53 2007-03-21 Theodore Tso <tytso@mit.edu>
55 * imager.c (ext2fs_image_inode_write), inode.c
56 (ext2fs_write_inode_full): Fix memory leak on error return
57 (when the inode table is missing).
59 2006-11-30 Theodore Tso <tytso@mit.edu>
61 * ext2_fs.h (struct ext4_group_desc): Fix missing bg_pad which
62 made the structure too small.
64 2006-11-14 Theodore Tso <tytso@mit.edu>
66 * namei.c (open_namei): Rename internal variable basename to
67 base_name to prevent gcc -Wall complaints.
69 * kernel-jbd.h (tid_gt, tid_geq): Add function declaration to
70 avoid gcc -Wall complaints.
72 * ext2_ext_attr.h (EXT2_EXT_ATTR_PAD): Make unsigned to fix gcc
75 * bitops.h (ext2fs_test_bit): Add missing const to fix gcc -Wall
78 * ext2fs.h (ext2fs_get_mem, ext2fs_free_mem): Avoid type punning
79 which causes problems on the ARM processor. (Addresses
82 2006-11-12 Theodore Tso <tytso@mit.edu>
84 * ext2_fs.h (EXT2_FLAG_SOFTSUPP_FEATURES), openfs.c
85 (ext2fs_open2): Add flag which indicates that it's OK to
86 open a filesystem which has features which are only
87 partially supported by e2fsprogs.
89 * ext3_extents.h, ext2fs.h: Check in ext4 extent headers into the
90 source tree, in preparation for adding full extent support.
92 * unix_io.c (unix_flush): Allow offsets greater than 2G.
93 (Addresses SourceForge Bug #1547922)
95 2006-11-11 Theodore Tso <tytso@mit.edu>
97 * dirhash.c (str2hashbuf, ext2fs_dirhash): Add support for
98 calculating the unsigned version of the directory hash.
100 * initialize.c (ext2fs_initialize): Set the dirhash
101 signed/unsigned hint in s_flags.
103 * swapfs.c (ext2fs_swap_super): Byte swap the s_flags superblock
106 * ext2_fs.h: Define a new superblock field, s_flags, which is used
107 to store a signed vs. unsigned dirhash hint. Define new
108 HTREE hash algorithm numbers to pass to userspace if the
109 unsigned algorithm are required.
111 * swapfs.c (ext2fs_swap_super):
112 ext2_fs.h: Add definition of EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE,
113 which adds s_min_extra_isize and s_want_extra_isize fields
114 to superblock, which allow specifying the minimum and
115 desired i_extra_isize fields in large inodes
116 (for nsec+epoch timestamps, potential other uses).
117 Needs RO_COMPAT flag handling, needs e2fsck support,
118 patch complete, little testing.
120 * swapfs.c (ext2fs_swap_super):
121 ext2_fs.h: Add definition of EXT4_FEATURE_INCOMPAT_64BIT,
122 which adds supports for 64-bit block count fields in the
123 superblock (s_blocks_count_hi, s_free_blocks_count_hi),
124 large group descriptors (s_desc_size), extents with high
125 16 bits (ee_start_hi, ei_leaf_hi), inode ACL (i_file_acl_hi)
127 * ext2_fs.h: Add definition of EXT4_FEATURE_RO_COMPAT_DIR_NLINK,
128 which allow directories to have > 65000 subdirectories
129 (i_nlinks) by setting i_nlinks = 1 for such directories.
130 RO_COMPAT protects old filesystems from unlinking such
131 directories incorrectly and losing all files therein.
133 * swapfs.c (ext2fs_swap_group_desc):
134 ext2_fs.h: Add definition of EXT4_FEATURE_RO_COMPAT_GDT_CSUM,
135 which adds a crc16 checksum in the group descriptor,
136 (s_uuid[16] | __u32 group | ext3_group_desc
137 (excluding gd_checksum itself)). This allows the kernel
138 to more safely manage UNINIT groups. Also adds an
139 bg_itable_unsued which indicates how many inodes are
140 uninitialized in the block group.
142 * swapfs.c (ext2fs_swap_inode_full):
143 ext2_fs.h: Add definition of EXT4_FEATURE_RO_COMPAT_HUGE_FILE,
144 which changes i_blocks to be in units of s_blocksize units
145 instead of 512-byte sectors, use l_i_frag and l_i_fsize as
148 2006-10-02 Eric Sandeen <esandeen@sandeen.net>
150 * getsize.c (ext2fs_get_device_size): Check to make sure that the
151 number of blocks doesn't overflow the retblocks return
152 parameter for regular files using stat64().
154 2006-10-01 Theodore Tso <tytso@mit.edu>
156 * bitops.h (ext2fs_swab32): Only include ext2fs_swab32() if
157 EXT2FS_ENABLE_SWAPFS is defined.
159 2006-08-30 Eric Sandeen <esandeen@redhat.com>
161 * initialize.c (ext2fs_initialize): Make sure inode count does
162 not overflow 32 bits.
164 2006-08-30 Eric Sandeen <esandeen@redhat.com>
166 * alloc_tables.c (ext2fs_allocate_group_table):
167 * check_desc.c (ext2fs_check_desc):
168 Use new inlines to calculate group first & last blocks.
170 Create new inlines to calculate first/last group blocks.
172 2006-08-30 Eric Sandeen <esandeen@redhat.com>
174 * bmove.c (process_block):
176 * icount.c (ext2fs_create_icount2, insert_icount_el):
177 * tst_badblocks.c (print_list, validate_test_seq, do_test_seq):
178 * tst_badblocks.c (invalid_proc):
179 * tst_getsize.c (main):
180 * tst_iscan.c (check_map):
181 * unix_io.c (raw_read_blk, unix_read_blk):
182 * write_bb_file.c (ext2fs_write_bb_FILE): Fix printf formats.
184 2006-08-30 Eric Sandeen <esandeen@redhat.com>
186 * closefs.c (write_backup_super):
187 * initialize.c (ext2fs_initialize): Remove unused variables.
189 2006-08-30 Eric Sandeen <esandeen@redhat.com>
191 * check_desc.c (ext2fs_check_desc): avoid overflows when iterating
192 over group descriptors on very large filesystems.
194 2006-08-30 Theodore Tso <tytso@mit.edu>
196 * bitmaps.c (ext2fs_set_bitmap_padding): Fix potential overflow
197 problems when the number of blocks is close to 2**31.
199 * ext2fs.h (ext2fs_div_ceil): Add new function which safely
200 calculates an integer division where the result is always
201 rounded up while avoiding overflow errors.
203 * initialize.c (calc_reserved_gdt_blocks, ext2fs_initialize):
204 * openfs.c (ext2fs_open2): Use ext2fs_div_ceil() instead of a
205 using an open-coded expression which was subject to
208 2006-08-06 Andreas Dilger <adilger@clusterfs.com>
210 * bitops.h (ext2fs_cpu_to_le32, ext2fs_le64_to_cpu,
211 ext2fs_swab64): Add 64-bit byte swapping functions
213 2006-08-05 Theodore Tso <tytso@mit.edu>
215 * ext2_fs.h (EXT4_EXTENTS_FL): Rename EXT3_EXTENTS_FL to
216 EXT4_EXTENTS_FL, and add EXT4_EXTENTS_FL to user visible
219 2006-07-15 Theodore Tso <tytso@mit.edu>
221 * ext2fs.h: Remove unneeded #ifdef since EXT2_DYNAMIC_REV is
222 always defined in the e2fsprogs-provided ext2_fs.h
224 2006-05-21 Theodore Tso <tytso@mit.edu>
226 * openfs.c (ext2fs_open2): Fix type warning problem with sizeof()
228 2006-05-12 Theodore Tso <tytso@mit.edu>
230 * alloc_tables.c (ext2fs_allocate_group_table): When allocating
231 space for the RAID filesystems with the stride parameter,
232 place each portion of the group's inode table right up
233 after the superblock (if present) in order to minimize
234 fragmentation of the freespace.
236 2006-05-08 Theodore Tso <tytso@mit.edu>
238 * rw_bitmaps.c (write_bitmaps, read_bitmaps): Added support for
239 lazy blockgroups. If a block group has flags indicating
240 that its block or inode data structures have not been
241 initialized, skip reading or writing that portion of the
244 * inode.c (ext2fs_open_inode_scan, ext2fs_read_inode_full): When
245 scanning a filesystem with lazy blockgroups, skip
246 uninitialized portions of the inode table when iterating
247 over the block group.
249 * swapfs.c (ext2fs_swap_group_desc): Byte swap the bg_flags field.
251 * ext2fs.h: Define the a new internal flag, EXT2_SF_DO_LAZY, so
252 that the inode interator knows compat_lazy_bg feature is
253 enabled. Declare that this version of e2fsprogs supports
254 the EXT2_FEATURE_COMPAY_LAZY_BG feature.
256 * ext2_fs.h (struct ext2_group_desc): Use the bg_pad field for
257 bg_flags, and define the flags EXT2_BG_INODE_UNINIT and
258 EXT2_BG_BLOCK_UNINIT. These flags are only honored if
259 EXT2_FEATURE_COMPAT_LAZY_BG feature is enabled (also
262 2006-04-23 Theodore Ts'o <tytso@mit.edu>
264 * rw_bitmaps.c (write_bitmaps, ext2fs_write_inode_bitmap,
265 ext2fs_write_block_bitmap, ext2fs_write_bitmaps): Reduce
266 disk seeks by writing the inode and block bitmaps in an
269 2006-04-09 Theodore Ts'o <tytso@mit.edu>
271 * ext2_types.h.in, Makefile.in, tst_types.c: Use the asm_types.h
272 file to define the __[us]{8,16,32,64} types. Add a
273 tst_types program to make sure the types are correct.
275 2006-04-04 Theodore Ts'o <tytso@mit.edu>
277 * mkjournal.c (ext2fs_add_journal_inode): If the filesystem is
278 opened in exclusive mode, then device will be busy by
279 definition, so don't return -EBUSY. This caused mke2fs -j
280 to fail on the 1.39-WIP (29-Mar-2006) release. (Addresses
283 2006-03-29 Theodore Ts'o <tytso@mit.edu>
285 * bitops.h (ext2fs_set_bit, ext2fs_clear_bit): Fix the constraints
286 so that GCC knows that the ext2fs_set/clear_bit reads and
289 2006-03-25 Theodore Ts'o <tytso@mit.edu>
291 * Makefile.in: Check the bitfield operations much more carefully,
292 and arrange to have tst_bitops run from "make check"
294 * tst_bitops.c: Enahce tst_bitops program so that it is much more
295 thorough in testing bit optations.
297 * bitops.h: Add new functions ext2fs_fast_set_bit() and
298 ext2fs_fast_clear_bit() and make the x86 functions 32-bit
299 clear. Change the fast inode and block mark/unmark
300 functions to use ext2fs_fast_set/get_bit()
302 2006-03-18 Theodore Ts'o <tytso@mit.edu>
304 * ext2fs.h (EXT2_FLAG_EXCLUSIVE): Define new flag which requests
305 that the io_channel be opened in exclusive mode.
307 * openfs.c (ext2fs_open2), initialize.c (ext2fs_initialize): If
308 EXT2_FLAG_EXCLUSIVE is passed to ext2fs_open or
309 ext2fs_initialize, then pass IO_FLAG_EXCLUSIVE to the
310 io_channel open routine.
312 * ext2_io.h (IO_FLAG_EXCLUSIVE), unix_io.c (unix_open): Add new
313 io_channel open flag, IO_FLAG_EXCLUSIVE, which requests
314 that the device be opened in exclusive (O_EXCL) mode.
316 * ext2fs.h: Fix documentation so that BLOCK_FLAG_TRAVERSE is
317 BLOCK_FLAG_DEPTH_TRAVERSE. (Addresses Debian Bug #351268)
319 2006-03-17 Theodore Ts'o <tytso@mit.edu>
321 * initialize.c (calc_reserved_gdt_blocks): Fix a signed vs
322 unsigned problem which caused mke2fs -O resize_inode to
323 bomb out on large filesystems. (Addresses Debian Bug
326 * ext2_fs.h (EXT2_IOC_GETVERSION_NEW, EXT2_IOC_SETVERSION_NEW,
327 EXT2_IOC_GROUP_EXTEND, EXT2_IOC_GROUP_ADD): Add ioctl
330 2005-12-10 Theodore Ts'o <tytso@mit.edu>
332 * Makefile.in: Add a dependency to make sure that the
333 subdirectories are created before creating all of the
336 2005-12-10 Theodore Ts'o <tytso@mit.edu>
338 * res_gdt.c (ext2fs_create_resize_inode): Fix type-punning warning.
340 * read_bb_file.c (ext2fs_read_bb_FILE): Use a data structure
341 instead of stuffing a function pointer dirctly into a void
342 pointer, since that isn't portable.
344 * mkjournal.c (ext2fs_add_journal_inode): Fix possiblely
345 uninitialized use of variable warning.
347 * initialize.c (calc_reserved_gdt_blocks): Fix signed vs. unsigned
350 * ext2fs.h: Make the type of the 'now' field to be time_t to avoid
351 gcc -Wall complaints.
353 * bitops.h (ext2fs_find_first_bit_set): Fix signed vs unsigned
356 * tst_badblocks.c (file_test_invalid): Add test which confirms
357 proper detection of invalid block numbers in
358 ext2fs_read_bb_FILE().
360 2005-11-20 Theodore Ts'o <tytso@mit.edu>
362 * bitops.h: We no longer have the sparc assembly code in the
363 header file any more, so we shouldn't set
364 _EXT2_HAVE_AS_BITOPS_. This would break compiles on the
365 sparc architectures when using gcc.
367 2005-11-13 Theodore Ts'o <tytso@mit.edu>
369 * ext2fs.h: Add #include <string.h> since the inline functions use
370 memcpy(). (Addresses Sourceforge Bug #1251062)
372 2005-11-09 Theodore Ts'o <tytso@mit.edu>
374 * Fix a bug when writing an external journal device on an big
375 endian machine (such as a S/390), where when the number of
376 block groups is zero, we never end up writing out the
377 primary superblock at all.
379 2005-09-24 Theodore Ts'o <tytso@mit.edu>
381 * ext2fs.h, bb_inode.c, closefs.c, initialize.c, mkdir.c,
382 mkjournal.c, res_gdt.c: If fs->now is non-zero, use that
383 as the time instead of the system time when setting
384 various filesystem fields (last modified time, last write
387 2005-08-28 Matthias Andree <matthias.andree@gmx.de>
389 * Fix compiler warnings about missing memcpy prototypes.
391 2005-07-25 Theodore Ts'o <tytso@mit.edu>
393 * test_io.c (safe_getenv): Pass in zero to the unusued arguments
394 of prctl(PR_GET_DUMPABLE) to avoid false positives from
397 2005-07-19 Theodore Ts'o <tytso@mit.edu>
399 * mkjournal.c (ext2fs_add_journal_inode): Check for the case where
400 the filesystem is apparently not mounted, but the device
401 is still busy. This can happen when the luser doesn't
402 bother to mount /proc and has a bogus /etc/mtab, but still
403 wants to mount the filesystem before using tune2fs(?!?).
404 Add a safety check to save him from his own stupidity, at
405 least on 2.6 kernels. (Addresses Debian Bug #319002)
407 2005-07-09 Andreas Dilger <adilger@clusterfs.com>
409 * getsize.c (ext2fs_get_device_size): Use fstat/fstat64 to get
410 size of regular files. Fix file descriptor leaks in error
413 2006-06-30 Theodore Ts'o <tytso@mit.edu>
415 * Release of E2fsprogs 1.38
417 2005-06-30 Theodore Ts'o <tytso@mit.edu>
419 * bitops.h, bitops.c (ext2fs_set_bit, ext2fs_clear_bit,
420 ext2fs_test_bit): Change these function prototypes to be
421 unsigned int's. Negative bit numbers were never allowed
422 (and never made any sense), so this should be a safe
423 change. This is needed to allow safe use of block numbers
424 greater than or equal to 2**31.
426 2005-06-27 Stephen Tweedie <sct@redhat.com>
428 * ext2fs.h (ext2fs_resize_mem): Fix C99 strict type aliasing
429 problems. Addresses Red Hat Bugzilla #161183.
431 2005-06-19 Theodore Ts'o <tytso@mit.edu>
433 * getsectsize.c (BLKSSZGET): Clean up test for when to manually
434 define the BLKSSZGET ioctl.
436 2005-05-29 Theodore Ts'o <tytso@mit.edu>
438 * ismounted.c (ext2fs_check_mount_point): Add test to see if the
439 device appears to be busy; this only works on Linux 2.6+
440 systems, but provides some additional bullet-proofing in
443 2005-05-08 Theodore Ts'o <tytso@mit.edu>
445 * test_io.c (safe_getenv): Fix bug so it would fetch the right
446 environment variable.
448 2005-04-09 Theodore Ts'o <tytso@mit.edu>
450 * inode.c (ext2fs_write_new_inode),
451 ind_block.c (ext2fs_read_ind_block): Add missing return
452 value in error return case. (Otherwise we return garbage
453 instead of the error code.)
455 2005-03-31 Theodore Ts'o <tytso@mit.edu>
457 * test_io.c (test_open): If called by a setuid/setgid or an
458 otherwise privileged program, be paranoid and ignore the
459 TEST_IO_* environment variables.
461 2005-03-21 Theodore Ts'o <tytso@mit.edu>
463 * Release of E2fsprogs 1.37
465 2005-03-21 Theodore Ts'o <tytso@mit.edu>
467 * ext2_ext_attr.h (EXT2_XATTR_LEN, EXT2_XATTR_SIZE): Add new
468 convenience cpp macros.
470 2005-03-20 Theodore Ts'o <tytso@mit.edu>
472 * mkdir.c (ext2fs_mkdir): Call ext2fs_write_new_inode() instead of
473 ext2fs_write_inode().
475 * inode.c (ext2fs_write_new_inode): New function which should be
476 used when the caller is writing an inode for the first
477 time. It makes sure that the extra portion of the large
478 inode is initialized properly.
480 2005-03-18 Theodore Ts'o <tytso@mit.edu>
482 * Makefile.in: Fix clean target to remove tst_getsectsize.
484 * getsize.c (ext2fs_get_device_size): Check to see if the number
485 of blocks is greater than 2**32 when we are doing a binary
486 search to determine the device size. Thanks to Stephen
487 Tweedie for the patch.
489 2006-02-05 Theodore Ts'o <tytso@mit.edu>
491 * Release of E2fsprogs 1.36
493 2005-02-05 Theodore Ts'o <tytso@mit.edu>
495 * Makefile.in: Remove ext2fs.pc on a "make distclean"
497 2005-02-04 Theodore Ts'o <tytso@mit.edu>
499 * Makefile.in (clean): Remove tst_getsize when doing a make clean
501 2005-02-03 Theodore Ts'o <tytso@mit.edu>
503 * bitops.c: Make the generic functions more efficient.
505 * bitops.h: Drop SPARC assembly code. It's less efficient than GCC
506 3.4 compiled code and also triggers nasty compiler
507 warnings on sparc64. Thanks to Matthias Andree for his
508 analysis and suggestion.
510 2005-01-27 Theodore Ts'o <tytso@mit.edu>
512 * res_gdt.c (ext2fs_create_resize_inode): Create the resize inode
513 even if s_reserved_gdt_blocks is zero.
515 2005-01-26 Theodore Ts'o <tytso@mit.edu>
517 * ext2fs.pc.in: Add pkg-config files.
519 2005-01-25 Theodore Ts'o <tytso@mit.edu>
521 * ext2fs.h: Add definition of struct ext2_inode_large
523 * ext2_fs.h: Add new function prototypes
525 * ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr): The
526 ext2fs_swap_ext_attr() has been moved to swapfs.c, and
527 given a new argument, has_header.
529 * swapfs.c (ext2fs_swap_ext_attr): Moved from ext_attr.c, and
530 takes an argument which controls whether or not there is
531 an EA header which needs to be byteswaped.
532 (ext2fs_swap_inode_full): New function which byte-swaps
535 * inode.c (ext2fs_get_next_inode_full, ext2fs_read_inode_full,
536 ext2fs_write_inode_full): New functions, originally from
537 Alex Tomas, but which needed to be substantially fixed so
538 that the tests wouldn't cause major stack overwrite bugs
539 in byte-swapping is enabled.
541 2005-01-18 Theodore Ts'o <tytso@mit.edu>
543 * Makefile.in: Fix the kernel compile-time echo commands to be
544 consistent and portable
546 2005-01-07 Theodore Ts'o <tytso@mit.edu>
548 * unlink.c (ext2fs_unlink): If both the name and the inode number
549 are unspecified, then return an error, so that we don't do
550 something surprising such as unconditionally deleting the
551 first directory entry.
552 (unlink_proc): Delete directory entries by coalescing it
553 with the previous entry, to avoid directory fragmentation.
555 2005-01-06 Theodore Ts'o <tytso@mit.edu>
557 * version.c (ext2fs_parse_version_string): Change parsing
558 algorithm so that version strings such as 1.36-rc1 returns
559 a non-surprising result (i.e., 136, and not 1361).
561 2005-01-05 Theodore Ts'o <tytso@mit.edu>
563 * block.c (block_iterate_ind, block_iterate_dind,
564 block_iterate_tind): Move the code which byte swaps and
565 read/writes indirect blocks to ext2fs_{read,write}_ind_block.
566 This saves 400 bytes, and we need them for the
567 resize_inode handling.
569 * ind_block.c (ext2fs_read_ind_block, ext2fs_write_ind_block): New
572 * res_gdt.c (ext2fs_create_resize_inode): Use
573 ext2fs_{read,write}_ind_block so that byte swapping is
574 handled on big-endian systems.
576 * dupfs.c (ext2fs_dup_handle): Make sure the new filesystem handle
577 has its own copy of the orig_super data structure. (This
578 is a better way of fixing a double-free problem in
579 resize2fs which Fedora attempted to fix in
580 e2fsprogs-1.35-double_free.patch. Addresses Red Hat
583 2004-12-23 Theodore Ts'o <tytso@mit.edu>
585 * inode.c (ext2fs_flush_icache): When flushing the icache, clear
586 the last-read block information as well.
588 * ext2fs.h (BMAP_SET), bmap.c (ext2fs_bmap): Add support for new
589 flag, BMAP_SET, which allows the caller to set a
590 particular logical->physical block mapping.
592 * ext2_err.et.in (EXT2_ET_SET_BMAP_NO_IND): New error code
594 * initialize.c (calc_reserved_gdt_blocks): #ifdef out all
595 debugging printf statements.
597 * res_gdt.c (ext2fs_create_resize_inode): Return
598 EXT2_ET_RESIZE_INODE_CORRUPT if the resize inode is not
599 what we expect. #ifdef out all debugging printf
602 * ext2_err.et.in (EXT2_ET_RESIZE_INODE_CORRUPT): Add new error code.
604 2004-12-22 Theodore Ts'o <tytso@mit.edu>
606 * swapfs.c (ext2fs_swap_super): Byteswap the reserved_gdt_blocks
609 2004-12-15 Theodore Ts'o <tytso@mit.edu>
611 * sparse.c (ext2fs_list_backups, ext2fs_bg_has_super),
612 res_gdt.c (list_backups), closefs.c (ext2fs_bg_has_super),
613 ext2fs.h: Move ext2fs_list_backups() to res_gdt.c, and
614 ext2fs_bg_has_super() back to closefs.c. There's no
615 reason for the new file, since list_backups() isn't being
616 used by any other functions, and can be made static, and
617 all users of the ext2fs filesystem will have to call
618 ext2fs_close() anyway.
620 2004-12-15 Theodore Ts'o <tytso@mit.edu>
622 * Applied resize inode patch from Andreas Dilger
624 * res_gdt.c (ext2fs_create_resize_inode): New function that
625 creates the resize inode.
627 * initialize.c (ext2fs_initialize): Reserve space for the resize
630 * ext2fs.h (EXT2_LIB_FEATURE_COMPAT_SUPP): Add
631 EXT2_FEATURE_COMPAT_RESIZE_INODE to the list of supported
633 Add function prototypes for res_gdt.c and sparse.c.
635 * closefs.c (ext2fs_super_and_bgd_loc): Take the reserved blocks
636 into account when calculating the number of overhead
639 * closefs.c (ext2fs_bg_has_super, test_root), sparse.c: Move these
640 functions to the new file sparse.c
642 * alloc_sb.c (ext2fs_reserve_super_and_bgd): Reserve the blocks
643 saved in the resize inode as being in use.
645 * ext2_err.et.in (EXT2_ET_RES_GDT_BLOCKS): Add new error code.
647 * Makefile.in (srcdir): Add res_gdt.c and sparse.c to the ext2fs
650 2004-12-14 Theodore Ts'o <tytso@mit.edu>
652 * Makefile.in: Use Linux-kernel-style makefile output for "make
655 * Makefile.in (installdirs): Use $(MKINSTALLDIRS) macro
658 2004-11-30 Theodore Ts'o <tytso@mit.edu>
660 * unix_io.c (unix_set_option): Add support for the offset option.
662 * test_io.c (test_set_option): Add support for the set_option method.
664 * ext2_io.h: Add new io_channel method, set_option(), and change
665 io_channel_write_byte() from a macro to a library function.
667 * ext2fs.h, openfs.c(ext2fs_open2): New version of ext2fs_open
668 which adds a new parameter, io_options.
669 (ext2fs_open): If there is a question mark in the
670 filename, and no io_options are specified, assumed that
671 the text following the question mark are io_options.
673 * io_manager.c, Makefile.in: New source file which contains
674 high-level functions for the io_channel layer.
676 * freefs.c (ext2fs_free): Make sure we don't free the io_channel
679 * Makefile.in: Use Linux-kernel-style makefile output to make it
680 easier to see errors/warnings.
682 2004-11-29 Theodore Ts'o <tytso@mit.edu>
684 * ext2_fs.h (EXT2_EXTENTS_FL, EXT3_FEATURE_INCOMPAT_EXTENTS,
685 EXT2_MAX_BLOCK_LOG_SIZE): Add definition for extent
686 feature and inode flag. Change maximum allowable block
689 2004-10-08 Theodore Ts'o <tytso@mit.edu>
691 * getsize.c (ext2fs_get_device_size): Add support for Windows
692 9x/NT under Cygwin. Thanks to Sam Robb
693 (samrobb@users.sourceforge.net) for pointing this and the
694 suggested code patch.
696 2004-09-17 Theodore Ts'o <tytso@mit.edu>
698 * getsize.c: Clean up header #include's.
700 * llseek.c (ext2fs_llseek): On non-linux systems, use lseek64() if
701 it is present. (Addresses Debian bug #269044)
703 2004-07-28 Theodore Ts'o <tytso@mit.edu>
705 * rw_bitmaps.c (read_bitmaps), block.c (block_iterate_ind,
706 block_iterate_dind, block_iterate_tind), inode.c
707 (ext2fs_read_inode): If EXT2_FLAG_IMAGE_FILE is set, so
708 read the metadata from fs->image_io instead of fs->io.
710 * initialize.c (ext2fs_initialize), openfs.c (ext2fs_open):
711 Initialize fs->image_io to be the same as fs->io.
713 * ext2_err.et.in (EXT2_ET_NOT_IMAGE_FILE): Add new error code.
715 * openfs.c (ext2fs_get_data_io, ext2fs_set_data_io,
716 ext2fs_rewrite_to_io): New functions that allow
717 applications to manipulate fs->image_io and fs->io safely.
719 * freefs.c (ext2fs_free): If fs->image_io is different fs->io,
720 then call io_channel_close on fs->image_io.
722 * ext2fs.h: Add image_io element to the ext2_filsys data
723 structure. Add ext2fs_get_data_io() ext2fs_set_data_io(),
724 and ext2fs_rewrite_to_io() prototypes.
726 2004-05-26 Theodore Ts'o <tytso@mit.edu>
728 * closefs.c (ext2fs_flush): Make sure the master superblock is
729 written last, and only after other I/O has been flushed to
730 disk. Thanks to Junfeng Yang from the Stanford
731 Metacompilation group for pointing a potential ordering
732 constraint problem if we don't write things out in the
735 * test_io.c: Implement the ability to abort after n reads or
736 writes to a particular block. The block is specified by
737 TEST_IO_BLOCK environment variable, and the read/write
738 count by the TEST_IO_READ_ABORT and TEST_IO_WRITE_ABORT
739 environment variables. The block data is now only dumped
740 if the 0x10 bit is set in TEST_IO_FLAGS.
742 2004-04-03 Theodore Ts'o <tytso@mit.edu>
744 * ext2_types.h.in: Remove check for _UUID_TYPES since uuid_types.h
747 2004-03-08 Theodore Ts'o <tytso@mit.edu>
749 * getsize.c (ext2fs_get_device_size): Only use the BLKGETSIZE64
750 ioctl on Linux 2.6 since it is unreliable in Linux 2.4.
751 (Addresses Debian Bug #236528). Fix typo in the ioctl
754 2004-03-02 Theodore Ts'o <tytso@mit.edu>
756 * getsize.c (ext2fs_get_device_size): Update getsize functions to
757 use Apple Darwin and Linux 64-bit ioctl's
759 2004-02-29 Brian Bergstrand <brian@bergstrand.org>
761 * Makefile.in: Use $(BSDLIB_PIC_FLAG) to determine whether to use
764 2004-02-28 Theodore Ts'o <tytso@mit.edu>
766 * Release of E2fsprogs 1.35
768 2004-02-21 Theodore Ts'o <tytso@mit.edu>
770 * ext2fs.h (ext2fs_resize_mem): Fix C++ problem. (Addresses Red
771 Hat Bugzilla #112448; thanks Thomas Woerner from Red Hat.)
773 2004-02-14 Theodore Ts'o <tytso@mit.edu>
775 * namei.c (follow_link): Correctly deal with symlinks that have
776 extended attribute information. (Addresses Debian Bug
779 2004-01-30 Theodore Ts'o <tytso@mit.edu>
781 * ext2_fs.h: Reserve an extra 4 bytes for the journal backup,
782 which we're using due to a typo in the e2fsck code. (Oops)
784 * swapfs.c (ext2fs_swap_inode): Fix byte swap bug which causes SE
785 Linux created symlinks with mandatory attributes to fail
786 to be properly handled on big endian systems. (Addresses
788 (ext2fs_swap_super): Byte swap some new fields in the
789 superblock, including the journal backup fields.
791 2003-12-02 Theodore Ts'o <tytso@mit.edu>
793 * alloc.c, bb_inode.c, bitops.c, block.c, check_desc.c, closefs.c,
794 dir_iterate.c, dirblock.c, expanddir.c, ext2fs.h,
795 get_pathname.c, icount.c, imager.c, initalize.c, inode.c,
796 lookup.c, openfs.c, read_bb.c, read_bb_file.c,
797 rw_bitmaps.c, unix_io.c, unlink.c, write_bb_file.c: Fix
798 gcc -Wall complaints. Mainly marking variables as being
799 unsued, and catching signed vs. unsigned comparisons.
801 2003-09-03 Theodore Ts'o <tytso@mit.edu>
803 * closefs.c (ext2fs_super_and_bgd_loc): New function which
804 centralizes the calculation of the superblock and block
806 (ext2fs_flush): Use ext2fs_super_and_bgd_lock to figure
807 out where to write the superblock and block group
810 * alloc_sb.c (ext2fs_reserve_super_and_bgd): New function which
811 reserves space in the block bitmap using
812 ext2fs_super_and_bgd_loc.
814 * initialize.c (ext2fs_initialize): Use
815 ext2fs_reserve_super_and_bgd to initialize the block bitmap.
817 2003-08-20 Theodore Ts'o <tytso@mit.edu>
819 * inode_io.c (ext2fs_inode_io_intern2), ext2fs.h: Add new function
820 allows the caller to pass in the inode data structure.
822 * fileio.c (ext2fs_file_open2), ext2fs.h: Add new function which
823 allows the caller to pass in the inode to be used in the
826 * ext2_fs.h: Add a backup of the location of the journal inode
827 blocks to the superblock.
829 * mkjournal.c (write_journal_inode): Save the location of the
830 journal inode to the backup location in the superblock.
832 2003-08-01 Philipp Thomas <pthomas@suse.de>
834 * alloc.c, badblocks.c, bb_inode.c, bitmaps.c, block.c, bmap.c,
835 bmove.c, brel_ma.c, closefs.c, dblist.c, dblist_dir.c,
836 dir_iterate.c, dirblock.c, dupfs.c, expanddir.c, ext2fs.h,
837 ext_attr.c, fileio.c, freefs.c, get_pathname.c, icount.c,
838 initialize.c, inode.c, inode_io.c, irel_ma.c, mkdir.c,
839 mkjournal.c, namei.c, newdir.c, openfs.c, rs_bitmap.c,
840 rw_bitmaps.c, test_io.c, unix_io.c: ext2fs_getmem(),
841 ext2fs_free_mem(), and ext2fs_resize_mem() all now take a
842 'void *' instead of a 'void **' in order to avoid pointer
843 aliasing problems with GCC 3.x.
845 2003-07-25 Theodore Ts'o <tytso@mit.edu>
847 * Release of E2fsprogs 1.34
849 2003-07-06 Theodore Ts'o <tytso@mit.edu>
851 * kernel-jbd.h, flushb.c: Fix gcc -Wall nitpicks (indented cpp
854 * ext2_types.h.in, initialize.c: Fix gcc -Wall nitpicks
857 * ismounted.c: Fix gcc -Wall nitpicks (Don't use exit as a goto label)
859 * llseek.c: Fix gcc -Wall nitpicks (don't use #elsif)
861 * lookup.c, read_bb.c: Fix gcc -Wall nitpicks (indent
862 non-traditional #pragma)
864 * test_io.c: Fix gcc -Wall nitpicks (const/unsigned type issues)
866 2003-06-24 <tytso@snap.thunk.org>
868 * badblocks.c, ext2fs.h (ext2fs_u32_list_find,
869 ext2fs_u32_list_test, ext2fs_u32_list_del,
870 ext2fs_badblocks_list_del): Add functions to delete a
871 block from the badblocks list.
872 * tst_badblocks.c: Add test cases for ext2fs_badblocks_list_del().
874 2003-05-21 Theodore Ts'o <tytso@mit.edu>
876 * getsectsize.c (ext2fs_get_device_sectsize): New function which
877 returns the hardware sector size (if it is available).
879 2003-05-13 Theodore Ts'o <tytso@mit.edu>
881 * unix_io.c: Add #ifdef NO_IO_CACHE which disables all userspace
882 caching by the unix_io layer. Not enabled, only for
885 2003-05-05 Theodore Ts'o <tytso@mit.edu>
887 * test_io.c: Pay attention to the environment variables
888 TEST_IO_LOGFILE, TEST_IO_FLAGS, and TEST_IO_BLOCK to
889 determine whether or not we should log io activity, and to
892 2003-05-03 Theodore Ts'o <tytso@mit.edu>
894 * tst_badblocks.c (file_test): Use tmpfile() instead of mktemp().
896 2003-04-29 Theodore Ts'o <tytso@mit.edu>
898 * getsize.c (ext2fs_get_device_size): Allow windows code to get
899 the resize for filesystems that are in regular files.
901 2003-04-21 Theodore Ts'o <tytso@mit.edu>
903 * Release of E2fsprogs 1.33
905 2003-04-21 Theodore Ts'o <tytso@mit.edu>
907 * Makefile.in: Use DYLD_LIBRAY_PATH so that "make check" works on
908 Darwin systems when building with shared libraries.
910 2003-04-18 Theodore Ts'o <tytso@mit.edu>
912 * unix_io.c: Use __CYGWIN__ instead of CYGWIN.
914 2003-04-17 Theodore Ts'o <tytso@mit.edu>
916 * getsize.c: Add Cygwin/Windows version of ext2fs_get_device_size()
918 2003-04-12 Theodore Ts'o <tytso@mit.edu>
920 * unix_io.c (raw_read_blk): Add Cygwin support (the Windows block
921 device only accepts sector aligned read requests.
923 * ismounted.c (check_mntent_file): Deal with OS's that don't
926 * imager.c: If the OS doesn't define ssize_t, typedef it to int.
928 2003-04-11 Theodore Ts'o <tytso@mit.edu>
930 * ext2_fs.h (EXT2_FEATURE_RO_COMPAT_BTREE_DIR): Comment out unused
933 2003-03-30 Theodore Ts'o <tytso@mit.edu>
935 * Makefile.in: Use the compile_et --build-tree option.
937 2003-03-14 Theodore Ts'o <tytso@mit.edu>
939 * getsize.c: Add support for Apple Darwin's ioctl to get the hard
942 * badblocks.c (ext2fs_u32_list_count), ext2fs.h: Add new function
943 which returns the number of entries in the list.
945 2003-03-10 Theodore Ts'o <tytso@mit.edu>
947 * fileio.c (ext2fs_file_lseek): Fix bug added when adding 64-bit
948 support; avoid null dereference when ret_pos is NULL.
950 2003-03-06 Theodore Tso <tytso@mit.edu>
952 * ext2_types.h.in: Don't redefine types if other e2fsprogs
953 *_types.h files have been included already.
955 * kernel-jbd.h: Use C99 variadic cpp macros if not using GCC.
956 (Older GCC's don't support the C99 variadic macros.)
958 * flushb.c (ext2fs_sync_device),
959 ismounted.c (ext2fs_check_mount_point): Avoid GCC extension:
960 #warning not supported by Solaris suncc
962 * ext2_ext_attr.h: Avoid GCC extension: 0 length arrays in
963 structure definition. Not needed for now in
966 2003-01-25 Theodore Ts'o <tytso@mit.edu>
968 * dirhash.c: Fix gcc -Wall nits.
970 2003-01-22 Theodore Ts'o <tytso@mit.edu>
972 * unix_io.c (unix_write_blk): Fix up GCC -Wall nits.
974 2003-01-21 Theodore Ts'o <tytso@mit.edu>
976 * fileio.c (ext2fs_file_read, ext2_file_lseek,
977 ext2_file_get_size): Add 64-bit support.
979 * ext2fs.h (EXT2_I_SIZE): Add macro which caluates a 64bit size
980 from i_size and i_size_high.
982 2003-01-19 Theodore Ts'o <tytso@mit.edu>
984 * initialize.c (ext2fs_initialize): If the user specifies a really
985 large number of inodes, then reduce the number of blocks
986 per group until we find a workable set of filesystem
989 * ext2_err.et.in (EXT2_ET_TOO_MANY_INODES): Add new error code.
991 2002-11-09 Theodore Ts'o <tytso@mit.edu>
993 * Release of E2fsprogs 1.32
995 2002-11-09 Theodore Ts'o <tytso@mit.edu>
997 * unix_io.c (find_cached_block, reuse_cache, unix_read_blk,
998 unix_write_blk): Optimize routines so that we don't end up
999 searching the cache twice when a block isn't in the
1000 cache. If reads are larger than READ_DIRECT_SIZE, don't
1001 let them go through the cache.
1003 * unix_io.c (find_cached_block): Fixed bug which caused some clean
1004 blocks to be erroneously marked as dirty, so they would
1005 get written back to the disk before they are evicted from
1006 the cache. Harmless, but it slows down e2fsck
1009 2002-11-08 Theodore Ts'o <tytso@mit.edu>
1011 * Release of E2fsprogs 1.31
1013 2002-11-08 <tytso@snap.thunk.org>
1015 * Makefile.in (check): Skip trying to compile test_byteswap
1016 if --disable-byteswaap had been given to configure.
1018 2002-11-07 <tytso@snap.thunk.org>
1020 * closefs.c (write_bgdesc, ext2fs_flush): Fix bug in meta_bg
1021 support when the MASTER_SB_ONLY flag is set. Some of
1022 the descriptor blocks that should have been written out
1023 were getting skipped.
1025 2002-10-31 Theodore Ts'o <tytso@mit.edu>
1027 * Release of E2fsprogs 1.30
1029 2002-10-31 Theodore Ts'o <tytso@mit.edu>
1031 * ext2_fs.h: Add support for a new inode flag, which is to be used
1032 for indicating the top of directory hierarchies for the
1033 Orlov block allocator.
1035 * ismounted.c (check_mntent, check_mntent_file): Add better
1036 support for loopback-mounted filesystems. Check /etc/mtab
1037 if /proc/mounts doesn't turn up any mount flags, since
1038 /etc/mtab has the loopback image filename, instead of
1039 /dev/loop0. Also, check based on st_dev and st_ino, so
1040 that if a relative pathname or a pathnames using symbolic
1041 links are used, we can detect the the filesystem correctly
1042 in those cases. (Addresses Sourceforge bug #619119)
1044 * flushb.c (ext2fs_sync_device): If the BLKFLSBUF ioctl succeeds,
1045 don't try the FDFLUSH ioctl that was required for floppies
1046 with older kernels. This avoids needless whining from the
1047 MD device driver. (Addresses Sourceforge bug #545832).
1049 * openfs.c (ext2fs_open): Fix bug which caused us to pass the
1050 wrong group_block to ext2fs_descriptor_block_loc if we're
1051 using the backup superblock/block group descriptors.
1052 (ext2fs_descriptor_block_loc): If we're using the backup
1053 superblock descriptors, use the backup descriptor block in
1054 the next block group.
1056 2002-10-30 Theodore Ts'o <tytso@mit.edu>
1058 * alloc_tables.c (ext2fs_allocate_group_table): Allocate the inode
1059 table so that it buts up against the bitmap blocks, to
1060 avoid block fragmentation.
1062 * closefs.c (write_bgdesc), initalize.c (ext2fs_initialize): Fix
1063 bug; only allocate group descriptor blocks up to
1066 2002-10-25 Theodore Ts'o <tytso@mit.edu>
1068 * ext2_fs.h: Add a new superblock field, s_mkfs_time, so that we
1069 know when a filesystem was created. (Sometimes this can
1072 * initialize.c (ext2fs_initialize): Set the s_mkfs_time field.
1074 2002-10-20 Theodore Ts'o <tytso@valinux.com>
1076 * ext2_fs.h (EXT3_DEFM_JMODE): Add new default mount options for
1077 the journal data mode.
1079 * closefs.c (ext2fs_flush, write_bgdesc), ext2_fs.h, ext2fs.h,
1080 openfs.c (ext2fs_descriptor_block_loc, ext2fs_open), initialize.c
1081 (ext2fs_initialize), swapfs.c (ext2fs_swap_super): Add support for
1082 the meta_blockgroup filesystem format.
1084 2002-10-15 <tytso@snap.thunk.org>
1086 * ext2_fs.h: Add new field in superblock for default mount options.
1088 2002-10-13 Theodore Ts'o <tytso@mit.edu>
1090 * ext2fs.h: Add #include of header files necessary for ext2fs.h to
1093 2002-10-02 Theodore Y. Ts'o <tytso@mit.edu>
1095 * rw_bitmaps.c (ext2fs_write_block_bitmap,
1096 ext2fs_read_block_bitmap): Don't set the CHANGED bit just
1097 because the bitmap is getting written to disk. Make
1098 ext2fs_swap_bitmap be a static function, since it's not
1099 intended to be exported.
1101 * swapfs.c (ext2fs_swap_super): Byte-swap the hash seed
1103 2001-09-24 Theodore Tso <tytso@mit.edu>
1105 * Release of E2fsprogs 1.29
1107 2001-08-31 Theodore Tso <tytso@thunk.org>
1109 * Release of E2fsprogs 1.28
1111 2002-08-31 Theodore Ts'o <tytso@valinux.com>
1113 * dblist.c (ext2fs_dblist_sort): New function which allows the
1114 caller to pass in a special sort comparison function.
1116 2002-08-20 Theodore Ts'o <tytso@mit.edu>
1118 * valid_blk.c (ext2fs_inode_has_valid_blocks): Fix bug which
1119 failed to accurately characterize non-standard slow
1120 symlinks. (Which don't appear in practice on real-life
1121 systems, fortunately.)
1123 2002-08-17 Theodore Ts'o <tytso@mit.edu>
1125 * Makefile.in: Remove inode_io.o from the standard object files,
1126 and only build it if debugfs is enabled (it requires
1127 fileio.o, which is only built if --disable-debugfs isn't
1128 specified to configure).
1130 * dirhash.c (ext2fs_dirhash): Change the MD4 hash in a backwards
1131 incompatible way so that it is no longer
1132 endian-dependent. Add the TEA hash. Allow the seed
1133 parameter to be optional.
1135 * ext2_fs.h: Remove the HALF_MD4_SEED and HALF_MD4_64 hashes.
1136 These features are all now in the HALF_MD4 hash. Add
1137 definition for EXT2_HASH_TEA.
1139 * ext2fs.h (ext2fs_dirhash): Change function prototype so it takes
1140 a pointer instead of an array.
1142 2002-08-16 Theodore Ts'o <tytso@mit.edu>
1144 * ext2_err.et.in (EXT2_ET_BAD_EA_BLOCK_NUM): New error code
1146 * ext2fs.h (ext2fs_inode_data_blocks): New function which returns
1147 the number of data blocks used by an inode exclusive of
1150 * ext_attr.c (ext2fs_adjust_ea_refcount): New function which
1151 adjusts the reference count in an extended attribute block.
1153 * valid_blk.c (ext2fs_inode_has_valid_blocks): Add code to
1154 correctly deal with extended attribute blocks in symbolic
1157 2002-08-13 <tytso@snap.thunk.org>
1159 * Makefile.in: Move dupfs.o and test_io.o from the
1160 needed-by-debugfs object list to the needed-by-resizer
1161 object list. Fixes compile problem if the system is built
1162 with only --disable-debugfs.
1164 2002-07-29 Theodore Ts'o <tytso@mit.edu>
1166 * link.c (ext2fs_link): When adding a new link to a directory,
1167 clear the HTREE bit.
1169 2002-07-23 Theodore Ts'o <tytso@mit.edu>
1171 * dirhash.c (ext2fs_dirhash): Fix bug which caused MD4
1172 calculations for names > 32 characters to be completely
1173 bogus. Changed MD4 calculation to match what is currently
1174 being used in the CVS gkernel tree.
1176 2002-07-19 Theodore Ts'o <tytso@mit.edu>
1178 * ext2_fs.h: Add s_hash_seed and s_def_hash_version to the
1179 superblock definition.
1181 * badblocks.c, freefs.c, ext2fs.h: Use the badblocks functions to
1182 create a set of u32_list functions.
1184 * dirhash.c (halfMD4Transform): Shift the hash by one bit,
1185 since that's required by the directory indexing code.
1187 2002-07-14 Theodore Ts'o <tytso@mit.edu>
1189 * ext2fs.h, read_bb_file.c: Change private to priv_data, to avoid
1190 using a C++ reserved word.
1192 * unix_io.c (unix_open): Only attempt the setrlimit workaround if
1193 the kernel version is 2.4.10 -- 2.4.17, since otherwise an
1194 old version of glibc (built against 2.2 headers) will
1195 interact badly with the workaround to actually cause more
1196 problems. I hate it when the glibc folks think they're
1197 being smarter than the kernel....
1199 2002-06-28 Andreas Dilger <adilger@clusterfs.com>
1201 * ext2_fs.h: Add superblock field for reserved group descriptors.
1203 2002-06-28 Theodore Ts'o <tytso@mit.edu>
1205 * bitops.h: Add #define's for ext2fs_{l,b}e{32,16}_to_cpu and
1206 ext2fs_cpu_to_{l,b}e{32,16}
1208 2002-06-27 Theodore Ts'o <tytso@mit.edu>
1210 * ismounted.c (check_mntent): In AIX 4.3, MOUNTED isn't defined.
1211 Add appropriate fallbacks in this case.
1213 2002-06-26 Theodore Ts'o <tytso@mit.edu>
1215 * dirhash.c (ext2fs_dirhash): Change function signature to support
1216 a hash seed, and to return the minor hash (for 64-bit hash
1217 support). Add support for the half MD4, half MD4 with
1218 seed, and half MD4 with seed and 64 bits.
1220 2002-06-15 Theodore Ts'o <tytso@mit.edu>
1222 * ext2_fs.h (EXT2_DIRSYNC_FL): Add new file.
1224 2002-06-09 Andreas Dilger <adilger@clusterfs.com>
1226 * ext2_fs.h: Add macros for maximum block/inode counts:
1227 EXT2_INODES_PER_BLOCK, EXT2_MAX_BLOCKS_PER_GROUP,
1228 and EXT2_MAX_INODES_PER_GROUP.
1230 * openfs.c (ext2fs_open): Check that the number of blocks in a group
1231 is less than 2^16, otherwise we need an INCOMPAT flag (not
1232 in existence yet, if ever) to open such a filesystem.
1234 * initialize.c (ext2fs_initialize): Limit the number of blocks and
1235 inodes in a group to less than 2^16.
1237 2002-06-09 Andreas Dilger <adilger@clusterfs.com>
1239 * ext2_fs.h: Further minor cleanups of the header. Consolidate
1240 some checks for __KERNEL__ into one place.
1242 2002-05-22 Andreas Dilger <adilger@clusterfs.com>
1244 * ext2_fs.h: Remove macros accessing u.ext2_sb field and use
1245 the EXT2_SB() macro instead. Remove kernel function
1246 prototypes also. This matches the 2.5 kernel, and
1247 is also cleaner for other reasons. Whitespace cleanup.
1249 2002-05-21 Theodore Ts'o <tytso@mit.edu>
1251 * ext2_ext_attr.h: Update to V2 version of the Bestbits format.
1253 2002-05-16 Andreas Dilger <adilger@clusterfs.com>
1255 * ext2_fs.h: Change limits to support filesystems with 8k blocks.
1257 * initialize.c (ext2fs_initialize): Remove assumption that
1258 blocksizes are always <= 4k.
1260 2002-05-11 Theodore Ts'o <tytso@mit.edu>
1262 * bmap.c (ext2fs_bmap): Fix bug which caused ext2fs_bmap to fail
1263 silently if inode pointer is NULL (and ext2fs_bmap is
1264 expected to read the inode itself).
1266 2002-04-27 Theodore Ts'o <tytso@mit.edu>
1268 * ismounted.c (check_mntent_file, is_swap_device): Verify that the
1269 file we are checking is a block device file before looking
1270 at st_rdev, since it's not valid for normal files.
1271 (is_swap_device): Move so that it is outside the
1272 HAVE_MNTENT_H, so that it is always built.
1274 2002-03-11 Theodore Tso <tytso@mit.edu>
1276 * dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
1277 functions which take an extra flags argument. The flag
1278 EXT2_DIRBLOCK_V2_STRUCT will reverse when the name_len
1279 field is byte swampped on big-endian machines, since in
1280 the V2 structure, name_len is a char field which is
1281 doesn't need to be byte swapped --- except if an
1282 old-style kernel had byte-swapped the name_len field
1283 as part of the V1 structure.
1285 * ext2_err.et.in (EXT2_ET_DIRHASH_UNSUPP): New error code
1287 * dirhash.c (ext2fs_dirhash): New function which calculates the
1288 hash for a filename in an indexed directory.
1290 2002-03-08 Theodore Tso <tytso@mit.edu>
1292 * Release of E2fsprogs 1.27
1294 2002-03-07 Theodore Tso <tytso@mit.edu>
1296 * ext2fs.h (ext2fs_inode_io_intern): Add missing function prototype.
1298 * bmap.c, fileio.c, inode_io.c, tst_badblocks.c,
1299 tst_byteswap.c: Fix gcc -Wall complaints
1301 * Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
1302 (From Philipp Thomas <pthomas@suse.de>)
1304 2002-02-25 Theodore Tso <tytso@mit.edu>
1306 * ext2_fs.h: Add structure definitions for the directory indexing
1309 2002-02-23 Theodore Tso <tytso@mit.edu>
1311 * unix_io.c (unix_open): Fix 2.4 resource limit workaround so that
1312 it doesn't break things on mis32, sparc32, and alpha
1315 2002-02-21 Theodore Tso <tytso@mit.edu>
1317 * ismounted.c (is_swap_device): Fix file descriptor/memory leak;
1318 we were missing an fclose().
1320 2002-02-20 Theodore Tso <tytso@mit.edu>
1322 * Makefile.in, inode_io.c, ext2fs.h, ext2_err.et.in: Add new io
1323 abstraction interface which exports an ext2 inode.
1325 * ext2fs.h, fileio.c (ext2fs_file_flush): Export ext2fs_file_flush
1326 as a public interface. Change void * to const void * in
1327 ext2fs_file_write's interface.
1329 * test_io.c (test_close), unix_io.c (unix_close): Remove unneeded
1330 conditional; save a few bytes.
1332 2002-02-12 Theodore Tso <tytso@mit.edu>
1334 * Makefile.in (tst_badblocks): Add some extra .o files when
1335 linking the debugging program tst_badblocks which are
1336 needed if we aren't compiling with inline functions enable.
1338 * kernel-list.h (__inline__): On non-gcc and non-Watcom compilers,
1339 define away __inline__ since it may not be supported.
1341 * kernel-jbd.h (jbd_debug): For systems that don't do STDC, use a
1342 stripped down jbd_debug that doesn't use variadic
1343 arguments. This will cause warnings under AIX, but things
1346 2002-02-03 Theodore Tso <tytso@thunk.org>
1348 * Release of E2fsprogs 1.26
1350 2002-02-03 Theodore Tso <tytso@mit.edu>
1352 * mkdir.c (ext2fs_mkdir): Change to use ext2fs_inode_alloc_stats2
1353 so that the number of directories in use is adjusted
1356 * alloc_stats.c (ext2fs_inode_alloc_stats2): Add new function
1357 which optionally will modify the number of directories
1360 2002-01-03 Theodore Tso <tytso@mit.edu>
1362 * dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
1363 Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
1364 which will return deleted directory entries.
1365 ext2fs_dir_iterate2 takes a new callback function which
1366 is identical with the one used by
1367 ext2fs_dblist_dir_iterate(). If the directory entry is
1368 deleted, the callback function will be called with the
1369 entry paraemter set to DIRENT_DELETED_FILE.
1371 * Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
1372 ext2fs_block_alloc_stats): New functions which update
1373 block/inode allocation statistics in the bitmaps, block
1374 group descriptors, and superblock.
1376 * mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
1377 expanddir.c (expand_dir_proc), bb_inode.c
1378 (clear_bad_block_proc, set_bad_block_proc,
1379 ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
1380 Update to use new block/inode allocation statistics.
1382 2001-12-24 Theodore Tso <tytso@mit.edu>
1384 * ismounted.c (is_swap_device): New function used by
1385 ext2fs_check_if_mounted and ext2fs_check_mount_point which
1386 determines whether or not the specified device is a swap
1387 device by using /proc/swaps. More bulletproofing for
1388 idiotic/careless system administrators!
1390 * ext2fs.h, openfs.c (ext2fs_open), initialize.c
1391 (ext2fs_initialize), mkdir.c (ext2fs_mkdir): Add a new
1392 field to struct_ext2_filsys, umask. This field is
1393 initialize to 022, and affects ext2fs_mkdir in the obvious
1394 way. (In the future umask should also affect new file
1395 creation routines, but the fileio functions don't
1396 currently support this yes.)
1398 * ismounted.c (check_mntent_file): Stat all of the entries in
1399 /etc/mtab and/or /proc/mounts in order to catch dim-witted
1400 system administrators who might have created alias
1403 2001-12-23 Theodore Tso <tytso@mit.edu>
1405 * Makefile.in, jfs_user.h: Move linux/jbd.h to
1406 ext2fs/kernel-jbd.h, to avoid using the system header
1407 file version of hbd.h when using diet glibc (since it
1408 forcibly adds /usr/include to the beginning of the
1409 include search path.)
1411 * kernel-jbd.h, kernel-list.h, jfs_compat.h: Move files from
1412 include/linux directory.
1414 2001-12-16 Theodore Tso <tytso@mit.edu>
1416 * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap),
1417 ext_attr.c (ext2fs_read_ext_attr, ext2fs_write_ext_attr),
1418 fileio.c (ext2fs_file_write): Fix gcc -Wall nits
1420 * Makefile.in, jfs_user.h: linux/jfs.h has been renamed to
1423 2001-12-03 Theodore Tso <tytso@mit.edu>
1425 * unix_io.c (unix_open): Make sure the ulimit workaround works
1426 regardless of the version of glibc which is used to
1429 2001-11-26 Theodore Tso <tytso@mit.edu>
1431 * unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
1432 trying to unset the filesize limit if at all possible,
1433 if a block device is getting opened. (The filesize limit
1434 shouldn't be applied against writes to a block device, but
1435 starting in 2.4.10, the kernel is doing this.)
1437 2001-11-05 Theodore Tso <tytso@mit.edu>
1439 * mkjournal.c (ext2fs_add_journal_inode): When creating a .journal
1440 file on adding a journal to an already-mounted filesystem,
1441 try to clear the ext2 file attributes on an already
1442 existing .journal file so that we don't fail if on a
1443 partially added journal to the filesystem.
1445 * ext2_fs.h: Define a new ext2 file attribute, EXT2_NOTAIL_FL,
1446 which signals that a particular inode should not have the
1447 last bits of data (the "tail") be merged with another
1448 file. This is necessary to keep LILO happy.
1450 2001-09-20 Theodore Tso <tytso@thunk.org>
1452 * Release of E2fsprogs 1.25
1454 2001-09-16 Theodore Tso <tytso@mit.edu>
1456 * ext2_ext_attr.h: Remove unneeded #include of <linux/config.h>
1457 which was breaking the build on the Hurd. (Addresses
1458 Debian bug #112414).
1460 2001-09-13 Theodore Ts'o <tytso@mit.edu>
1462 * ismounted.c (check_mntent_file): We now validate the entry in
1463 /etc/mtab to make sure the filesystem is really mounted,
1464 since some broken distributions (read: Slackware) have
1465 buggy boot scripts that don't initialize /etc/mtab before
1466 checking non-root filesystems. (Slackware also doesn't
1467 check the root filesystem separately, and reboot if the
1468 root filesystem had changes applied to it, which is
1469 dangerous and broken.)
1471 2001-09-02 Theodore Tso <tytso@thunk.org>
1473 * Release of E2fsprogs 1.24a
1475 2001-08-30 Theodore Tso <tytso@thunk.org>
1477 * Release of E2fsprogs 1.24
1479 2001-08-30 Theodore Tso <tytso@valinux.com>
1481 * getsize.c (ext2fs_get_device_size): Back out BLKGETSIZE64
1482 changes, since the ioctl number has been reused by another
1485 2001-08-15 Theodore Tso <tytso@valinux.com>
1487 * Release of E2fsprogs 1.23
1489 2001-08-05 Theodore Tso <tytso@valinux.com>
1491 * alloc.c (ext2fs_new_inode, ext2fs_new_block): Use the fast
1492 version of the bitmap test routines to speed up these
1493 routines. (At some point I may want to make these
1494 routines use the find_first_bit functions, but that will
1495 add a lot of complexity since it means that these
1496 functions will have to break the bitmap abstraction
1497 boundary. It's not clear it's worth it.)
1499 * mkjournal.c (mkjournal_proc): Remember the last block allocated
1500 to speed up ext2fs_new_block().
1502 2001-07-29 Theodore Tso <tytso@valinux.com>
1504 * finddev.c (scan_dir): Fix memory leak; we weren't calling
1505 closedir() when exiting the function in all cases.
1507 2001-07-27 Theodore Tso <tytso@valinux.com>
1509 * mkjournal.c (ext2fs_create_journal_superblock): Set the first
1510 block usable in the journal for external journals to be 2
1511 or 3, depending on the blocksize, so that the existing
1512 kernel code does the right thing.
1514 * getsize.c (ext2fs_get_device_size): Add support for the
1515 BLKGETSIZE64 ioctl. (Ioctl defined by unofficial patches
1516 from Ben LaHaise, but it's likely this interface won't
1519 * mkjournal.c (ext2fs_add_journal_device): Use the correct block
1520 when writing the journal superblock, too. (Oops! Needed
1521 to make 1k filesystems with external journal to work.)
1523 2001-07-26 Theodore Tso <tytso@valinux.com>
1525 * mkjournal.c (ext2fs_add_journal_device): Use the correct block
1526 to find the journal superblock if the blocksize is 1024.
1528 2001-07-21 Theodore Tso <tytso@valinux.com>
1530 * ext2_err.et.in (EXT2_ET_LOAD_EXT_JOURNAL): Add new error code
1532 2001-07-20 Theodore Tso <tytso@valinux.com>
1534 * ext_attr.c (ext2fs_write_ext_attr): When writing the extended
1535 attribute block, set the filesystem changed bit.
1537 * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
1538 Comment out these functions since we're not using them.
1540 2001-07-10 Theodore Tso <tytso@valinux.com>
1542 * closefs.c (write_primary_superblock): After writing changes to
1543 the primary superblock, update the original superblock
1544 copy so we don't have to re-write those changes in the
1546 (ext2fs_flush): Clear the superblock dirty flag after
1547 we've flushed out changes to disk.
1549 2001-07-07 Theodore Tso <tytso@valinux.com>
1551 * bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx
1552 to avoid register conflicts when compiling in PIC mode.
1554 2001-07-04 Theodore Tso <tytso@valinux.com>
1556 * bitops.h (ext2fs_find_first_bit_set, ext2fs_find_next_bit_set):
1557 Add new functions (C and in i386 assembler) which quickly
1558 find bits set in a bitmask.
1560 2001-06-23 Theodore Tso <tytso@valinux.com>
1562 * Makefile.in, ext_attr.c, ext2_attr.c, ext2fs.h: Add new files
1563 ext2_ext_attr.h and ext_attr.c for extended attributes
1566 * Release of E2fsprogs 1.22
1568 2001-06-22 Theodore Tso <tytso@valinux.com>
1570 * mkjournal.c (ext2fs_add_journal_inode): Move close of file
1571 descriptor so that adding a journal to a mounted
1572 filesystem doesn't die. (Fixes a bug accidentally
1573 introduced in e2fsprogs 1.21.)
1575 * mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
1576 HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
1577 fchflags without defining UF_NODUMP. (Addresses Debian
1580 * flushb.c: Use platform independent method of defining the
1581 BLKFLSBUF and FDFLUSH ioctl's. Also include sys/mount.h
1582 since on newer glibc's BLKFLSBUF is defined there.
1584 * bitops.h: The C language versions of ext2fs_swab16/32 need to be
1585 included if EXT2FS_ENABLE_SWAPFS is defined, since we need
1586 to support byte swapping even if we don't support the
1587 conversion functions. (Fixes Debian bug #101686).
1589 * dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2
1590 since the byte-swapping code all assumes the
1591 ext2_dir_entry structure. (It's a question of whether or
1592 not name_len should be byte-swapped or not, and whether
1593 it's a 16 bit or 8 bit field.)
1595 2001-06-15 Theodore Tso <tytso@valinux.com>
1597 * Release of E2fsprogs 1.21
1599 2001-06-15 Theodore Tso <tytso@valinux.com>
1601 * Makefile.in: Fix bug in installation of ext2_types.h. It is a
1602 file which is generated and is therefore found in the
1603 build directory, not source directory.
1605 * ismounted.c (check_mntent_file): Use a test file in / to check
1606 to see if the root filesystem is mounted read-only. This
1607 protects against the case where /etc might not be on /, as
1608 well as the case where /etc/mtab doesn't exist. (Both are
1609 should-never happen scenarios, but you never know...)
1611 2001-06-14 Theodore Tso <tytso@valinux.com>
1613 * ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.
1614 Remove unneeded #pragma argsused, since the arguments are
1617 2001-06-13 Theodore Tso <tytso@valinux.com>
1619 * ext2_types.h.in: If linux/types.h has been defined, then don't
1620 try to redefine the typedefs.
1622 * Makefile.in (HFILES): Add ext2_types.h to the list of files
1623 which should be installed.
1625 * ismounted.c (check_mntent_file): Work around GNU hurd brain
1626 damage. Addresses Debian bug #100304.
1628 * Makefile.in: Limit some .o files from being included into the
1629 library if --disable-debugfs, --disable-swapfs,
1630 --disable-imager, or --disable-resizer are used.
1632 2001-06-12 Theodore Tso <tytso@valinux.com>
1634 * inode.c, tst_iscan.c: Stop using the compatibility badblocks
1635 function, and use the ext2fs_badblocks_* functions
1638 2001-06-11 Theodore Tso <tytso@valinux.com>
1640 * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
1641 ext2fs_mark_generic_bitmap and
1642 ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal
1643 functions. (This saves space and doesn't significantly
1644 change the speed of e2fsck on a P-III.)
1646 * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c,
1647 inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only
1648 include the byte-swapping logic if ENABLE_SWAPFS is turned
1649 on or if we're on a big-endian machine.
1651 * initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to
1652 set EXT2_FLAG_SWAP_BYTES, instead of using
1655 * native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
1656 autoconf to determine whether or not return
1657 EXT2_FLAG_SWAP_BYTES.
1659 2001-06-10 Theodore Tso <tytso@valinux.com>
1661 * Makefile.in: Remove the dependence on the libe2p library.
1663 * mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags
1664 with direct usage of the ioctl/fchflags so that we don't
1665 have to depend on the libe2p library.
1667 2001-06-08 Theodore Tso <tytso@valinux.com>
1669 * ext2_types.h.in: Use unsigned ints in favor of unsigned longs
1670 when trying to find a 32-bit wide type.
1672 * icount.c (insert_icount_el): Fix the code used to estimate the
1673 size of the new icount array to be more intelligent, to
1674 avoid reallocating the array too many times. Thanks to
1675 Enrique Perez-Terron for pointing this out.
1677 2001-06-02 Theodore Tso <tytso@valinux.com>
1679 * valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks
1680 for a symlink to determine whether it is a fast symlink.
1682 2001-06-01 Theodore Tso <tytso@valinux.com>
1684 * Makefile.in, dosio.c, ext2_fs.h, ext2_types.h.in, ext2fs.h:
1685 Move include/asm/types.h.in to lib/ext2fs/ext2_types.h.in.
1687 2001-05-25 Theodore Tso <tytso@valinux.com>
1689 * Release of E2fsprogs 1.20
1691 2001-05-25 Theodore Tso <tytso@valinux.com>
1693 * ismounted.c: More cleanups for ismounted.c, some from Andreas,
1694 some to clean up Andreas's patches. Use strncpy instead
1695 of strcpy to save the root's mountpoint. Clean up #ifdef
1696 structure. Remove uneeded variable in testing/debug driver.
1698 2001-05-24 Andreas Dilger <adilger@turbolinux.com>
1700 * ismounted.c: Add check for root device which doesn't depend on
1701 /etc/fstab or /proc/mounts to be correct. Don't call
1702 endmntent() before we are done with mnt struct.
1704 2001-05-23 Theodore Tso <tytso@valinux.com>
1706 * ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error
1709 2001-05-21 Theodore Tso <tytso@valinux.com>
1711 * ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to
1712 make room for pre-existing usage of
1713 EXT2_FEATURE_COMPAT_EXT_ATTR. Add flag EXT2_INDEX_FL with
1714 the same codepoint as EXT2_BTREE_FL.
1716 2001-05-20 Theodore Tso <tytso@valinux.com>
1718 * ext2fs.h: #include <> instead of "" for ext2fs and et header
1719 files, since they will be installed in /usr/include
1721 2001-05-14 Theodore Tso <tytso@valinux.com>
1723 * alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
1724 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
1725 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
1726 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
1727 expanddir.c, ext2_fs.h, fileio.c, finddev.c, flushb.c,
1728 freefs.c, get_pathname.c, getsize.c, icount.c, imager.c,
1729 initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
1730 link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c,
1731 newdir.c, nt_io.c, openfs.c, read_bb.c, read_bb_file.c,
1732 rs_bitmap.c, rw_bitmaps.c, swapfs.c, test_io.c,
1733 tst_badblocks.c, tst_byteswap.c, tst_getsize.c,
1734 tst_iscan.c, unix_io.c, unlink.c, valid_blk.c, version.c,
1735 write_bb_file.c, ext2_fs.h: Moved file from include/linux.
1736 Adjust all files in this directroy to include this file.
1738 * mkjournal.c (ext2fs_create_journal_superblock): Remove redundant
1741 2001-05-05 Theodore Tso <tytso@valinux.com>
1743 * fileio.c (ext2fs_file_read): Factored out common code and
1744 cleaned up function. Fixed a bug where if there was an
1745 error reading from the disk, the number of bytes read
1746 wasn't reliably set. (Fixes Debian bug #79163)
1747 (ext2fs_file_write): Factored out common code and made
1748 function more efficient; if writing a full block, don't
1749 bother to do a read-modify-write cycle.
1751 2001-05-04 Theodore Tso <tytso@valinux.com>
1753 * dirblock.c (ext2fs_read_dir_block): Check for an directory
1754 record length which isn't a multiple four, and treat that
1755 as an invalid. Scan the directory and return an error
1756 (EXT2_ET_DIR_CORRUPTED) if the directory records are
1758 (ext2fs_write_dir_block): If while byte-swapping the
1759 directory block, if there's an error, abort and return
1760 EXT2_ET_DIR_CORRUPTED.
1762 2001-05-02 Theodore Tso <tytso@valinux.com>
1764 * ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add
1765 image_header field in the ext2_filsys structure
1767 * block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind):
1768 * inode.c (ext2fs_read_inode):
1769 * rw_bitmaps.c (read_bitmaps):
1770 * openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
1772 * imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make
1773 sure the full bitmap is saved.
1775 2001-05-01 Theodore Tso <tytso@valinux.com>
1777 * e2image.h (struct ext2_image_hdr): Add space for the device name
1778 in the image header.
1780 * dir_iterate.c (ext2fs_process_dir_block): Add a double-check to
1781 make sure the rec_len is a multiple of 4, to prevent
1782 bus-errors on architectures which care about mis-aligned
1785 2001-04-25 Theodore Tso <tytso@valinux.com>
1787 * getsize.c (ext2fs_get_device_size): Use an unsigned long to
1788 query the device sizes using the BLKGETSIZE ioctl.
1790 2001-04-16 Theodore Tso <tytso@valinux.com>
1792 * ismounted.c (check_mntent): Check /proc/mounts on Linux systems
1793 before checking /etc/mtab. The EXT2_MF_READONLY flag is
1794 now set from the /etc/mtab options field for all
1795 filesystems, not just the root filesystem. Add debugging
1796 code to make it easier to test ext2fs_check_if_mounted().
1798 * mkjournal.c (ext2fs_create_journal_superblock): Add safety
1799 check; return an error if there's an attempt to create a
1800 journal less than 1024 filesystem blocks.
1802 * ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
1803 EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
1805 2001-02-20 Theodore Tso <tytso@valinux.com>
1807 * bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly
1810 * tst_byteswap.c: New function to test the byteswap functions.
1811 Add to regression test suite.
1813 2001-02-08 Theodore Tso <tytso@valinux.com>
1815 * e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
1817 2001-02-07 Theodore Tso <tytso@valinux.com>
1819 * mkjournal.c (ext2fs_create_journal_superblock): Fix the setting
1820 of s_first for external devices to always be 1, since
1821 jsb->s_first is always relative to the start of the
1822 journal superblock. Use htonl(1) when setting s_nr_users.
1824 2001-01-17 Theodore Ts'o <tytso@valinux.com>
1826 * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
1827 device number of the filesystem (instead of the journal)
1828 was being dropped into s_journal_dev.
1830 2001-01-15 Theodore Ts'o <tytso@valinux.com>
1832 * initialize.c (ext2fs_initialize): Add support for initializing
1833 the ext2 superblock for external journal devices. This
1834 basically means we don't bother to allocate any block
1837 * openfs.c (ext2fs_open): Only open external journal devices if
1838 the new flag EXT2_FLAG_JOURNAL_DEV_OK is passed to
1839 ext2fs_open. When opening such devices, don't try to read
1840 the block group descriptors, since they're not there.
1842 * ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code
1844 * mkjournal.c: Export a new function,
1845 ext2fs_create_journal_superblock(), which allocates and
1846 returns a buffer containing a journal superblock. This is
1847 needed by mke2fs to create an external journal. Rewrote
1848 ext2fs_add_journal_device() so that it no longer creates
1849 the external journal, but rather adds a filesystem to an
1850 existing external journal. It handles all of the UUID
1853 * ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported
1854 by the library. Define the EXT2_FLAG_JOURNAL_DEV_OK.
1855 Changed function prototype for ext2fs_add_journal_device().
1857 2001-01-14 Theodore Ts'o <tytso@valinux.com>
1859 * closefs.c (ext2fs_flush): Don't write out anything beyond the
1860 primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is
1863 2001-01-12 Theodore Ts'o <tytso@valinux.com>
1865 * imager.c: Fix gcc -Wall complaints and a series of bugs where
1866 retval wasn't set correctly. (Thanks to Andreas Dilger
1867 for pointing this out.)
1869 2001-01-11 <tytso@snap.thunk.org>
1871 * flushb.c (ext2fs_sync_device): New function which centralizes
1872 all of the places which might try to use the BLKFLSBUF
1873 or FDFLUSH ioctls (and usually failing to define them
1874 since the system header files don't usually do this for
1875 us, and we're trying to avoid usage of kernel include
1878 2001-01-10 <tytso@snap.thunk.org>
1880 * alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c,
1881 bmove.c, brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c,
1882 dir_iterate.c, expanddir.c, ext2fs.h, ext2fsP.h, fileio.c,
1883 finddev.c, get_pathname.c, icount.c, inode.c, irel.h,
1884 irel_ma.c, ismounted.c, link.c, lookup.c, mkdir.c,
1885 mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
1886 tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to
1887 ext2_ino_t, to protect applications that attempt to
1888 compile -D_FILE_OFFSET_BITS=64, since this inexplicably
1889 changes ino_t(!?). So we use ext2_ino_t to avoid an
1890 unexpected ABI change.
1892 2001-01-05 <tytso@snap.thunk.org>
1894 * dirblock.c (ext2fs_read_dir_block): Fix a potential case where
1895 we may overrun allocated memory in case of a corrupted
1896 filesystem (or an e2fsck test case :-) when byte-swapping
1897 the directory block.
1899 * ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
1901 * mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
1902 complaints including a missing return 0 at the end of
1903 ext2fs_add_journal_device.
1905 2001-01-03 <tytso@snap.thunk.org>
1907 * Makefile.in: Link in libe2p when creating libext2fs as a shared
1908 library, since mkjournal.c now references fsetflags().
1910 * mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas
1911 Dilger's changes (with fixups) to allow on-line creation
1914 * ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
1915 EXT2_FLAG_SUPER_ONLY, which the close routines to only
1916 update the superblock, and not the group descriptors.
1918 2000-12-30 Andreas Dilger <adilger@turbolinux.com>
1920 * ismounted.c: add ext2fs_check_mount_point() function, which will
1921 optionally return the mount point of a device if mounted
1923 2000-12-14 Andreas Dilger <adilger@turbolinux.com>
1925 * mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
1926 ext2fs_add_journal_inode()
1928 2001-01-01 <tytso@snap.thunk.org>
1930 * ext2fs.h: Remove definition of ext2fs_sb. Note: this may break
1931 source (but not binary) compatibility of some users of the
1932 ext2 library. They should just simply do a global search
1933 and replace of struct ext2fs_sb with struct
1934 ext2_super_block, and use their own private copy of
1935 ext2_fs.h if they aren't already.
1937 * closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c:
1938 Replace use of ext2fs_sb with ext2_super_block.
1940 2000-12-31 <tytso@snap.thunk.org>
1942 * ext2fs.h: Cleaned up header file by removing definitions of
1943 feature flags that might not have been defined in older
1944 ext2 header files. Now that we're using our own
1945 include/linux/ext2fs.h header file, this can never happen.
1947 * jfs_dat.h: Removed old header file which is no longer needed.
1949 2000-12-13 Theodore Ts'o <tytso@valinux.com>
1951 * closefs.c (ext2fs_update_dynamic_rev): New function suggested
1952 by Andreas Dilger to update the filesystem revision to
1955 * swapfs.c (ext2fs_swap_super): Add byte swapping for the journal
1958 2000-12-09 <tytso@snap.thunk.org>
1960 * ext2fs.h, mkjournal.c (ext2fs_add_journal_inode,
1961 ext2fs_add_journal_device): Add a new argument to the APIs
1962 of these function, which is a flags word. This is used to
1963 allow the creation of a V1 superblock for those folks who
1964 are using ext3 0.3b in production. Note, the user-land
1965 interface for getting at this flag won't be documented, as
1966 the V1 superblock is deprecated.
1968 * mkjournal.c (init_journal_superblock): Sync Stephen's changes
1969 which creates a V2 superblock instead of a V1 superblock.
1971 2000-11-21 <tytso@snap.thunk.org>
1973 * test_io.c (test_write_blk, test_write_byte): Fix typos pointed
1974 out by Andreas Dilger.
1976 2000-11-05 <tytso@snap.thunk.org>
1978 * imager.c (ext2fs_image_{inode,super,bitmap}_{read,write},
1979 ext2_fs.h, Makefile.in: New file that has routines that
1980 save ext2fs metadata to a file.
1982 * ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
1984 * e2image.h: New file which defines the file format for the ext2
1985 image file. (Saved copy of ext2 metadata to a file as a
1986 saving throw against worst-case damage.)
1988 2000-11-01 <tytso@snap.thunk.org>
1990 * inode.c (ext2fs_flush_icache): Add new function
1991 ext2fs_flush_icache() which flushes the internal inode
1992 cache. Applications which modify the inode table blocks
1993 directly must call this function.
1995 2000-10-26 <tytso@snap.thunk.org>
1997 * mkjournal.c: Add #include of netinet/in.h, since Solaris
1998 requires it for ntohl().
2000 * ext2_io.h (io_channel_write_byte): Add new interface to allow
2001 callers to write specific byte ranges. This is an
2002 optional interface, which not all IO channels may
2005 * unix_io.c (unix_write_byte):
2006 * test_io.c (test_write_byte): Add implementation of the
2007 write_byte function.
2009 * closefs.c (write_primary_superblock, ext2fs_flush): Add a new
2010 function which writes the primary superblock. If the IO
2011 channel supports writing raw bytes directly, only fields
2012 which were modified are written to the disk. This makes
2013 it safe(r) to use utilities like tune2fs on a mounted
2016 * freefs.c (ext2fs_free): Free the original superblock if it is
2019 * openfs.c (ext2fs_open): Store a copy of the original superblock
2022 * ext2fs.h: Add a field to store the original superblock in the
2023 ext2 context structure.
2025 2000-10-24 <tytso@snap.thunk.org>
2027 * llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we
2028 don't need to use llseek).
2030 2000-10-24 <tytso@valinux.com>
2032 * Makefile.in, ext2fs.h, jfs_dat.h, mkjournal.c: Add functions for
2033 creating an ext3 journal on a filesystem.
2035 2000-08-21 <tytso@valinux.com>
2037 * ext2_err.et.in (EXT2_JOURNAL_NOT_BLOCK): Add new error code.
2039 2000-08-22 <tytso@valinux.com>
2041 * unix_io.c: Make massive changes to support a multiple block
2042 writethrough cacheing.
2044 * ext2_io.h: Added flags field to the io_channel structure.
2046 2000-08-19 <tytso@valinux.com>
2048 * finddev.c, ext2fs.h, Makefile.in: Add new file, finddev.c, which
2049 provides the function ext2fs_find_block_device(). This
2050 function returns the pathname to a block device, given its
2053 2000-07-13 <tytso@valinux.com>
2055 * Release of E2fsprogs 1.19
2057 2000-07-07 Theodore Ts'o <tytso@valinux.com>
2059 * ext2fs.h (EXT2_LIB_FEATURE_INCOMPAT_SUPP): Add
2060 EXT3_FEATURE_INCOMPAT_RECOVER (aka needs_recovery) to the
2061 list of filesystem flags supported by the library.
2063 2000-07-04 Theodore Ts'o <tytso@valinux.com>
2065 * ext2fs.h: Update to include latest journalling additions to the
2068 * dll/jump.funcs: Add new jumptable entries for
2069 ext2fs_write_bb_FILE, ext2fs_read_bb_FILE2, and
2070 ext2fs_badblocks_equal.
2072 * tst_badblocks.c: Update test program to test
2073 ext2fs_read_bb_FILE2 and ext2fs_write_FILE.
2075 * write_bb_file.c (ext2fs_write_bb_FILE): New function which
2076 writes out bad blocks list to a file.
2078 * read_bb_file.c (ext2fs_read_bb_FILE2): Add new function which
2079 changes the callback function to take two additional
2080 arguments; a private blind pointer supplied by the caller,
2081 and pointer to a char * containing a pointer to the
2084 * badblocks.c (ext2fs_badblocks_equal): Add new function which
2085 returns true if two badblocks list are equal.
2087 * Makefile.in: Remove explicit link of -lc in the shared library.
2088 (It shouldn't be necessary, and is harmful in some cases).
2090 2000-06-10 Theodore Ts'o <tytso@valinux.com>
2092 * getsize.c (main): Add debugging code under #ifdef DEBUG
2094 2000-05-27 Theodore Ts'o <tytso@valinux.com>
2096 * mkdir.c (ext2fs_mkdir): Read the parent directory's inode
2097 earlier, so that if there's an error reading it, we can
2098 more cleanly back out of the operation.
2100 2000-05-25 <tytso@snap.thunk.org>
2102 * getsize.c (ext2fs_get_device_size): Use open64() instead of
2103 open() if it exists. Under linux, manually define the
2104 ioctl for BLKGETSIZE if it isn't already defined and it's
2107 * unix_io.c (unix_open): Use open64() instead of open() if it
2110 * llseek.c: Simplify header includes of unistd.h. If lseek64 is
2111 available (and prototypes are defined) use it in
2112 preference to llseek.
2114 * Makefile: Add hack dependency rule so that parallel makes work
2117 2000-05-18 Theodore Ts'o <tytso@valinux.com>
2119 * ext2fs.h: Add appropriate ifdef's to support C++ compilation.
2121 2000-04-03 Theodore Ts'o <tytso@valinux.com>
2123 * block.c: Readibility tweak in conditionals involving
2126 * ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine
2127 how to define __s64 and __u64. Turn off "compression is
2128 experimental" warning if the cpp macro
2129 I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is defined.
2131 2000-02-11 <tytso@snap.thunk.org>
2133 * ext2fs.h: Define EXT2FS_COMPRESSED_BLKADDR and HOLE_BLKADDR.
2134 Conditionally include Compression as a supported type if
2135 ENABLE_COMPRESSION (via --enable-compression) is turned on.
2137 * swapfs.c (ext2fs_swap_super): Swap the compression usage bitmap.
2139 2000-02-08 <tytso@snap.thunk.org>
2141 * bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
2142 ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
2143 ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap):
2144 Change to return the previous state of the bit that is
2145 being marked or unmarked. For speed optimization.
2147 2000-02-02 Theodore Ts'o <tytso@valinux.com>
2149 * getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
2151 * swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not
2152 needed any more; we know it will always be i_generation.
2153 Add support for swapping the high bits of the uid and gid.
2155 1999-11-19 <tytso@valinux.com>
2157 * mkdir.c (ext2fs_mkdir): Only update the parent's inode link
2158 counts if the link was successful. Patch suggested by
2161 * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
2162 the source directory.
2164 1999-11-10 <tytso@valinux.com>
2166 * Release of E2fsprogs 1.18
2168 1999-11-08 <tytso@valinux.com>
2170 * Makefile.in (tst_badblocks): Add freefs.o to the object list,
2171 since ext2fs_badblocks_list_free was moved to freefs.c.
2173 * tst_badblocks.c: Use the newer badblocks API names. Add
2174 duplicate blocks to the test inputs to test dealing with
2175 adding blocks which are already in the badblocks list.
2177 * badblocks.c (ext2fs_badblocks_list_add): If appending to the end
2178 of the list, use a shortcut O(1) operations instead of an
2179 O(n) operation. (Idea suggested by David Beattie.)
2181 * freefs.c (ext2fs_free): Use ext2fs_badblocks_list_free() instead
2182 of badblocks_list_free(), to save a procedure call.
2184 1999-10-26 <tytso@valinux.com>
2186 * Release of E2fsprogs 1.17
2188 1999-10-26 <tytso@valinux.com>
2190 * ext2fs.h: Add kludge to deal with the fact that egcs cpp doesn't
2191 seem to handle ~0UL the same way as they used to.
2193 1999-10-25 <tytso@valinux.com>
2195 * nt_io.c (_OpenNtName): Open the device using
2196 FILE_SYNCHRONOUS_IO_NONALERT instead of
2197 FILE_SYNCHRONOUS_IO_ALERT
2198 (nt_open): At the end of the device open routine, unlock
2199 the drive but do not dismount it.
2201 * initialize.c (CREATOR_OS): Use __GNU__ instead of __gnu__ to
2204 1999-10-22 <tytso@valinux.com>
2206 * Release of E2fsprogs 1.16
2208 1999-10-22 <tytso@valinux.com>
2210 * mkdir.c (ext2fs_mkdir): Pass EXT2_FT_DIR flag to ext2fs_link().
2212 * link.c (ext2fs_link): This call now uses the low three bits of
2213 the flags parameter to pass the directory filetype
2214 information; it will set the directory entry FILETYPE
2215 information if the filesystem supports it.
2217 * newdir.c (ext2fs_new_dir_block): If the FILETYPE superblock
2218 option is set, then create the '.' and '..' entries with
2219 the filetype set to EXT2_FT_DIR.
2221 1999-09-24 <tytso@valinux.com>
2223 * nt_io.c: New file which supports I/O under Windows NT.
2225 1999-09-07 <tytso@valinux.com>
2227 * ext2fs.h: Add new fields for journalling and define new
2228 feature bits used by newer filesystems: IMAGIC_INODES,
2229 HAS_JOURNAL, RECOVER.
2231 * expanddir.c (ext2fs_expand_dir, expand_dir_proc): Change where
2232 we update the inode block count and size files so that the
2233 block count field is updated correctly when we create an
2236 1999-07-18 Theodore Ts'o <tytso@valinux.com>
2238 * Release of E2fsprogs 1.15
2240 1999-06-23 <tytso@valinux.com>
2242 * swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3
2243 kernels that use i_generation instead of i_version. Patch
2244 supplied by Jon Bright <sircus@sircus.demon.co.uk>.
2246 1999-06-21 <tytso@valinux.com>
2248 * dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
2249 directory entry before calling the callback function.
2250 This should prevent some core dumps of insufficiently
2251 paranoid callback functions.
2253 1999-05-29 <tytso@rsts-11.mit.edu>
2255 * ext2fs.h: Add feature definition for AFS IMAGIC inodes.
2257 * fileio.c (ext2fs_file_open): Remove obsolete comment stating
2258 that we don't handle writing yet (we do). Fixed bug where
2259 we weren't allocating a big enough buffer for ext2_bmap.
2261 1999-05-03 <tytso@rsts-11.mit.edu>
2263 * openfs.c (ext2fs_open): Check to make sure that the number of
2264 blocks per group is not zero --- if so, it must be a bad
2267 1999-01-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
2269 * Release of E2fsprogs 1.14
2271 1999-01-07 Theodore Ts'o <tytso@rsts-11.mit.edu>
2273 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if
2274 the inode number is zero; if it's zero, return
2275 EXT2_ET_BAD_INODE_NUM.
2277 1998-12-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
2279 * initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead
2280 of EXT2_FIRST_INO to ensure compatibility with Linux 1.2
2283 Mon Jan 4 02:32:09 1999 Theodore Y. Ts'o <tytso@mit.edu>
2285 * llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the
2286 non-Linux case to use EINVAL by default, unless it isn't
2287 defined, in which case we use EXT2_ET_INVALID_ARGUMENT
2290 1998-12-15 Theodore Ts'o <tytso@rsts-11.mit.edu>
2292 * Release of E2fsprogs 1.13
2294 1998-12-03 Theodore Ts'o <tytso@rsts-11.mit.edu>
2296 * Makefile.in: Updated dependencies.
2298 1998-09-22 Theodore Ts'o <tytso@rsts-11.mit.edu>
2300 * initialize.c (ext2fs_initialize): Make sure that we allocate
2301 enough inodes so that we can make a valid filesystem.
2303 1998-09-02 Theodore Ts'o <tytso@rsts-11.mit.edu>
2305 * rw_bitmaps.c: Fixed signed/unsigned warnings.
2307 * fileio.c (ext2fs_file_set_size): Remove unneeded extern from the
2308 function declaration.
2310 * dblist.c (make_dblist): Add safety check in case the dblist
2311 pointer passed in is null (in which case, assign it to
2312 fs->dblist). Fixed some signed/unsigned warnings.
2314 * bmap.c: Make addr_per_block be of type blk_t to avoid
2315 signed/unsigned warnings.
2317 * namei.c (ext2fs_follow_link): Remove uneeded extern from the
2318 function declaration.
2320 * get_pathname.c (get_pathname_proc): Use return value from
2321 ext2fs_get_mem, instead of checking if &gp->name is
2324 * dir_iterate.c (ext2fs_process_dir_block):
2325 * dblist_dir.c (ext2fs_dblist_dir_iterate): Remove uneeded extern
2326 from the function declaration.
2328 * block.c (ext2fs_block_iterate2): If the read_inode call fails,
2329 return the error directly instead of jumping to the
2330 cleanup routine, since we don't need to do any cleanup.
2332 * alloc_table.c (ext2fs_allocate_group_table): Make this
2333 function take a dgrp_t for its group argument.
2335 * ext2fs.h: Make dgrp_t an __u32 type, and make
2336 fs->desc_group_count be of type dgrp_t.
2338 1998-07-27 Theodore Ts'o <tytso@rsts-11.mit.edu>
2340 * badblocks.c (ext2fs_badblocks_list_add): Use a bigger increment
2341 than 10 blocks when we need to expand the size of the
2344 1998-07-09 Theodore Ts'o <tytso@rsts-11.mit.edu>
2346 * Release of E2fsprogs 1.12
2348 1998-06-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
2350 * closefs.c (ext2fs_flush): Update the s_block_group_nr field as
2351 appropriate for all of the block group copies, so that
2352 it's clear where the beginning of the filesystem is on the
2353 disk. (For when the partition table gets scrod.)
2355 * ext2fs.h: Change the name of the feature from
2356 EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE to
2357 EXT2_FEATURE_INCOMPAT_FILESIZE (to match with the kernel).
2359 1998-06-18 Theodore Ts'o <tytso@rsts-11.mit.edu>
2361 * inode.c (get_next_blockgroup): Fix bug where if
2362 get_next_blockgroup() is called early because of a missing
2363 inode table in a block group, the current_inode counter
2364 wasn't incremented correctly.
2366 1998-06-16 Theodore Ts'o <tytso@rsts-11.mit.edu>
2368 * read_bb.c (ext2fs_read_bb_inode): Make function more robust
2369 against a completely trashed bad block inode.
2371 1998-06-10 Theodore Ts'o <tytso@rsts-11.mit.edu>
2373 * alloc_tables.c (ext2fs_allocate_group_table): Fix bug so that if
2374 the stride length hits a bad value, we retry the block
2375 allocation starting at the beginning of the block group.
2377 * ext2fs.h, bb_inode.c, block.c, bmove.c, dir_iterate.c,
2378 expanddir.c, ext2fsP.h, read_bb.c: Change blkcnt_t to be
2379 e2_blkcnt_t to avoid collision with LFS API.
2381 1998-05-01 Theodore Ts'o <tytso@rsts-11.mit.edu>
2383 * initialize.c (ext2fs_initialize): Initialize s_inodes_count in a
2384 way that avoids overflows on disk sizes greater than 4GB.
2386 1998-04-28 Theodore Ts'o <tytso@rsts-11.mit.edu>
2388 * ext2fs.h: Define EXT2_QSORT_TYPE appropriately for the
2389 return type for comparison functions for qsort.
2391 * dblist.c (dir_block_cmp): Use EXT2_QSORT_TYPE in function
2394 1998-04-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
2396 * ext2fs.h, bitops.h: Add support for the Watcom C compiler to do
2399 * ext2fs.h, dosio.c: Use asm/types.h instead of linux/types.h to
2400 evade a potential problem with glibc's header files trying
2401 to spike out linux/types.h.
2403 * ext2fs.h (ext2fs_resize_mem): Change the function prototype to
2404 include the old size of the memory, which is needed for
2405 some braindamaged memory allocation systems that don't
2408 * badblocks.c (ext2fs_badblocks_list_add):
2409 bb_inode.c (clear_bad_block_proc):
2410 dblist.c (ext2fs_add_dir_block):
2411 icount.c (insert_icount_el):
2412 irel_ma.c (ima_put):
2413 rs_bitmap.c (ext2fs_resize_generic_bitmap): Update functions to
2414 pass the old size of the memory to be resized to
2415 ext2fs_resize_mem().
2417 1998-03-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
2419 * Makefile.in: Change to use new installation directory variables
2420 convention. Fix uninstall rules to take $(DESTDIR) into
2423 1998-03-29 Theodore Ts'o <tytso@rsts-11.mit.edu>
2425 * ext2fs.h: If __STRICT_ANSI__ is defined and we're on a platform
2426 with 32 bit longs, then we need to manually define __s64
2427 and __u64, since the current kernel header files don't
2428 define these if __STRICT_ANSI__ is defined. This is a
2429 problem if we are compiling with full GCC warnings, since
2430 we do need 64 bit support.
2432 * Makefile.in (OBJS): Remove bmove.o from files to be built,
2433 since we're not using ext2fs_move_blocks() and there
2434 is some question as to its usefulness in its current
2437 * bmap.c (block_bmap): Remove unused function.
2439 * bmove.c (process_block): Fix -Wall warning.
2441 1998-03-23 Theodore Ts'o <tytso@rsts-11.mit.edu>
2443 * block.c (ext2fs_block_iterate3): Make the ref_offset field
2444 contain the offset into the inode.i_blocks array when
2445 ref_block is zero. Since we haven't done a formal
2446 release of e2fsprogs since block_iterate2 was first
2447 introduced, I removed block_iterate2, and renamed
2448 block_iterate3 to be block_iterate2.
2450 * bb_inode.c, bmove.c, dblist_dir.c, dir_iterate.c,
2451 expanddir.c, ext2fs.h, ext2fsP.h, read_bb.c: Change
2452 use of block_iterate and block_iterate2 to
2453 block_iterate2 with the new prototype for the
2454 interator function. (using blkcnt_t forr blockcount)
2456 1998-03-21 Theodore Ts'o <tytso@rsts-11.mit.edu>
2458 * ext2fs.h: Add new superblock fields (s_algorithm_usage_bitmap,
2459 s_prealloc_blocks, s_prealloc_dir_blocks). Added
2460 conditional defines of new features COMPAT_DIR_PREALLOC,
2461 RO_COMPAT_LARGE_FILE RO_COMPAT_BTREE_DIR,
2462 INCOMPAT_COMPRESSION, INCOMPAT_DIRNAME_SIZE. Changed
2463 the library to declare that we support COMPAT_DIR_PREALLOC,
2464 INCOMPAT_DIRNAME_SIZE, RO_COMPAT_LARGE_FILE.
2466 * fileio.c: Rename function ext2fs_file_llseek to be
2467 ext2fs_file_lseek, which is more accurate.
2469 * block.c: Add new function ext2fs_block_iterate3 which calls
2470 the iterator function with the blockcount argument of
2471 type blkcnt_t. This version of the function is
2472 allowed to handle large files; the other fucntions are
2475 * ext2fs.h: Add new type blkcnt_t
2477 * ext2_err.et.in: Add error code EXT2_ET_FILE_TOO_BIG
2479 * block.c (ext2fs_block_iterate2): Fix bug where the block count
2480 field wasn't getting correctly incremented for sparse
2481 files when the indirect or doubly-indirect block
2482 specified in the inode was zero.
2484 Sun Mar 8 22:42:47 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2486 * unlink.c (unlink_proc):
2487 * lookup.c (lookup_proc):
2488 * link.c (link_proc):
2489 * get_pathname.c (get_pathname_proc):
2490 * dir_iterate.c (ext2fs_process_dir_block): Mask off high 8 bits
2491 from dirent->name_len, so it can be used for other
2494 * ext2fs.h: Add definition of EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE,
2495 and indicate that we have support for this incompatible
2498 Mon Feb 23 08:46:33 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2500 * ext2_err.et.in: Added new error code, EXT2_ET_CANCEL_REQUESTED.
2502 Fri Feb 20 23:58:01 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2504 * dblist.c (ext2fs_get_num_dirs): Improve the estimation of the
2505 number of directories when the block group information is
2508 1998-02-20 Theodore Y. Ts'o <tytso@edt.mit.edu>
2510 * inode.c (ext2fs_get_next_inode): Always do the check to see if the
2511 inode table is missing so that we catch the case where the
2512 first block group is missing.
2514 * getsize.c, ismounted.c, unix_io.c: #include errno.h since it's
2517 Mon Feb 16 16:16:00 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2519 * ext2_io.h, ext2fs.h: Protect against being included multiple times.
2521 * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
2523 * test_io.c (test_flush): Add a debugging printf when the flush
2526 * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
2527 read in, return right away.
2529 Sun Feb 1 08:20:24 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2531 * bitops.h: Don't try to do i386 inline asm functions if the
2534 * ext2fs.h: If EXT2_FLAT_INCLUDES is defined, #include e2_types.h,
2535 instead of linux/types.h, and e2_bitops.h instead of
2538 * icount.c, version.c: Don't #include <et/com_err.h>, as it isn't
2541 Sat Jan 17 13:13:31 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2543 * inode.c (ext2fs_open_inode_scan): Initialize the group variables
2544 so that we don't need to call get_next_blockgroup() the
2545 first time around. Saves a bit of time, and prevents us
2546 from needing to assign -1 to current_group (which is an
2549 * icount.c (insert_icount_el): Cast the estimated number of inodes
2550 from a float to an ino_t.
2552 * alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
2553 bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
2554 check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
2555 dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c,
2556 expanddir.c, ext2fs.h, fileio.c, freefs.c,
2557 get_pathname.c, getsize.c, icount.c, initialize.c,
2558 inline.c, inode.c, irel_ma.c, ismounted.c, link.c,
2559 lookup.c, mkdir.c, namei.c, native.c, newdir.c,
2560 openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
2561 rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
2562 tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c,
2563 valid_blk.c, version.c: If EXT2_FLAT_INCLUDES is
2564 defined, then assume all of the
2565 ext2-specific header files are in a flat directory.
2567 * block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
2568 all assignments from void * to be compatible with C++.
2570 Tue Jan 6 11:28:15 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
2572 * closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
2573 make sure the contents of the disk are flushed to disk.
2575 Mon Dec 29 14:39:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2577 * dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
2578 avoid C++ namespace clash.
2580 * bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
2581 avoid C++ namespace clash.
2583 * ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
2584 irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
2585 ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
2586 unlink.c: Change private to be priv_data (to avoid C++
2589 Fri Nov 28 09:26:31 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2591 * dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more
2592 paranoid about validating the directory counts from the
2593 block group information.
2595 * all files: Don't include stdlib.h anymore; include it in
2596 ext2_fs.h, since that file requires stdlib.h
2598 Thu Nov 20 16:07:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2600 * expanddir.c (ext2fs_expand_dir): Check to make sure the block
2601 bitmap is loaded, and return an error if it is not.
2602 (expand_dir_proc): Only use ext2fs_write_dir_block when
2603 writing a directory block, not when writing out a fresh
2606 Tue Nov 11 22:46:45 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2608 * Makefile.in, tst_getsize.c: Added new file which is used to test
2609 the ext2fs_get_device_size function.
2611 * ext2_err.et.in (EXT2_ET_UNIMPLEMENTED): Added new error code.
2613 Sun Nov 2 20:36:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2615 * ext2fs.h: Make ext2fs_get_mem take an unsigned argument.
2617 * fileio.c (ext2fs_file_get_size, ext2fs_file_set_size,
2618 ext2fs_file_get_fs): New functions added.
2621 Fri Oct 31 12:16:52 1997 <tytso@EDT.MIT.EDU>
2623 * bitops.c (ext2fs_warn_bitmap, ext2fs_warn_bitmap2): Don't call
2624 com_err if OMIT_COM_ERR is defined.
2626 Thu Oct 30 11:33:57 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2628 * Rename new error codes to _ET_ in them for consistency.
2630 Sat Oct 25 00:06:58 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2632 * [all files, basically]: Added definition of ext2fs_get_mem,
2633 ext2fs_free_mem, and ext2fs_resize_mem in ext2fs.h, and
2634 changed all library routines to use these wrapper functions.
2636 * dblist.c, mkdir.c: use EXT2_DIR_EXISTS and EXT2_DB_NOT_FOUND
2637 instead of the system error messages.
2639 * ext2_err.et.in: Added new error messages EXT2_DIR_EXISTS and
2642 * ext2fs.h: Added function declarations and constants for bmap.c
2645 * ext2_err.et.in: Added new error messages EXT2_FILE_RO and
2646 EXT2_ET_MAGIC_EXT2_FILE
2648 * Makefile.in: Added files bmap.c and fileio.c, and temporarily
2649 commented out brel_ma.c and irel_ma.c
2651 * bmap.c: New file which maps a file's logical block number to its
2652 physical block number.
2654 * fileio.c: New file which implements simple file reading and
2657 * alloc.c (ext2fs_alloc_block): New function which allocates a
2658 block, zeros it, and updates the filesystem accounting
2659 records appropriately.
2661 Wed Oct 22 16:47:27 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2663 * ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
2664 EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL,
2665 EXT2_INODE_ALLOC_FAIL, EXT2_NOT_DIRECTORY
2667 * Change various library files to use these functions instead of
2668 EINVAL, ENOENT, etc.
2670 Mon Oct 20 19:32:40 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2672 * llseek.c: Check HAVE_LLSEEK_PROTOTYPE to see whether or not we
2673 need to declare llseek().
2675 Sun Oct 19 18:56:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2677 * Rename io.h to be ext2_io.h (avoid namespace collisions)
2679 * Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
2681 Fri Oct 3 13:35:59 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2683 * llseek.c (ext2fs_llseek): Fix type error for ext2fs_llseek()
2685 * icount.c (ext2fs_icount_validate):
2686 * bmove.c (process_block): Fix lint error in type for fprintf().
2688 Mon Sep 15 11:45:09 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2690 * inode.c (ext2fs_check_directory): Add support for the callback
2691 to return the error code EXT2_ET_CALLBACK_NOTHANDLED.
2693 Thu Sep 4 12:28:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2695 * bitmaps.c (ext2fs_set_bitmap_padding): New function which sets the
2696 padding of the bitmap to be all one's.
2698 Wed Sep 3 14:27:30 1997 Theodore Y. Ts'o <tytso@edt.mit.edu>
2700 * llseek.c: Added missing semicolon to glibc fixup declaration of
2703 * bmove.c: Add #include of errno.h
2705 Sat Aug 23 22:47:46 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2707 * Makefile.in (ELF_SO_VERSION): Bump version to be 2.4 since we've
2708 added a new field to the io_channel (app_data).
2710 * io.h: Add a new element to the io_channel structure, app_data.
2712 * initialize.c, openfs.c: Set io->app_data to point at the
2715 Thu Aug 14 08:14:17 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2717 * io.h: Change the prototype of ext2fs_llseek() to use int's
2718 instead of unsigned int's.
2720 * llseek.c: Change to allow PIC and !HAVE_LLSEEK. Add a prototype
2721 to make life easer for GNU Libc 2.
2723 * rw_bitmaps.c: On the PowerPC, the big-endian variant of the ext2
2724 filesystem has its bitmaps stored as 32-bit words with bit
2725 0 as the LSB of each word. Thus a bitmap with only bit 0
2726 set would be, as a string of bytes, 00 00 00 01 00 ... To
2727 cope with this, we byte-reverse each word of a bitmap if
2728 we have a big-endian filesystem, that is, if we are *not*
2729 byte-swapping other word-sized numbers.
2731 Mon Aug 11 03:30:48 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2733 * dosio.c: New file to do DOS/BIOS disk accesses.
2735 * namei.c (open_namei): Make pathlen be of type size_t.
2737 * llseek.c: Always #include stdlib.h since it's need to define
2740 * io.h: Use errcode_t for magic numbers.
2742 * icount.c (get_icount_el): Use size_t where appropriate
2744 * dupfs.c (ext2fs_dup_handle):
2745 * dblist.c (dir_block_cmp): Use size_t where appropriate.
2747 * read_bb.c (ext2fs_read_bb_inode):
2748 * cmp_bitmaps.c (ext2fs_compare_inode_bitmap): Use blk_t, ino_t
2749 and size_t where appropriate.
2751 * closefs.c (ext2fs_flush): Use dgrp_t instead of int where
2754 * openfs.c (ext2fs_open):
2755 * check_desc.c (ext2fs_check_desc): Use blk_t instead of int where
2758 * rw_bitmaps.c (read_bitmaps):
2760 * inode.c (ext2fs_write_inode):
2761 * initialize.c (ext2fs_initialize):
2762 * brel_ma.c: Fix to make be 16-bit safe.
2764 * link.c (ext2fs_link):
2765 * unlink.c (ext2fs_unlink):
2766 * lookup.c (lookup_proc):
2767 * ismounted.c (ext2fs_check_if_mounted):
2768 * block.c (xlate_func): Add #pragma argsused for Turbo C.
2770 Sun Aug 10 10:05:22 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2772 * block.c (ext2fs_block_iterate2): Use retval which is a errcode_t
2775 * bitmaps.c (make_bitmap): Use size_t instead of int where
2778 * bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
2780 * alloc.c (ext2fs_new_inode): Use ino_t instead of int for the
2783 * get_pathname.c: Use ino_t instead of int where appropriate.
2785 * ext2fs.h: Make the magic structure element be errcode_t instead
2788 * alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
2789 bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
2790 cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c
2791 dirblock.c dupfs.c expanddir.c freefs.c get_pathname.c
2792 icount.c initialize.c inline.c inode.c irel_ma.c link.c
2793 llseek.c lookup.c mkdir.c namei.c newdir.c read_bb.c
2794 read_bb_file.c rs_bitmap.c rw_bitmaps.c swapfs.c
2795 test_io.c tst_badblocks.c tst_iscan.c unix_io.c unlink.c
2796 valid_blk.c version.c: Add an #ifdef for HAVE_UNISTD_H
2798 Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2800 * unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno
2801 is zero, then return EXT2_IO_LLSEEK_FAILED.
2803 * ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
2805 * Release of E2fsprogs 1.11
2807 Mon Jun 16 23:53:06 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2809 * dblist.c (ext2fs_dblist_count): Added new function which returns
2810 the number of directory blocks in dblist.
2812 Sat Jun 14 01:39:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2814 * unix_io.c (unix_flush): Make the io_channel flush function do a
2815 fsync to flush the kernel buffers to disk.
2817 Wed Jun 11 18:25:31 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2819 * inode.c (ext2fs_inode_scan_goto_blockgroup): Fix bug; the
2820 current inode number wasn't being set by the
2821 goto_blockgroup function.
2823 Mon Jun 9 10:45:48 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2825 * bmove.c (ext2fs_move_blocks): New function which takes a bitmap
2826 of blocks which need to be moved, and moves those blocks
2827 to another location in the filesystem.
2829 * rs_bitmap.c (ext2fs_resize_generic_bitmap): When expanding a
2830 bitmap, make sure all of the new parts of the bitmap are
2833 Sun Jun 8 16:24:39 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2835 * bitmaps.c (ext2fs_copy_bitmap): Fix bug; the destination bitmap
2836 wasn't being returned to the caller.
2838 * alloc_tables.c (ext2fs_allocate_group_table): Add new function
2839 ext2fs_allocate_group_table() which sets the group tables
2840 for a particular block group. The relevant code was
2841 factored out of ext2fs_allocate_tables().
2843 * dblist.c (make_dblist): Adjust the initial size of the directory
2844 block list to be a bit more realistic (ten plus twice the
2845 number of directories in the filesystem).
2847 Thu May 8 22:19:09 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2849 * badblocks.c (ext2fs_badblocks_list_test): Fix bug where
2850 ext2fs_badblocks_list_test would test the list (and exceed
2851 array boundaries) if there were no bad blocks on the bad
2852 blocks list. (Showed up when user tried: mke2fs -c -b 4096).
2854 Thu Apr 24 12:16:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
2856 * Release of E2fsprogs version 1.10
2858 Thu Apr 24 10:13:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
2860 * alloc_tables.c (ext2fs_allocate_tables): Correctly place the
2861 inode and block bitmaps based on the RAID 0 stride
2862 parameter (which is passed by mke2fs).
2864 * ext2fs.h: Add "stride" parameter to ext2_filsys, to be used by
2865 mke2fs to communicate the stride length to
2866 ext2fs_allocate_tables()
2868 Wed Apr 23 21:50:42 1997 Theodre Ts'o <tytso@localhost.mit.edu>
2870 * initialize.c (ext2fs_initialize): Fix to compile under Linux 1.2
2871 systems. (We can't assume that the new filesystem types
2874 Wed Apr 23 18:40:53 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2876 * alloc_tables.c (ext2fs_allocate_tables): Make sure that we
2877 allocate the inode and block bitmaps inside block group at
2880 Mon Apr 21 00:06:28 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2882 * alloc.c (ext2fs_new_block): Fix bug where if goal==0 and the
2883 filesystem has no free blocks, ext2fs_new_block would loop
2886 * dupfs.c (ext2fs_dup_handle): Duplicate an ext2 filesystem handle
2888 * freefs.c (ext2fs_free_inode_cache): Decrement refcount and only
2889 free if refcount goes to zero.
2891 * inode.c (create_icache): Initialize refcount to 1.
2893 * ext2fsP.h: Added refcount to ext2_inode_cache
2895 * dblist.c (ext2fs_copy_dblist): New function to copy a directory
2898 * badblocks.c (ext2fs_badblocks_copy): New function to copy a
2899 badblocks structure.
2901 Sun Apr 20 23:19:51 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2903 * bitmaps.c (ext2fs_copy_bitmap): New function to copy a bitmap.
2905 * unix_io.c, test_io.c (unix_open, test_open): Initialize the
2907 (unix_close, test_close): Decrement the refcount and only
2908 close the io_channel if the refcount goes to 0.
2910 * io.h: Add refcount to the io_channel structure. Add new macro
2911 interface io_channel_bumpcount() to bump the refcount.
2913 Thu Apr 17 20:25:03 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2915 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Use the inode
2916 cache in the filesystem handle, instead of the inode cache
2917 in a static variable.
2919 * freefs.c: Added static function to free the inode cache (called by
2922 * ext2fsP.h: Added definition of the ext2_inode_cache structures.
2924 * ext2fs.h: Added pointer to the inode_cache structure.
2926 * block.c (block_iterate_ind, block_iterate_dind,
2927 block_iterate_tind): If there are holes in the indirect,
2928 doubly indirect, or triply indirect blocks, increment the
2929 block count field automatically.
2931 Thu Apr 17 12:23:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2933 * Release of E2fsprogs version 1.09
2935 Mon Apr 14 20:38:56 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2937 * version.c (ext2fs_parse_version_string): Check the passed in
2938 version string (instead of the hard-coded one).
2940 * alloc_tables.c (ext2fs_allocate_tables): If the last block is
2941 greater filesystem size, clamp it to prevent allocating a
2942 block or inode bitmap beyond the filesystem.
2944 * initialize.c (ext2fs_initialize): Fix bug where the metatdata
2945 overhead calculation was accidentally removed.
2947 Fri Apr 11 18:56:26 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2949 * Release of E2fsprogs version 1.08
2951 Thu Apr 10 13:15:15 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2953 * dblist.c (ext2fs_set_dir_block): New function which sets the
2954 block of a dblist entry, given the directory inode and
2957 Sat Apr 5 12:42:42 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2959 * alloc_tables.c (ext2fs_allocate_tables): Allocate the bitmap and
2960 inode bitmaps at staggered locations across the block
2961 groups, to avoid concentrating the bitmaps on a small
2962 number of disks when using striped RAID arrays.
2964 * initialize.c (ext2fs_initialize): By default, choose the maximum
2965 possible number of blocks per group (based on the size of
2966 the bitmaps in the blocksize).
2968 Fri Apr 4 11:28:16 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2970 * initialize.c (ext2fs_initialize): Add support for
2971 EXT2_COMPAT_SPARSE_SUPER feature.
2973 * closefs.c (ext2fs_bg_has_super): New function to determine
2974 whether or a particular block group should have a
2975 superblock and block group descriptor. Used for the
2976 EXT2_COMPAT_SPARSE_SUPER feature is turned on.
2977 (ext2fs_flush): Check ext2fs_bg_has_super to see whether
2978 or not the superblock should be written out for the block
2981 * ext2fs.h (EXT2_COMPAT_SPARSE_SUPER): Define compatibility flag
2982 for sparse duplicate superblocks.
2984 * version.c (ext2fs_get_library_version): New function which
2985 returns the library version.
2987 * version.c (ext2fs_parse_version_string): New function which
2988 parses a version string and returns a version number,
2989 so application programs can compare version numbers as
2992 Wed Mar 26 00:43:52 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
2994 * icount.c (ext2fs_create_icount): Change function so that it also
2995 takes a new argument which contains a "hint" icount
2996 structure. This "hint" icount allows the create function
2997 to set up the sorted list in advance. This reduces
2998 significantly the amount of data moving needed to insert
2999 these inodes into the list later.
3001 * icount.c (ext2fs_icount_validate): New function which validates
3002 that the icount structure's rep invariant.
3004 * icount.c (get_icount_el): Completely revamped implementation
3005 to subsume put_icount_el(). Put_icount_el() used to
3006 use an O(N) implementation to insert in the middle
3007 of the icount list. It now uses a O(ln N) to search
3008 for where the icount should be inserted, and then uses
3009 a memcpy to move the list down (instead of a for loop).
3011 * icount.c (ext2fs_icount_fetch, ext2fs_icount_store,
3012 ext2fs_icount_increment, ext2fs_icount_decrement): Check
3013 to see if the inode is within bounds; if it isn't, return
3016 * bitops.h (ext2fs_test_generic_bitmap): Fix error message given
3017 when a bad inode number is passed to test_generic_bitmap
3018 to be EXT2FS_TEST_ERROR instead of the wrong
3019 EXT2FS_UNMARK_ERROR.
3021 Wed Mar 12 13:32:05 1997 Theodore Y. Ts'o <tytso@mit.edu>
3023 * Release of E2fsprogs version 1.07
3025 Sun Mar 2 16:46:18 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3027 * Makefile.in (ELF_VERSION): Change version to be 2.2
3029 Tue Feb 11 14:54:02 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3031 * alloc.c (ext2fs_get_free_blocks): Change routine to use
3032 ext2fs_fast_test_block_bitmap_range().
3034 * bitops.h (ext2fs_fast_test_block_bitmap_range,
3035 ext2fs_test_block_bitmap_range: New inline functions which
3036 test to see whether a contiguous range of blocks is
3039 Thu Feb 6 10:00:13 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3041 * badblocks.c (ext2fs_badblocks_list_create): Rename sybmols to use
3042 use ext2fs_badblocks_* instead of badblocks_*
3044 * bb_compat.c: New file which translates between old badblocks_*()
3045 names to ext2fs_badblocks_*()
3047 * unlink.c (ext2fs_unlink): New file, moved ext2fs_unlink() from
3048 link.c (since e2fsck doesn't use ext2fs_unlink()).
3050 * rs_bitmap.c (ext2fs_resize_generic_bitmap): New file, contains
3051 bitmap resizing routine moved from bitmaps.c, since e2fsck
3052 doesn't need to use this function.
3054 * lookup.c (ext2fs_lookup): Moved ext2fs_lookup to its own file,
3055 since e2fsck only needs ext2fs_lookup.
3057 Mon Feb 3 10:11:40 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3059 * inode.c (ext2fs_open_inode_scan): Set fs->badblocks if it is not
3060 already set; this is needed so that programs like dump
3061 which use the inode scan functions will deal with
3062 filesystems that have bad blocks in the inode table.
3064 Sun Feb 2 00:17:36 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3066 * ext2fs.h (struct_badblocks_list, struct_badblocks_iterate):
3067 Moved to ext2fsP.h, since it doesn't need to be part of
3068 the public interface.
3070 * dir_iterate.c: Move ext2_dir_iterate out of namei.c.
3072 Sat Feb 1 10:14:55 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3074 * dblist.c (ext2fs_get_num_dirs): New file, which implements a
3075 directory block list abstraction. (Code moved from
3078 * ext2fs.h, inode.c: Moved definition of ext2_struct_inode_scan to
3079 to inode.c (since no one else should be peeking inside it!)
3081 * valid_blk.c (ext2_inode_has_valid_blocks): New function.
3083 * openfs.c (ext2fs_open): Check the feature set in the ext2
3084 superblock, and refuse to open filesystems if they contain
3085 incompatible features. (Can be overriden with the
3088 Sun Jan 12 11:31:46 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3090 * block.c (ext2fs_block_iterate2): Added new function
3091 ext2fs_block_iterate2 which changes the function
3092 signature of the callback function to include the
3093 referencing block and offset.
3095 * inode.c (ext2fs_inode_scan_goto_blockgroup): Added new function
3096 ext2fs_inode_scan_goto_blockgroup which allows an
3097 application to jump to a particular block group while
3098 doing an inode scan.
3100 Wed Jan 1 23:50:12 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
3102 * dirblock.c: Include string.h, since we use memcpy().
3104 Tue Dec 3 12:27:29 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3106 * getsize.c (ext2fs_get_device_size): The ioctl BLKGETSIZE returns
3107 a long not an int; this doesn't matter on i386 machines,
3108 but it does on Alpha's.
3110 Fri Nov 29 20:57:37 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3112 * inode.c (ext2fs_write_inode, ext2fs_read_inode): If the inode
3113 table pointer is NULL, then return an error indicating
3114 that the inode table is missing.
3115 (get_next_blockgroup, get_next_blocks,
3116 ext2fs_get_next_inode): Don't treat a missing inode table
3117 as permanent error. Return MISSING_INODE_TABLE, but as an
3118 advisory error code, much like BAD_BLOCK_IN_INODE_TABLE.
3120 * rw_bitmaps.c (ext2fs_write_block_bitmap,
3121 ext2fs_write_inode_bitmap): If the inode or block bitmap
3122 block is zero, then don't write out the inode or block
3123 bitmap. The idea here is to avoid stomping on the
3125 (read_bitmaps): If the inode or block bitmap block is
3126 zero, then fill in that portion of the inode or block
3127 bitmap with all zeros.
3129 * inode.c (ext2fs_get_next_inode): Fix bug in handling of bad
3130 blocks in inode table when the inode table size is
3131 non-standard (and can therefore span blocks).
3133 Tue Oct 29 20:13:14 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3135 * alloc.c (ext2fs_new_block): Fix fencepost error in
3136 ext2fs_new_block; make sure we don't try to allocate the
3137 first block beyond the end of the filesystem.
3139 Mon Oct 14 11:00:48 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3141 * inode.c (check_for_inode_bad_blocks): New function called by
3142 get_next_blocks() to avoid reading in bad blocks marked in
3143 fs->badblocks. Inodes located in bad blocks are returned
3144 by ext2fs_get_next_inode() returns the error code
3145 EXT2_ET_BAD_BLOCK_IN_INODE_TABLE.
3147 * alloc_tables.c (ext2fs_allocate_tables): New function which
3148 performs the part of mke2fs's job of allocating the
3151 * test_io.c (test_close): IO manager which is used for testing
3154 Sun Oct 13 04:31:57 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3156 * inode.c (ext2fs_get_next_inode): Separate out the function of
3157 setting up for a new block group to get_next_blockgroup().
3158 Separate out the function of reading in blocks of the
3159 inode table to get_next_blocks().
3161 * ext2fs.h: Add the badblocks list to the ext2_filsys entry
3163 * badblocks.c (badblocks_list_add, badblocks_list_test): Add
3164 blocks to the badblock list in sorted order. This allows
3165 badblocks_list_test to be coded using a binary search for
3168 Tue Oct 8 02:02:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3170 * Release of E2fsprogs version 1.06
3172 Mon Oct 7 00:44:17 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3174 * ext2fs.h, block.c, closefs.c, dirblock.c, inode.c, native.c,
3175 open.c: Change EXT2_SWAP to EXT2_FLAG_SWAP for
3178 * closefs.c (ext2fs_flush): If the flag EXT2_MASTER_SB_ONLY is
3179 set, then only write out the master superblock.
3181 Sun Oct 6 21:45:26 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3183 * block.c (ext2fs_block_iterate): Fixed bug which caused
3184 block_iterate to fail to handle HURD created filesystems;
3185 it tested the inode translator field before the inode was
3188 Tue Sep 17 14:08:24 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3190 * initialize.c (ext2fs_initialize): Make sure the description for
3191 the inode bitmap is set correctly.
3193 * bitmaps.c (ext2fs_allocate_generic_bitmap): Fix minor type typo.
3195 Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3197 * Release of E2fsprogs version 1.05
3199 Sat Sep 7 07:36:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3201 * initialize.c: Override the kernel's idea of default
3202 checkinterval from 0 (never) to 180 days.
3204 Wed Aug 28 03:20:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3206 * namei.c (ext2fs_namei_follow): New function which follows
3207 symbolic link (if any) at the target.
3209 Tue Aug 27 01:48:43 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3211 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Add support
3212 for shortcut function fs->read_inode() and fs->write_inode().
3213 Added inode_cache to reduce CPU time spent in doing
3216 * swapfs.c (ext2fs_swap_super): Swap the new fields in a V2
3219 * namei.c (ext2fs_follow_link): New function.
3220 (ext2fs_namei): Extended to have support for chasing
3221 symbolic links. ext2fs_namei() still returns an inode
3222 which is a symbolic link. Symbolic links are only chased
3223 while resolving the containing directory. To chase
3224 symbolic links of the final result, use
3225 ext2fs_follow_link().
3227 Mon Aug 26 23:46:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3229 * ext2_err.et.in: Added new error code EXT2_ET_SYMLINK_LOOP.
3231 * bitops.h (ext2fs_set_bit, ext2fs_celar_bit): Use asm inlines
3232 provided by Pete A. Zaitcev (zaitcev@lab.sun.mcst.ru).
3234 Thu Aug 22 00:40:18 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3236 * initialize.c (ext2fs_initialize): On systems where the byte
3237 order is not i386 compatible, set the swap_byte flag.
3239 * inode.c (inocpy_with_swap): Check to see if inode contains a
3240 fast symlink before swapping the inode block fields. This
3241 required adding a new argument to inocpy_with_swap to
3242 determine whether the mode field is in host order or not.
3244 Wed Aug 21 00:45:42 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3246 * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit): On
3247 the sparc, if EXT2_STD_BITOPS set, use the standard
3248 i386-compatible bitmask operations, instead on the
3249 non-standard native bitmask operators.
3251 Fri Aug 9 11:11:35 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3253 * block.c (ext2fs_block_iterate): Cause block iterator to return
3254 the HURD translator block (along with everything else).
3255 If the flag BLOCK_FLAG_DATA_ONLY is passed to the block
3256 iterator, then don't return any meta data blocks
3257 (including the HURD translator).
3259 Wed Jul 17 17:13:34 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3261 * gen_uuid.c: New file, which generates DCE-compatible UUIDs.
3263 * uuid.c: New file, containing UUID utility functions.
3265 Tue Jul 16 10:19:16 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3267 * ext2fs.h: Add a definition of the "real" ext2 superblock.
3269 Fri May 24 14:54:55 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3271 * ext2fs.h: Fix erroneous ino_t type used in block_bitmap type.
3273 Sun May 19 15:39:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3275 * openfs.c (ext2fs_open): If the blocksize in the superblock is
3276 zero, return the error EXT2_ET_CORRUPT_SUPERBLOCK, since
3277 that's a basic value that must be correct for the rest of
3278 the library to work.
3280 * ext2_err.et.in (EXT2_ET_CORRUPT_SUPERBLOCK): Added new error
3283 Thu May 16 11:12:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
3285 * Release of E2fsprogs version 1.04
3287 Wed Mar 27 00:33:40 1996 <tytso@rsts-11.mit.edu>
3289 * Release of E2fsprogs version 1.03
3291 Tue Mar 26 12:06:32 1996 <tytso@rsts-11.mit.edu>
3293 * bitops.h (ext2fs_set_bit, ext2fs_clear_bit, ext2fs_test_bit):
3294 Change the m68k bit numbering for bitmasks to match with
3295 the bit numbering used by all other ext2 implementations.
3297 Thu Mar 7 03:37:00 1996 <tytso@rsts-11.mit.edu>
3299 * inode.c (ext2fs_get_next_inode, ext2fs_close_inode_scan,
3300 ext2fs_open_inode_scan): Support dynamically-sized inodes.
3302 Wed Mar 6 12:26:29 1996 <tytso@rsts-11.mit.edu>
3304 * inode.c (ext2fs_read_inode, ext2fs_write_inode): Support
3305 dynamically-sized inodes.
3307 * openfs.c (ext2fs_open): Allow dynamic revision filesystem to be
3310 Tue Mar 5 03:49:37 1996 <tytso@rsts-11.mit.edu>
3312 * initialize.c (ext2fs_initialize): Catch an error condition where
3313 the passed in size is *really* too small.
3315 * alloc.c (ext2fs_new_inode):
3316 * ext2fs.h (EXT2_FIRST_INODE): Add support for dynamic revision to
3319 Wed Feb 21 15:56:17 1996 <tytso@rsts-11.mit.edu>
3321 * getsize.c (ext2fs_get_device_size): Open the device read-only
3322 when trying to determine its size.
3324 Wed Jan 31 11:06:08 1996 <tytso@rsts-11.mit.edu>
3326 * Release of E2fsprogs version 1.02
3328 Sat Dec 9 09:57:50 1995 <tytso@rsts-11.mit.edu>
3330 * rw_bitops.c (ext2fs_write_block_bitmap):
3331 * bitops.c (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
3332 * bitops.h (ext2fs_test_bit, ext2fs_clear_bit, ext2fs_set_bit):
3333 Rename {test,set,clear}_bit to ext2fs_{test,set,clear}_bit,
3334 to avoid conflicts with with kernel include files. Also
3335 rename ADDR and CONST_ADDR to EXT2FS_ADDR and
3338 Thu Oct 26 12:09:16 1995 <tytso@rsts-11.mit.edu>
3340 * ext2_err.et: Updated message in EXT2_ET_BASE to say version 0.5c
3342 * swapfs.c (ext2fs_swap_super): Put an #ifdef check around
3343 s_def_resuid and s_def_resgid for backwards compatibility.
3345 Fri Oct 20 23:33:31 1995 <tytso@rsts-11.mit.edu>
3347 * bitops.h: Added #ifdef's for Sparc.
3349 Wed Sep 6 22:14:46 1995 <tytso@rsts-11.mit.edu>
3351 * getsize.c: #include <sys/ioctl.h> under Linux to pick up ioctl()
3354 * closefs.c: #include <string.h> to pick up memset() declaration
3356 Mon Sep 4 21:45:29 1995 Remy Card <card@bbj>
3358 * Makefile.in: Added support for BSD shared libraries.
3360 * initialize.c (ext2fs_initialize): Correctly set the s_creator_os
3363 Mon Sep 4 09:55:30 1995 <tytso@rsts-11.mit.edu>
3365 * unix_io.c (unix_open): Add a double check; if the passed in name
3366 is NULL, return EXT2_ET_BAD_DEVICE_NAME.
3368 * ext2_err.et (EXT2_ET_BAD_DEVICE_NAME): Added new error code
3370 Wed Aug 16 15:44:10 1995 <tytso@rsts-11.mit.edu>
3372 * inode.c (ext2fs_check_directory): Use LINUX_S_ISDIR instead of
3375 Tue Aug 15 13:08:36 1995 <tytso@rsts-11.mit.edu>
3377 * getsize.c (ext2fs_get_device_size): Add support for reading the
3378 partition size from a BSD disk label.
3380 Thu Aug 10 09:33:26 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3382 * getsize.c (ext2fs_get_device_size): New function that determins
3383 the size of a device. Used by mke2fs and e2fsck.
3385 Sat Aug 12 03:09:54 1995 Remy Card <card@bbj>
3387 * Makefile.in (install): Install static libraries in $(ulibdir)
3388 (/usr/lib on Linux) instead of $(libdir) (/lib on Linux).
3390 Wed Aug 9 17:04:23 1995 Theodore Y. Ts'o <tytso@dcl>
3392 * bitmaps.c (ext2fs_free_inode_bitmap, ext2fs_free_block_bitmap):
3393 Move these functions to freefs.c.
3395 * closefs.c (ext2fs_flush): If swapping blocks, clear the group
3396 descriptors shadow memory to keep purify quiet. (This
3397 also has the nice benefit that the unused portion of the
3398 shadow descriptors are zeroed out.)
3400 * dirblock.c (ext2fs_write_dir_block): We need to use
3401 dirent->rec_len *before* it's byteswapped to find the
3402 location of the next directory structure!
3404 * alloc.c (ext2fs_new_inode): Fix bug which could potentially
3405 cause ext2fs_new_inode to loop infinitely if we're trying
3406 to allocate an inode in group #0 and there are no free
3407 inodes at all in the system.
3409 * closefs.c: #include <errno.h> if it exists.
3411 Sun Aug 6 13:27:50 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3413 * ext2fs.h (BLOCK_FLAG_HOLE): Added new definition for
3414 BLOCK_FLAG_APPEND. Added documentation for the block
3417 Sat Aug 5 11:44:05 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3419 * Makefile.in (DLL_INSTALL_DIR, ELF_INSTALL_DIR): Set the
3420 installation directories correctly.
3422 Tue Jul 18 09:27:38 1995 <tytso@rsx-11.mit.edu>
3424 * namei.c (process_dir_block):
3425 * mkdir.c (ext2fs_mkdir):
3426 * expanddir.c (expand_dir_proc): Use ext2fs_{read,write}_dir_block
3427 to read/write the directory block.
3429 * dirblock.c (ext2fs_read_dir_block), ext2fs_write_dir_block): New
3430 file containing functions for reading and writing
3431 directory blocks (byte swapping if necesssary)
3433 * block.c (block_iterate_ind, block_iterate_dind,
3434 block_iterate_tind): Byte swap the block addresses if
3435 EXT2_SWAP_BYTES is set (and swap them back before writing
3438 * inode.c (inocpy_with_swap): New function.
3439 (ext2fs_get_next_inode, ext2fs_read_inode, ext2fs_write_inode):
3440 Call inocpy_with_swap if EXT2_SWAP_BYTES if set.
3442 * closefs.c (ext2fs_flush): If EXT2_SWAP_BYTES is set, then swap
3443 the superblock and group descriptors before writing it out.
3445 * openfs.c (ext2fs_open): If the magic number is byte-swapped,
3446 then set the EXT2_SWAP_BYTES and byte-swap the superblock
3447 and group descriptors.
3449 * swapfs.c (ext2fs_swap_super, ext2fs_swap_group_desc): New functions
3450 to desp ext2 filesystem structures.
3452 * bitops.c (set_bit, clear_bit, test_bit): Use modifications
3453 supplied by Pete A. Zaitcev so that the C language
3454 versions of these functions are more portable. They will
3455 now work on both little and big endian systems, and the
3456 assumption that 32-bit integers are used is gone.
3458 * bitops.h (ext2_swab16, ext2_swab32): Added new functions for
3459 doing byte swapping.
3461 * ext2fs.h (EXT2_SWAP_BYTES): Add new flag which indicates that
3462 byte swapping should take place.
3464 Sun Jul 16 06:21:43 1995 <tytso@rsx-11.mit.edu>
3466 * Makefile.in, cmp_bitmaps.c (ext2fs_compare_block_bitmap_end,
3467 ext2fs_compare_inode_bitmap_end): Added new file
3468 containing routines to compare bitmaps.
3470 * ext2_err.et (EXT2_ET_NEQ_BLOCK_BITMAP, EXT2_ET_NEQ_INODE_BITMAP):
3471 Added new error codes.
3473 Sat Jul 15 04:23:37 1995 <tytso@rsx-11.mit.edu>
3475 * inode.c (ext2fs_get_next_inode): Don't check scan->inode_buffer;
3476 if the magic number is correct, it will be allocated.
3478 Fri Jul 14 19:02:59 1995 <tytso@rsx-11.mit.edu>
3480 * block.c (block_iterate_ind, block_iterate_dind,
3481 block_iterate_tind): Don't recompute block_nr each loop;
3482 just increment it! Factor check of BLOCK_FLAG_APPEND out
3483 of the loop. Factor mask of BLOCK_CHANGED into changed
3484 variable out of the loop. (block_iterate_ind, in
3485 particular, gets called a lot, so every little
3486 optimization helps.)
3488 Thu Jul 13 08:02:45 1995 <tytso@rsx-11.mit.edu>
3490 * block.c (block_iterate_ind, block_iterate_dind,
3491 block_iterate_tind): Precompute limit of loop to speed up
3492 block_iterate_ind and company.
3494 * bitops.h (ext2fs_fast_mark_block_bitmap,
3495 ext2fs_fast_unmark_block_bitmap, ext2fs_fast_test_block_bitmap,
3496 ext2fs_fast_mark_inode_bitmap, ext2fs_fast_unmark_inode_bitmap,
3497 ext2fs_fast_test_inode_bitmap): Add fast version of these
3498 functions, which don't do range checking.
3500 * bitops.h (ext2fs_get_block_bitmap_start,
3501 ext2fs_get_inode_bitmap_start, ext2fs_get_block_bitmap_end,
3502 ext2fs_get_inode_bitmap_end): Add new accessor functions
3503 which return the start and end points of the bitmaps.
3505 Tue Jul 11 18:59:41 1995 <tytso@rsx-11.mit.edu>
3507 * llseek.c (ext2_llseek): If the offset is small enough, use lseek
3508 instead of llseek. The errno if the offset is too large
3509 and lseek is not supported should be EINVAL, not -EINVAL.
3511 Thu Jun 15 23:43:02 1995 Remy Card <card@bbj>
3513 * Makefile.in: Added support for ELF shared libraries.
3514 Fixed typos in the compilation rules.
3515 (distclean): Added Makefile.
3517 * llseek.c (llseek): New function, if llseek() does not exist in the
3519 (ext2_llseek): Changed to call llseek().
3521 Mon Jun 12 08:29:07 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3523 * ext2fs.h: Use __u32 to define blk_t, instead of unsigned long.
3525 Sun Jun 11 15:02:54 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3527 * mkdir.c (ext2fs_mkdir): Use LINUX_S_IFDIR instead of S_IFDIR.
3529 * ext2fs.h (LINUX_S_IFDIR): Define a linux specific versions of
3530 the S_*, which are normally defined in <sys/stat.h>. This
3531 allows us to compile e2fsprogs on a non-Linux system,
3532 which may have a different value for S_IFDIR.
3534 Sat Jun 10 23:47:05 1995 Theodore Y. Ts'o <tytso@lurch.mit.edu>
3536 * bitops.c (clear_bit, set_bit): Remove calls to cli() and sti();
3537 this is a user-mode application!
3539 Thu Jun 8 13:13:22 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
3541 * llseek.c: Put the include of <linux/unistd.h> inside the #ifdef
3542 __linux__ so that non-linux systems won't see it.
3544 * alloc.c: Include <errno.h> if possible.
3545 * badblocks.c: Ditto.
3546 * bb_inode.c: Ditto.
3549 * expanddir.c: Ditto.
3550 * get_pathname.c: Ditto.
3551 * initialize.c: Ditto.
3558 * rw_bitmaps.c: Ditto.
3561 * Makefile.in: Rewritten to conform to GNU coding standards and
3562 support separate compilation directories.
3564 Thu May 11 04:13:12 1995 <tytso@rsx-11.mit.edu>
3566 * initialize.c (ext2fs_initialize): Don't allow more than one
3567 bitmaps's worth of inodes in a group.
3569 Sat Mar 11 14:07:11 1995 Theodore Y. Ts'o <tytso@localhost>
3571 * llseek.c (ext2_llseek): Added error checking to the llseek()
3572 compat code to protect against overflow. This only
3573 applies to 1.0 and early 1.1 kernels, which don't support
3574 the llseek() system call.
3576 Thu Nov 24 16:29:00 1994 Theodore Y. Ts'o (tytso@rt-11)
3578 * unix_io.c (unix_open): Initialize the read_error and write_error
3579 io_channel pointers to be null.
3581 * bb_inode.c (clear_bad_block_proc): If an illegal block number is
3582 found, clear it but don't try to update the filesystem
3583 accounting information, since that's hopeless anyway.
3585 * block.c (bloblock_iterate_ind, bloblock_iterate_dind,
3586 bloblock_iterate_tind): Check to see if the indirect blocks are
3587 valid before trying to read them.
3589 * ext2_err.et (EXT2_ET_BAD_IND_BLOCK, EX2_ET_BAD_DIND_BLOCK,
3590 EXT2_ET_BAD_TIND_BLOCK): Add new error codes.
3592 * bitops.h (ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
3593 ext2fs_test_block_bitmap, ext2fs_mark_inode_bitmap,
3594 ext2fs_unmark_inode_bitmap, ext2fs_test_inode_bitmap): If an
3595 illegal block or inode number is passed in, return instead
3596 of trying to test, set, or clear the bit.
3598 Mon Nov 7 21:32:33 1994 Remy Card <card@bbj>
3600 * Makefile: Added a dummy install target in case shared libraries
3603 Mon Oct 24 14:11:44 1994 (tytso@rsx-11)
3605 * bitmaps.c (ext2fs_allocate_block_bitmap): Fix calculation of how
3606 the real last block of the bitmap should be calculated.
3608 Wed Sep 7 10:05:36 1994 (tytso@rsx-11)
3610 * bitmaps.c (ext2fs_fudge_inode_bitmap_end,
3611 ext2fs_fudge_block_bitmap_end, ext2fs_clear_inode_bitmap,
3612 ext2fs_clear_block_bitmap, ext2fs_free_inode_bitmap,
3613 ext2fs_free_block_bitmap): Add magic number checking for
3614 the inode and block bitmaps.
3616 * bitmaps.c (ext2fs_allocate_block_bitmap): Fix to set the correct
3617 magic number for a block bitmap instead of an inode bitmap.
3619 * inode.c (ext2fs_close_inode_scan, ext2fs_get_next_inode): Add
3620 magic number checking for the inode_scan structure.
3622 * badblocks.c (badblocks_list_free, badblocks_list_add,
3623 badblocks_list_test, badblocks_list_iterate_begin,
3624 badblocks_list_iterate, badblocks_list_iterate_end): Add
3625 magic number checking for the badblocks_list and
3626 badblocks_iterate structures.
3628 * ext2_err.et (EXT2_ET_MAGIC_UNIX_IO_CHANNEL):
3629 * unix_io.c (unix_open, unix_close, unix_set_blksize, unix_read_blk,
3630 unix_write_blk, unix_flush): Add magic number checking
3631 both for io_channel structure and unix_private_data
3634 * openfs.c (ext2fs_open): Add check for io_manager structure's
3637 * rw_bitmaps.c (ext2fs_write_inode_bitmap, ext2fs_write_block_bitmap,
3638 ext2fs_read_inode_bitmap, ext2fs_read_block_bitmap,
3639 ext2fs_read_bitmaps, ext2fs_write_bitmaps):
3640 * read_bb.c (ext2fs_read_bb_inode):
3641 * read_bb_file.c (ext2fs_read_bb_FILE):
3642 * newdir.c (ext2fs_new_dir_block):
3643 * namei.c (ext2fs_dir_iterate, ext2fs_lookup, ext2fs_namei):
3644 * link.c (ext2fs_link, ext2fs_unlink):
3645 * inode.c (ext2fs_open_inode_scan, ext2fs_read_inode,
3646 ext2fs_write_inode, ext2fs_get_blocks,
3647 ext2fs_check_directory):
3648 * get_pathname.c (ext2fs_get_pathname):
3649 * expanddir.c (ext2fs_expand_dir):
3650 * block.c (ext2fs_block_iterate):
3651 * bitmaps.c (ext2fs_allocate_inode_bitmap,
3652 ext2fs_allocate_block_bitmap):
3653 * bb_inode.c (ext2fs_update_bb_inode):
3654 * alloc.c (ext2fs_new_inode,ext2fs_new_block,ext2fs_get_free_blocks):
3655 * check_desc.c (ext2fs_check_desc):
3656 * closefs.c (ext2fs_close, ext2fs_flush):
3657 * freefs.c (ext2fs_free): Add check for ext2_filsys magic number.
3662 * check_desc.c (ext2fs_check_desc): Move ext2fs_check_desc from
3663 openfs.c into its own file.
3665 * ext2fs.h (EXT2_CHECK_MAGIC): Added macro for checking for
3666 structure magic numbers.
3668 * closefs.c (ext2fs_flush): Folded in Remy Card's changes to clear
3669 the EXT2_VALID_FS flag in the backup superblock blocks, so that if
3670 someone uses the -b option to specify the use of the backup
3671 superblock --- this usually means that the main superblock is
3675 * ext2_err.et (EXT2_ET_REV_TOO_HIGH):
3676 * openfs.c (ext2fs_open): Folded in Remy Card's changes to add a
3677 revision level to the superblock.
3679 Sun Aug 21 00:50:08 1994 Theodore Y. Ts'o (tytso@rt-11)
3686 * initialize.c: Completely revamped the inode and block bitmap
3687 structures, so that they can be better chance of being extensible
3688 in a shared library. They are now their own type, instead of
3689 being a char *. Also, the function signatures of
3690 ext2fs_test_block_bitmap, ext2fs_mark_block_bitmap,
3691 ext2fs_unmark_block_bitmap, ext2fs_test_inode_bitmap,
3692 ext2fs_mark_inode_bitmap, and ext2fs_unmark_inode_bitmap were
3693 changed to eliminate the ext2_filsys argument, since it is no
3696 Wed Aug 17 21:46:44 1994 Remy Card (card@bbj)
3698 * unix_io.c (unix_read_blk and unix_write_blk): use the llseek
3699 system call if available.
3701 * llseek.c: new file. This is the stub calling the llseek system
3702 call which allows supports for 2GB+ file systems.
3704 * initialize.c (ext2fs_initialize): Ext2fs_initialize now stores
3705 the creator operating system.
3707 Wed Aug 17 10:03:24 1994 Theodore Y. Ts'o (tytso@rt-11)
3709 * initialize.c (ext2fs_initialize): Ext2fs_initialize now sets up
3710 the group descriptor statistics in addition to everything else.
3711 This relieves mke2fs of the responsibility of doing it.
3713 * bitops.c, bitops.h: Add assembly inline functions for the 68000.
3714 Added a new #define, _EXT2_HAVE_ASM_BITOPS_ to control whether or
3715 not the generic C function equivalents should be included or not.
3717 * openfs.c (ext2fs_open): If a superblock is specified, then use
3718 the backup group descriptors that go along with this superblock,
3719 instead of using the primary group descriptors. This allows
3720 e2fsck to recover filesystems where the primary group descriptors