Commit Graph

223 Commits (593c6ead7e3bca412eff2d17edad790de81cb0eb)

Author SHA1 Message Date
Theodore Ts'o f154d2f687 unix_io.c (unix_open): Only attempt the setrlimit workaround if
the kernel version is 2.4.10 -- 2.4.17, since otherwise an
	old version of glibc (built against 2.2 headers) will
	interact badly with the workaround to actually cause more
	problems.  I hate it when the glibc folks think they're
	being smarter than the kernel....
2002-07-14 08:33:32 -04:00
Theodore Ts'o 9e6c5dd73e ext2_fs.h: Add superblock field for reserved group descriptors. 2002-07-09 11:08:10 -04:00
Theodore Ts'o 2cb403b255 bitops.h: Add #define's for ext2fs_{l,b}e{32,16}_to_cpu and
ext2fs_cpu_to_{l,b}e{32,16}
2002-06-28 08:10:29 -04:00
Theodore Ts'o 5818d6789a ismounted.c (check_mntent): In AIX 4.3, MOUNTED isn't defined.
Add appropriate fallbacks in this case.
2002-06-27 21:19:45 -04:00
Theodore Ts'o 503f9e7f6e Add support for the half-MD4 HTREE hash.
Add HTREE root node tests.
2002-06-26 16:52:10 -04:00
Theodore Ts'o 88372d5c4b Applied Andrew Morton's patch to support the dirsync option. 2002-06-15 18:58:39 -04:00
Andreas Dilger b21bf26778 Do sanity checking of the number of blocks and inodes in a group for
8192-byte and 16384-byte blocksize filesystems.

Change the default bytes-per-inode ratio of a new filesystem to be at most
one inode per block for large blocksizes.
2002-06-10 11:05:56 -06:00
Andreas Dilger 7da78ff17d ext2_fs.h: Further minor cleanups of the header. Consolidate
some checks for __KERNEL__ into one place.
2002-06-09 17:38:50 -06:00
Andreas Dilger 0fbd1a8a9a ext2_fs.h: Remove macros accessing u.ext2_sb field and use
the EXT2_SB() macro instead.  Remove kernel function
	prototypes also.  This matches the 2.5 kernel, and
	is also cleaner for other reasons.  Whitespace cleanup.
2002-05-23 00:32:34 -06:00
Theodore Ts'o 0d63467ddb Update to support the V2 Bestbits EA format. 2002-05-22 00:22:38 -04:00
Theodore Ts'o 31e29a12d1 Fix up Andreas's 8k blocksize changes to fix a number of bugs,
and to make the page size determined at run-time instead of 
compile time.
2002-05-17 10:53:07 -04:00
Theodore Ts'o b38cd28363 Add a new command "bmap" to debugfs which calculates the logical->physical block
mapping for a particular inode.

Fixed a bug in the libext2 library which broke ext2fs_bmap if no inode structre
was passed inside for here.

Fixed bad calling parameters to parse_ulong which broken the -b  and -s
options to debugfs, as well as do_init, and the testb, setb, clearb functions.
2002-05-11 22:13:20 -04:00
Theodore Ts'o f0efd2976b ismounted.c (check_mntent_file, is_swap_device): Verify that the
file we are checking is a block device file before looking
	at st_rdev, since it's not valid for normal files.
	(is_swap_device): Move so that it is outside the
	HAVE_MNTENT_H, so that it is always built.
2002-04-27 17:07:52 -04:00
Theodore Ts'o f9190c8a95 dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
functions which take an extra flags argument.  The flag
	EXT2_DIRBLOCK_V2_STRUCT will reverse when the name_len
	field is byte swampped on big-endian machines, since in
	the V2 structure, name_len is a char field which is
	doesn't need to be byte swapped --- except if an
	old-style kernel had byte-swapped the name_len field
	as part of the V1 structure.

Also fixed a bug in debugfs which used ext2_dir_entry_2 without 
worrying about the above issue, with the net result that "ls -l"
would print an incorrect file type on big-endian systems.
2002-03-12 01:05:06 -05:00
Theodore Ts'o 52783e0ca7 Add new function to the libext2fs library, ext2fs_dirhash, which
calculates the hash of a filename for indexed directories.
2002-03-11 15:04:45 -05:00
Theodore Ts'o a8e772498c Update for 1.27 release. 2002-03-08 03:12:14 -05:00
Theodore Ts'o 546a1ff18c Fix various gcc -Wall complaints. 2002-03-07 23:52:56 -05:00
Theodore Ts'o 304905df4a Makefile.in (check): Use LD_LIBRARY_PATH to run test programs.
(From Philipp Thomas <pthomas@suse.de>)
2002-03-07 20:55:01 -05:00
Theodore Ts'o 57173d0feb Update Changelog messages to use tytso@mit.edu for all addresses
after September 7, 2001.  (Forgot to update my emacs file to get
rid of the tytso@valinux.com address.  Oops.)
2002-02-26 14:59:39 -05:00
Theodore Ts'o df614db6ef Add initial support in debugfs for examining directory indexing
information.
2002-02-25 04:28:45 -05:00
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