Commit Graph

152 Commits (30ae14c9ded3c52e9fcf4869057cbc3b9927afb2)

Author SHA1 Message Date
Theodore Ts'o 30ae14c9de ChangeLog, Makefile.in:
Makefile.in: Limit some .o files from being included into the library
  	if --disable-debugfs, --disable-swapfs, --disable-imager, or
  	--disable-resizer are used.
2001-06-13 22:38:56 +00:00
Theodore Ts'o cbbf031b6e ChangeLog, dumpe2fs.c, mke2fs.c:
dumpe2fs.c: Use WORDS_BIGENDIAN to determine whether or not we're
  	(not) using i386 byte order.
  dumpe2fs.c, mke2fs.c: Stop using the compatibility badblocks function,
  	and use the ext2fs_badblocks_* functions instead.
ChangeLog, inode.c, tst_iscan.c:
  inode.c, tst_iscan.c: Stop using the compatibility badblocks function,
  	and use the ext2fs_badblocks_* functions instead.
ChangeLog, badblocks.c:
  badblocks.c: Stop using the compatibility badblocks function, and use
  	the ext2fs_badblocks_* functions instead.
2001-06-13 00:12:04 +00:00
Theodore Ts'o 3034f62a0f ChangeLog, Makefile.in, bitops.h, gen_bitmap.c:
Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
  	ext2fs_mark_generic_bitmap and ext2fs_unmark_generic_bitmap to
  	gen_bitmap.c as normal functions.  (This saves space and doesn't
  	significantly change the speed of e2fsck on a P-III.)
ChangeLog:
  Add missing log entry for unix.c.
2001-06-11 15:17:45 +00:00
Theodore Ts'o 5df55d7f84 ChangeLog, Makefile.in, swapfs.c, unix.c:
Makefile.in: Add message.c and swapfs.c to the list of source files to
  	build the make depend.
  swapfs.c, unix.c: Only support the -s and -S options to e2fsck if
  	ENABLE_SWAPFS is defined.
Many files:
  ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c, inode.c,
  	native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only include the
  	byte-swapping logic if ENABLE_SWAPFS is turned on or if we're on a
  	big-endian machine.
  initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to set
  	EXT2_FLAG_SWAP_BYTES, instead of using ext2fs_native_flag.
  native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
  	autoconf to determine whether or not return EXT2_FLAG_SWAP_BYTES.
2001-06-11 07:00:04 +00:00
Theodore Ts'o 349a484a57 ChangeLog, Makefile.in, mkjournal.c:
Makefile.in: Remove the dependence on the libe2p library.
  mkjournal.c (ext2fs_add_journal_inode): Replace use of fsetflags with
  	direct usage of the ioctl/fchflags so that we don't have to depend on
  	the libe2p library.
2001-06-11 00:49:29 +00:00
Theodore Ts'o 30e50b7cdd ChangeLog, icount.c:
icount.c (insert_icount_el): Fix the code used to estimate the size of
  	the new icount array to be more intelligent, to avoid reallocating the
  	array too many times.
ChangeLog, ext2_types.h.in:
  ext2_types.h.in: Use unsigned ints in favor of unsigned longs when
  	trying to find a 32-bit wide type.
2001-06-08 09:43:40 +00:00
Theodore Ts'o f36d14f5f0 ChangeLog, valid_blk.c:
valid_blk.c (ext2fs_inode_has_valid_blocks): Only check i_blocks for a
  	symlink to determine whether it is a fast symlink.
2001-06-02 04:13:16 +00:00
Theodore Ts'o 36a23e1806 ChangeLog:
Fix typo in ChangeLog.
2001-06-02 00:54:10 +00:00
Theodore Ts'o 797f5ef14e ChangeLog, wordwrap.pl:
Makefile.in: Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
  wordwrap.pl: Add some rules which help fix up the dependencies.
Many files:
  Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
2001-06-01 23:49:46 +00:00
Theodore Ts'o bb185861d1 e2fsprogs.lsm, version.h:
Update version string for 1.20 release
ChangeLog:
  Update Changelogs for 1.20 release.
2001-05-25 17:35:00 +00:00
Theodore Ts'o d5f858dd7f ChangeLog, ismounted.c:
ismounted.c: More cleanups for ismounted.c, some from Andreas, some to
  	clean up Andreas's patches.  Use strncpy instead of strcpy to save the
  	root's mountpoint.  Clean up #ifdef structure.  Remove uneeded
  	variable in testing/debug driver.
2001-05-25 17:14:23 +00:00
Theodore Ts'o cc86017b59 ChangeLog, ismounted.c:
ismounted.c: Add check for root device which doesn't depend on
  	/etc/fstab or /proc/mounts to be correct.  Don't call endmntent()
  	before we are done with mnt struct.
2001-05-25 16:32:53 +00:00
Theodore Ts'o 4ed8ebe268 ChangeLog, ext2_err.et.in:
ext2_err.et.in (EXT2_ET_JOURNAL_UNSUPP_VERSION): Added new error code.
2001-05-23 18:30:10 +00:00
Theodore Ts'o b10820cdcd ChangeLog, ext2_fs.h:
ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to make
  	room for pre-existing usage of EXT2_FEATURE_COMPAT_EXT_ATTR.  Add flag
  	EXT2_INDEX_FL with the same codepoint as EXT2_BTREE_FL.
2001-05-21 05:23:31 +00:00
Theodore Ts'o 7c2d25699f ChangeLog, ext2fs.h:
ext2fs.h: #include <> instead of "" for ext2fs and et header files,
  	since they will be installed in /usr/include
ChangeLog, e2p.h:
  e2p.h: #include <> instead of "" for ext2fs and et header files, since
  	they will be installed in /usr/include
2001-05-21 02:54:21 +00:00
Theodore Ts'o 9f8046fc6d Many files:
alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
  	bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
  	check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c, dblist_dir.c,
  	dir_iterate.c, dirblock.c, dupfs.c, expanddir.c, ext2_fs.h, fileio.c,
  	finddev.c, flushb.c, freefs.c, get_pathname.c, getsize.c, icount.c,
  	imager.c, initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
  	link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c, newdir.c,
  	nt_io.c, openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
  	rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c, tst_byteswap.c,
  	tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c, valid_blk.c,
  	version.c, write_bb_file.c, ext2_fs.h: Moved file from include/linux.
  	Adjust all files in this directroy to include this file.
2001-05-14 11:35:52 +00:00
Theodore Ts'o 7a34cb01a9 ChangeLog, mkjournal.c:
mkjournal.c (ext2fs_create_journal_superblock): Remove redundant code.
2001-05-14 04:28:35 +00:00
Theodore Ts'o 0f6794591e ChangeLog, fileio.c:
fileio.c (ext2fs_file_read): Factored out common code and cleaned up
  	function.  Fixed a bug where if there was an error reading from the
  	disk, the number of bytes read wasn't reliably set.  (Fixes Debian bug
  	#79163)
  	(ext2fs_file_write): Factored out common code and made function more
  	efficient; if writing a full block, don't bother to do a
  	read-modify-write cycle.
2001-05-05 16:42:24 +00:00
Theodore Ts'o 1cca4d6036 ChangeLog, dirblock.c:
dirblock.c (ext2fs_read_dir_block): Check for an directory record
  	length which isn't a multiple four, and treat that as an invalid.
  	Scan the directory and return an error (EXT2_ET_DIR_CORRUPTED) if the
  	directory records are orrupted.
  	(ext2fs_write_dir_block): If while byte-swapping the directory block,
  	if there's an error, abort and return EXT2_ET_DIR_CORRUPTED.
2001-05-05 05:12:14 +00:00
Theodore Ts'o a78926effb Many files:
ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add image_header
  	field in the ext2_filsys structure
  block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind):
  inode.c (ext2fs_read_inode):
  rw_bitmaps.c (read_bitmaps):
  openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
  imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make sure
  	the full bitmap is saved.
2001-05-03 04:02:29 +00:00
Theodore Ts'o f955cc1425 ChangeLog, dir_iterate.c:
dir_iterate.c (ext2fs_process_dir_block): Add a double-check to make
  	sure the rec_len is a multiple of 4, to prevent bus-errors on
  	architectures which care about mis-aligned pointer references.
2001-05-01 19:04:28 +00:00
Theodore Ts'o 954a683dd0 ChangeLog, getsize.c:
getsize.c (ext2fs_get_device_size): Use an unsigned long to query the
  	device sizes using the BLKGETSIZE ioctl.
2001-04-26 01:42:37 +00:00
Theodore Ts'o 52db0b4178 ChangeLog, Makefile.in, ismounted.c:
ismounted.c (check_mntent): Check /proc/mounts on Linux systems before
  	checking /etc/mtab.  The EXT2_MF_READONLY flag is now set from the
  	/etc/mtab options field for all filesystems, not just the root
  	filesystem.  Add debugging code to make it easier to test
  	ext2fs_check_if_mounted().
2001-04-17 02:22:05 +00:00
Theodore Ts'o 036039460f ChangeLog, ext2_err.et.in, mkjournal.c:
mkjournal.c (ext2fs_create_journal_superblock): Add safety check;
  	return an error if there's an attempt to create a journal less than
  	1024 filesystem blocks.
  ext2_err.et.in, mkjournal.c: Change EXT2_JOURNAL_NOT_BLOCK and
  	EXT2_NO_JOURNAL_SB to be EXT2_ET_*.
2001-04-17 00:53:25 +00:00
Theodore Ts'o 9ec53cf4f3 ChangeLog, Makefile.in, bitops.h, tst_byteswap.c:
bitops.h (ext2fs_swab16, ext2fs_swab32): Add i386 assembly inline
  	functions.
  tst_byteswap.c: New function to test the byteswap functions.  Add to
  	regression test suite.
2001-02-20 16:28:40 +00:00
Theodore Ts'o c5423c5b3e ChangeLog, e2image.c:
e2image.c (main): Add code to write the e2image header.
ChangeLog, e2image.h:
  e2image.h (struct ext2_image_hdr): Fix type for fs_hostname
2001-02-08 05:45:17 +00:00
Theodore Ts'o d23042af75 ChangeLog, mkjournal.c:
mkjournal.c (ext2fs_create_journal_superblock): Fix the setting of
  	s_first for external devices to always be 1, since jsb->s_first is
  	always relative to the start of the journal superblock.  Use htonl(1)
  	when setting s_nr_users.
2001-02-08 03:37:16 +00:00
Theodore Ts'o 020888625f ChangeLog, mkjournal.c:
mkjournal.c (ext2fs_add_journal_device): Fix bug where the device
  	number of the filesystem (instead of the journal) was being dropped
  	into s_journal_dev.
ChangeLog, dumpe2fs.c:
  dumpe2fs.c (print_journal_information): Use s_first_data_block to find
  	the correct block to read the journal superblock.
2001-01-18 01:44:19 +00:00
Theodore Ts'o a112847b39 ChangeLog, ext2_err.et.in, ext2fs.h, initialize.c, mkjournal.c, openfs.c:
initialize.c (ext2fs_initialize): Add support for initializing the
  	ext2 superblock for external journal devices.  This basically means we
  	don't bother to allocate any block group descriptors.
  openfs.c (ext2fs_open): Only open external journal devices if the new
  	flag EXT2_FLAG_JOURNAL_DEV_OK is passed to ext2fs_open.  When opening
  	such devices, don't try to read the block group descriptors, since
  	they're not there.
  ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code
  mkjournal.c: Export a new function,
  	ext2fs_create_journal_superblock(), which allocates and returns a
  	buffer containing a journal superblock.  This is needed by mke2fs to
  	create an external journal.  Rewrote ext2fs_add_journal_device() so
  	that it no longer creates the external journal, but rather adds a
  	filesystem to an existing external journal.  It handles all of the
  	UUID manipulation.
  ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported by the
  	library.  Define the EXT2_FLAG_JOURNAL_DEV_OK.  Changed function
  	prototype for ext2fs_add_journal_device().
2001-01-16 06:56:14 +00:00
Theodore Ts'o 8077994116 ChangeLog, closefs.c:
closefs.c (ext2fs_flush): Don't write out anything beyond the primary
  	superblock if EXT2_INCOMPAT_JOURNAL_DEV is listed.
2001-01-14 18:03:43 +00:00
Theodore Ts'o b94bd81ae2 ChangeLog, imager.c:
imager.c: Fix gcc -Wall complaints and a series of bugs where retval
  	wasn't set correctly.  (Thanks to Andreas Dilger for pointing this
  	out.)
2001-01-12 17:26:05 +00:00
Theodore Ts'o 4d0f3e17a5 ChangeLog, MCONFIG.in, configure, configure.in:
MCONFIG.in: Change --enable-gcc-wall handling so that it's no longer a
  	configure option, but something which is done when the developer uses
  	the command "make gcc-wall".
  configure.in: Remove test for ino_t, since we don't use it any more
  	(we always use our own ext2_ino_t).  Remove --enable-gcc-wall support.
  	Add test for sys/ioctl.h
.del-types.h.in~ca55114a:
  Remove definition of ino_t
ChangeLog, Makefile.in, ext2fs.h, flushb.c, jump.funcs:
  flushb.c (ext2fs_sync_device): New function which centralizes all of
  	the places which might try to use the BLKFLSBUF or FDFLUSH ioctls (and
  	usually failing to define them since the system header files don't
  	usually do this for us, and we're trying to avoid usage of kernel
  	include files now.)
2001-01-11 15:48:50 +00:00
Theodore Ts'o 31dbecd482 Many files:
alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c, bmove.c,
  	brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c, dir_iterate.c,
  	expanddir.c, ext2fs.h, ext2fsP.h, fileio.c, finddev.c, get_pathname.c,
  	icount.c, inode.c, irel.h, irel_ma.c, ismounted.c, link.c, lookup.c,
  	mkdir.c, mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
  	tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to ext2_ino_t,
  	to protect applications that attempt to compile
  	-D_FILE_OFFSET_BITS=64, since this inexplicably changes ino_t(!?).  So
  	we use ext2_ino_t to avoid an unexpected ABI change.
2001-01-11 04:54:39 +00:00
Theodore Ts'o e446d71838 ChangeLog, dirblock.c:
dirblock.c (ext2fs_read_dir_block): Fix a potential case where we may
  	overrun allocated memory in case of a corrupted filesystem (or an
  	e2fsck test case :-) when byte-swapping the directory block.
2001-01-05 22:27:06 +00:00
Theodore Ts'o cdaf1fa78f ChangeLog, mkjournal.c:
mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
  	complaints including a missing return 0 at the end of
  	ext2fs_add_journal_device.
ChangeLog, ext2fs.h:
  ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
2001-01-05 22:23:22 +00:00
Theodore Ts'o 4becab6824 ChangeLog, Makefile.in, mkjournal.c:
Makefile.in: Link in libe2p when creating libext2fs as a shared
  	library, since mkjournal.c now references fsetflags().
  mkjournal.c (ext2fs_add_journal_inode): Folded in Andreas Dilger's
  	changes (with fixups) to allow on-line creation of a journal file.
.del-types.h.in~ca55114a:
  Change what we use to protect the header file to be _ASM_TYPES_H
  instead of _LINUX_TYPES_H.  (Needed to make libc5 builds happy).
version.h:
  Update for WIP release.
2001-01-03 19:22:42 +00:00
Theodore Ts'o 43ec8734f2 ChangeLog, ext2fs.h, ismounted.c:
ismounted.c: add ext2fs_check_mount_point() function, which will
  	optionally return the mount point of a device if mounted
ChangeLog, closefs.c, ext2fs.h:
  ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
  	EXT2_FLAG_SUPER_ONLY, which the close routines to only update the
  	superblock, and not the group descriptors.
2001-01-03 14:56:46 +00:00
Theodore Ts'o 31a17b36d5 ChangeLog, ext2fs.h, mkjournal.c:
mkjournal.c: rename ext2fs_add_journal_fs() to the more descriptive
  	ext2fs_add_journal_inode()
2001-01-03 13:04:12 +00:00
Theodore Ts'o e5b38a5faf Many files:
ext2fs.h: Remove definition of ext2fs_sb.  Note: this may break source
  	(but not binary) compatibility of some users of the ext2 library.
  	They should just simply do a global search and replace of struct
  	ext2fs_sb with struct ext2_super_block, and use their own private copy
  	of ext2_fs.h if they aren't already.
  closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c: Replace
  	use of ext2fs_sb with ext2_super_block.
ChangeLog, main.c:
  main.c (main): Replace use of struct ext2fs_sb with struct ext2_super_block.
2001-01-01 16:17:12 +00:00
Theodore Ts'o 2fe1efe2e5 ChangeLog, ext2fs.h:
ext2fs.h: Cleaned up header file by removing definitions of feature
  	flags that might not have been defined in older ext2 header files.
  	Now that we're using our own include/linux/ext2fs.h header file, this
  	can never happen.
  jfs_dat.h: Removed old header file which is no longer needed.
ChangeLog:
  jfs_compat.h: Remove uneeded header file.
2000-12-31 13:39:17 +00:00
Theodore Ts'o a917d1ccf4 ChangeLog, closefs.c, ext2fs.h, jump.funcs, super.c:
Rename _ext2fs_update_fs_dynamic_rev to _ext2fs_update_dynamic_rev
2000-12-13 18:36:23 +00:00
Theodore Ts'o 3fe973b306 ChangeLog, closefs.c, ext2fs.h, jump.funcs:
closefs.c (ext2fs_update_fs_dynamic_rev): New function suggested by
  	Andreas Dilger to update the filesystem revision to EXT2_DYNAMIC_REV.
2000-12-13 17:55:49 +00:00
Theodore Ts'o 7dcfa6e217 ChangeLog, swapfs.c:
swapfs.c (ext2fs_swap_super): Add byte swapping for the journal fields.
2000-12-13 17:50:14 +00:00
Theodore Ts'o 4e246704ea ChangeLog, ext2fs.h, mkjournal.c:
ext2fs.h, mkjournal.c (ext2fs_add_journal_fs,
  	ext2fs_add_journal_device): Add a new argument to the APIs of these
  	function, which is a flags word.  This is used to allow the creation
  	of a V1 superblock for those folks who are using ext3 0.3b in
  	production.  Note, the user-land interface for getting at this flag
  	won't be documented, as the V1 superblock is deprecated.
2000-12-09 14:39:16 +00:00
Theodore Ts'o 586187372a ChangeLog, jfs_user.h, mkjournal.c:
mkjournal.c (init_journal_superblock): Sync Stephen's changes which
  	creates a V2 superblock instead of a V1 superblock.
ChangeLog, jfs.h, jfs_compat.h, list.h:
  jfs.h, jfs_compat.h, list.h: New files added to support ext3.
2000-12-09 05:47:45 +00:00
Theodore Ts'o f20d0d57f7 ChangeLog, test_io.c:
test_io.c (test_write_blk, test_write_byte): Fix typos pointed out by
  	Andreas Dilger.
2000-12-05 03:53:41 +00:00
Theodore Ts'o 72ed126483 ChangeLog, Makefile.in, e2image.h, ext2_err.et.in, ext2fs.h, imager.c:
imager.c (ext2fs_image_{inode,super,bitmap}_{read,write}, ext2_fs.h,
  	Makefile.in: New file that has routines that save ext2fs metadata to a
  	file.
  ext2_err.et.in (EXT2_ET_MAGIC_E2IMAGE): New error code assigned.
  e2image.h: New file which defines the file format for the ext2 image
  	file.  (Saved copy of ext2 metadata to a file as a saving throw
  	against worst-case damage.)
ChangeLog, Makefile.in, e2image.c:
  e2image.c, Makefile.in: New program which saves ext2 metadata to a
  	file for people who need a last-ditch saving throw.
2000-11-12 19:32:20 +00:00
Theodore Ts'o 6a7f455bb1 ChangeLog, inode.c:
inode.c (ext2fs_flush_icache): Add new function ext2fs_flush_icache()
  	which flushes the internal inode cache.  Applications which modify the
  	inode table blocks directly must call this function.
2000-11-12 19:07:06 +00:00
Theodore Ts'o 17ee8b17f9 ChangeLog, mkjournal.c:
mkjournal.c: Add #include of netinet/in.h, since Solaris requires it
  	for ntohl().
2000-10-26 20:45:58 +00:00
Theodore Ts'o c180ac8653 Many files:
ext2_io.h (io_channel_write_byte): Add new interface to allow callers
  	to write specific byte ranges.  This is an optional interface, which
  	not all IO channels may implement.
  unix_io.c (unix_write_byte): test_io.c (test_write_byte): Add
  	implementation of the write_byte function.
  closefs.c (write_primary_superblock, ext2fs_flush): Add a new function
  	which writes the primary superblock.  If the IO channel supports
  	writing raw bytes directly, only fields which were modified are
  	written to the disk.  This makes it safe(r) to use utilities like
  	tune2fs on a mounted filesystem.
  freefs.c (ext2fs_free): Free the original superblock if it is available.
  openfs.c (ext2fs_open): Store a copy of the original superblock when
  	opening it.
  ext2fs.h: Add a field to store the original superblock in the ext2
  	context structure.
2000-10-26 20:24:43 +00:00