Commit Graph

176 Commits (737f066a34cff63725e4defe61b3cbfa55f0004f)

Author SHA1 Message Date
Theodore Ts'o 343fa65e9f getsize.c (ext2fs_get_device_size): Add support for the
BLKGETSIZE64 ioctl.  (Ioctl defined by unofficial patches
	from Ben LaHaise, but it's likely this interface won't
	change.)
2001-07-27 22:15:06 -04:00
Theodore Ts'o f35e6440ef mkjournal.c (ext2fs_add_journal_device): Use the correct block
when writing the journal superblock, too.  (Oops! Needed
	to make 1k filesystems with external journal to work.)
2001-07-27 15:35:21 -04:00
Theodore Ts'o 36131b37d7 mkjournal.c (ext2fs_add_journal_device): Use the correct block
to find the journal superblock if the blocksize is 1024.
2001-07-26 23:44:39 -04:00
Theodore Ts'o adee8d75db Add support for use of an external journal (so long as the external
journal only has one filesystem).
2001-07-23 00:17:49 -04:00
Theodore Ts'o 241f7d2068 ext_attr.c (ext2fs_write_ext_attr): When writing the extended
attribute block, set the filesystem changed bit.
2001-07-20 14:17:19 -04:00
Theodore Ts'o 6ae296e734 Comment out ext2_find_first_bit_set and ext2fs_find_next_bit_set
since we're not using them.
2001-07-20 12:33:37 -04:00
Theodore Ts'o 3c6b8977d4 Speed up journal recovery in userspace by avoiding a pointless
unconditional ext2_flush() call.  Also made ext2_flush() more
efficient when the superblock is modified after the filesystem has
been flushed, and make it clear the superblock dirty flag
after doing the superblock/block group descriptor flush.
2001-07-10 14:27:58 -04:00
Theodore Ts'o f41e7e6961 bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx to
avoid register conflicts when compiling in PIC mode.
2001-07-07 22:14:23 -04:00
Theodore Ts'o ac493821ea Add new functions to bitops.h to find quickly search for set bits in
a bitmask.  (In both C and i386 assembler).
2001-07-04 14:04:58 -04:00
Theodore Ts'o 342d847db3 Add initial support for extended attribute blocks 2001-07-02 11:54:09 -04:00
Theodore Ts'o 67960139d7 Update changelogs for 1.22. 2001-06-23 00:16:37 -04:00
Theodore Ts'o b23520d050 mkjournal.c (ext2fs_add_journal_inode): Move close of file
descriptor so that adding a journal to a mounted
	filesystem doesn't die.  (Fixes a bug accidentally
	introduced in e2fsprogs 1.21.)
2001-06-22 21:52:14 -04:00
Theodore Ts'o 7833262585 mkjournal.c (ext2fs_add_journal_inode): Only use fchflags if
HAVE_CHFLAGS and UF_NODUMP are defined, since the Hurd has
	fchflags without defining UF_NODUMP.  (Addresses Debian
	bug #101361)
2001-06-22 21:20:47 -04:00
Theodore Ts'o d90f3494b2 e2fsck/flushb.c and lib/ext2fs/flushb.c: Use platform independent
method of defining the BLKFLSBUF and FDFLUSH ioctl's.
	Also include sys/mount.h since on newer glibc's BLKFLSBUF
	is defined there.
2001-06-22 21:01:17 -04:00
Theodore Ts'o 16645f802a bitops.h: The C language versions of ext2fs_swab16/32 need to be
included if EXT2FS_ENABLE_SWAPFS is defined, since we need to support
	byte swapping even if we don't support the conversion functions.
	(Fixes Debian bug #101686).
2001-06-22 20:54:11 -04:00
Theodore Ts'o 89a1fa831f dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2 since
the byte-swapping code all assumes the ext2_dir_entry structure.
	(It's a question of whether or not name_len should be byte-swapped or
	not, and whether it's a 16 bit or 8 bit field.)
2001-06-22 20:40:51 -04:00
Theodore Ts'o f4f75bae85 ChangeLog:
Update for 1.21 release.
2001-06-16 01:14:28 +00:00
Theodore Ts'o d1e66b7936 ChangeLog, Makefile.in:
Makefile.in: Fix bug in installation of ext2_types.h.  It is a file
  	which is generated and is therefore found in the build directory, not
  	source directory.
2001-06-15 22:44:32 +00:00
Theodore Ts'o 997b820e94 ChangeLog, ismounted.c:
ismounted.c (check_mntent_file): Use a test file in / to check to see
  	if the root filesystem is mounted read-only.  This protects against
  	the case where /etc might not be on /, as well as the case where
  	/etc/mtab doesn't exist.  (Both are should-never happen scenarios, but
  	you never know...)
2001-06-15 18:33:43 +00:00
Theodore Ts'o 6bd134809c ChangeLog, ismounted.c:
ismounted.c (ext2fs_check_if_mounted): Fix grammer in comment.  Remove
  	unneeded #pragma argsused, since the arguments are always used.
2001-06-14 07:00:55 +00:00
Theodore Ts'o 6579488028 ChangeLog, ext2_types.h.in:
ext2_types.h.in: If linux/types.h has been defined, then don't try to
  	redefine the typedefs.
ChangeLog, Makefile.in:
  Makefile.in: Make the install target depend on $(SUBS) to accomodate
  	the fools who want to compile and install e2fsprogs as root using just
  	one command.
2001-06-14 00:24:42 +00:00
Theodore Ts'o 364a373e16 ChangeLog, setsuper.c:
setsuper.c: Add s_lastcheck field to the fields which can be modified
  	using set_super_value.  (Suggested by Andreas Dilger)
ChangeLog, Makefile.in:
  Makefile.in (HFILES): Add ext2_types.h to the list of files which
  	should be installed.
2001-06-13 23:46:39 +00:00
Theodore Ts'o 83d5abf1d7 ChangeLog:
Add debian bug number reference.
  Add debian bug reference.
2001-06-13 23:31:27 +00:00
Theodore Ts'o 66a461469c ChangeLog, ismounted.c:
ismounted.c (check_mntent_file): Work around GNU hurd brain damage.
2001-06-13 23:26:19 +00:00
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