Commit Graph

203 Commits (25813b1313a520d118dd16cf5b98545d1f13f53f)

Author SHA1 Message Date
Theodore Ts'o 64e1b274ed unix_io.c (unix_open): Fix 2.4 resource limit workaround so that
it doesn't break things on mis32, sparc32, and alpha
	platforms.
2002-02-23 18:50:32 -05:00
Theodore Ts'o f3e3d31502 ismounted.c (is_swap_device): Fix file descriptor/memory leak;
we were missing an fclose().
2002-02-21 20:48:25 -05:00
Theodore Ts'o f12e285ffd Add new inode I/O abstraction interface which exports an inode as
an I/O object.

Export ext2_file_flush as a public interface.

Also minor cleanups to tighten code in other I/O abstractions, and to
mark a void * pointer as const in the ext2_file_write interface.
2002-02-20 01:06:25 -05:00
Theodore Ts'o 7d4343d0d0 Lots of small random portability fixes to make e2fsprogs build
under AIX --- even without the 5L compatibility toolkit, and even
using the uber-crippled AIX native C compiler.
2002-02-12 02:34:44 -05:00
Theodore Ts'o 7f961d424b Fix bug where ext2fs_mkdir wasn't correctly bumping the number of
directories in use in a bloock group.
2002-02-03 01:28:52 -05:00
Theodore Ts'o a5f3f5c191 Update files for 1.26 release. 2002-02-03 01:00:22 -05:00
Theodore Ts'o 8bd0c95908 dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
	which will return deleted directory entries.
	ext2fs_dir_iterate2 takes a new callback function which
	is identical with the one used by
	ext2fs_dblist_dir_iterate().  If the directory entry is
	deleted, the callback function will be called with the
	entry paraemter set to DIRENT_DELETED_FILE.

Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
	ext2fs_block_alloc_stats): New functions which update
	block/inode allocation statistics in the bitmaps, block
	group descriptors, and superblock.

mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
expanddir.c (expand_dir_proc), bb_inode.c
	(clear_bad_block_proc, set_bad_block_proc,
	ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
	Update to use new block/inode allocation statistics.
2002-01-03 03:29:19 -05:00
Theodore Ts'o 07cefe7a70 ismounted.c (is_swap_device): New function used by
ext2fs_check_if_mounted and ext2fs_check_mount_point which
	determines whether or not the specified device is a swap
	device by using /proc/swaps.  More bulletproofing for
	idiotic/careless system administrators!
2001-12-24 15:20:22 -05:00
Theodore Ts'o 6a525069a9 Mke2fs now creates the lost+found directory with 0700 permissions,
since files which get dropped into that directory may have come 
from a protected directory, and the system administrator may not 
deal with immediately.  (Addresses Debian bug #118443)
2001-12-24 09:40:00 -05:00
Theodore Ts'o a8fd6e36b8 ismounted.c (check_mntent_file): Stat all of the entries in
/etc/mtab and/or /proc/mounts in order to catch dim-witted
	system administrators who might have created alias
	devices.
2001-12-24 01:40:35 -05:00
Theodore Ts'o 19007e51a5 Move linux/jbd.h to ext2fs/kernel-jbd.h, to avoid using the
system header file version of hbd.h when using diet glibc
(since it forcibly adds /usr/include to the beginning of include
search path.)
2001-12-23 19:33:51 -05:00
Theodore Ts'o 4ea7bd0439 Fix various gcc -Wall nits. Fixed a bug in mke2fs where a bogus
error message could be printed on an malloc() failure, and e2image
was optimized to avoid needless system calls by using the stashed
inode functions.
2001-12-16 23:23:37 -05:00
Theodore Ts'o 8cf93332d1 Fix e2fsck's handling of external journals,and update journal
recovery files from 2.4.17-pre8.
2001-12-16 02:23:36 -05:00
Theodore Ts'o bd27880b4b unix_io.c (unix_open): Make sure the ulimit workaround works
regardless of the version of glibc which is used to
	compild e2fsprogs.
2001-12-03 05:47:32 +01:00
Theodore Ts'o 8880e7599c unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
trying to unset the filesize limit if at all possible,
	if a block device is getting opened.  (The filesize limit
	shouldn't be applied against writes to a block device, but
	starting in 2.4.10, the kernel is doing this.)
2001-11-26 21:05:36 -05:00
Theodore Ts'o 5bc28df0fa mkjournal.c (ext2fs_add_journal_inode): When creating a .journal
file on adding a journal to an already-mounted filesystem,
	try to clear the ext2 file attributes on an already
	existing .journal file so that we don't fail if on a
	partially added journal to the filesystem.
2001-11-09 17:34:54 -05:00
Theodore Ts'o b3f5b4c229 Define a new ext2 file attribute, EXT2_NOTAIL_FL,
which signals that a particular inode should not have the
last bits of data (the "tail") be merged with another
file.  This is necessary to keep programs like LILO happy.
2001-11-05 19:22:02 -05:00
Theodore Ts'o fbf9111216 Update changelogs for 1.25 release. 2001-09-20 10:47:47 -04:00
Theodore Ts'o 2038b636b2 ismounted.c (check_mntent_file): We now validate the entry in
/etc/mtab to make sure the filesystem is really mounted,
	since some broken distributions (read: Slackware) have
	buggy boot scripts that don't initialize /etc/mtab before
	checking non-root filesystems.  (Slackware also doesn't
	check the root filesystem separately, and reboot if the
	root filesystem had changes applied to it, which is
	dangerous and broken.)
2001-09-14 07:44:25 -04:00
Theodore Ts'o 7746cad695 ext2_ext_attr.h: Remove unneeded #include of <linux/config.h>
which was breaking the build on the hurd.  (Addresses
	Debain bug #112414)
2001-09-17 00:02:21 -04:00
Theodore Ts'o fb70775b0f Update for 1.24a release 2001-09-04 15:00:37 -04:00
Theodore Ts'o 109624a133 Update for 1.24 release. 2001-08-31 00:59:55 -04:00
Theodore Ts'o eddeb56f9f getsize.c (ext2fs_get_device_size): Back out BLKGETSIZE64
changes, since the ioctl number has been reused by another
	unofficial patch.
2001-08-30 17:24:02 -04:00
Theodore Ts'o 943ed874fc Add missing log entry showing when we released e2fsprogs 1.23 2001-08-27 12:29:22 -04:00
Theodore Ts'o 89a6ebd524 Performance enhancements to speed up creating a journal and
block and inode allocation in general.
2001-08-05 20:31:09 -04:00
Theodore Ts'o 3751721fbb finddev.c (scan_dir): Fix memory leak; we weren't calling
closedir() when exiting the function in all cases.
2001-07-29 12:01:09 -04:00
Theodore Ts'o 4e40f6c348 mkjournal.c (ext2fs_create_journal_superblock): Set the first block
usable in the journal for external journals to be 2 or 3,
        depending on the blocksize, so that the existing kernel code
        does the right thing.
2001-07-27 23:33:40 -04:00
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