Theodore Ts'o [Wed, 5 Jan 2005 16:12:20 +0000 (11:12 -0500)]
mke2fs.c (parse_extended_opts): Rename the -R option to -E. Fix
the resize= raid/extended option so it actually works.
(The patch from Fedora e2fsprogs-1.35-11.2 claimed it
worked, but it was a placebo, despite the claim that it
worked in the usage message.)
Theodore Ts'o [Wed, 5 Jan 2005 08:16:09 +0000 (03:16 -0500)]
dupfs.c (ext2fs_dup_handle): Make sure the new filesystem handle
has its own copy of the orig_super data structure. (This
is a better way of fixing a double-free problem in
resize2fs which Fedora attempted to fix in
e2fsprogs-1.35-double_free.patch. Addresses Red Hat
Bugzilla #132707.)
Theodore Ts'o [Wed, 5 Jan 2005 08:01:06 +0000 (03:01 -0500)]
Add new function in e2p for parsing the number of blocks on the command line
for mke2fs and resize2fs, and use this function so that filesystem size
inputs to e2fsprogs command line programs are parsed consistently.
Theodore Ts'o [Fri, 24 Dec 2004 02:49:05 +0000 (21:49 -0500)]
Avoid some potential inode cache coherency problem caused by using the
byte-swapping options to e2fsck. This was the cause of some hard to
reproduce problems that had been reported in the past, and which the
resize_inode changes tickled in a much more repeatable fashion.
Theodore Ts'o [Thu, 23 Dec 2004 19:11:34 +0000 (14:11 -0500)]
Add support in debugfs's set_field command to specify array specifiers for
fields to be set. For example, to set i_block[2] for the resize inode to
be 42, simply issue the debugfs command:
set_inode <7> block[2] 42
Also added is the virtual field "bmap", which also takes an array index.
So to set the physical block mapping for logical block 1282 in the file
/test/inode to be 57, use the debugfs command:
Theodore Ts'o [Thu, 23 Dec 2004 18:55:34 +0000 (13:55 -0500)]
ext2fs.h (BMAP_SET), bmap.c (ext2fs_bmap): Add support for new
flag, BMAP_SET, which allows the caller to set a
particular logical->physical block mapping.
Theodore Ts'o [Thu, 23 Dec 2004 12:45:04 +0000 (07:45 -0500)]
Clean up resize inode routines in ext2fs library. We no longer print
any debugging statements from within library code (always a bad idea), and
ext2fs_create_resize_inode() will return a proper error code if the
resize inode is corrupt, instead of returning -1.
Theodore Ts'o [Wed, 22 Dec 2004 01:40:08 +0000 (20:40 -0500)]
tune2fs.c (parse_time): Fix minor buglet; the parse_time routine
should use the passed-in argument, not optarg, even though
the two are the same in the case of the current caller of
said function. (i.e., no user-visible problems were caused
by this, even though the code was wrong).
Theodore Ts'o [Wed, 22 Dec 2004 01:37:36 +0000 (20:37 -0500)]
Enhance debugfs so that set_super_value can now set the wtime, mtime,
lastcheck, and mkfs_time fields with date/time values.
Add the set_inode command to debugfs so that individual inode fields can
be more easily modified. We should probably make the modify_inode
command go away at some point.
Theodore Ts'o [Fri, 17 Dec 2004 01:13:45 +0000 (20:13 -0500)]
Fix e2fsck so that it will clean up filesystesm that have the
resize_inode capability disabled, but which still have the
s_reserved_gdt_blocks field set in the superblock, or which
still have blocks in the inode #7 (the resize inode).
Theodore Ts'o [Wed, 15 Dec 2004 23:06:52 +0000 (18:06 -0500)]
sparse.c (ext2fs_list_backups, ext2fs_bg_has_super),
res_gdt.c (list_backups), closefs.c (ext2fs_bg_has_super),
ext2fs.h: Move ext2fs_list_backups() to res_gdt.c, and
ext2fs_bg_has_super() back to closefs.c. There's no
reason for the new file, since list_backups() isn't being
used by any other functions, and can be made static, and
all users of the ext2fs filesystem will have to call
ext2fs_close() anyway.
Theodore Ts'o [Wed, 1 Dec 2004 00:57:20 +0000 (19:57 -0500)]
If the TZ environment variable is set to GMT, use gmtime()
instead of localtime() or ctime() to force the use of GMT.
This is because the dietlibc doesn't honor the TZ environment
variable.
Theodore Ts'o [Tue, 30 Nov 2004 19:07:11 +0000 (14:07 -0500)]
Add support for passing options to the io layer using the URL syntax. For
example, /tmp/test.img?offset=1024. Multiple options can separated using
the & character, although at the moment the only option implemented is
the offset option in the unix_io layer.
Theodore Ts'o [Tue, 30 Nov 2004 03:14:23 +0000 (22:14 -0500)]
Add definition for the extents filesystem feature and inode flag.
Change the maximum allowable blocksize to be 65536. This allows e2fsck to
check filesystems with a pagesize of 65536, and mke2fs to accept -b 65536.
Of course such a filesystem will not currently work on a Linux/x86 system,
at least not as of this writing!
Theodore Ts'o [Fri, 19 Nov 2004 19:39:14 +0000 (14:39 -0500)]
debugfs.c (kill_file_by_inode): Only iterate over the inode to
release blocks if the inode has them; otherwise attempting
to rm devices and fast symlinks will lead to errors.
(Addresses Sourceforge Bug #954741 and #957244)
Theodore Ts'o [Fri, 8 Oct 2004 16:45:24 +0000 (12:45 -0400)]
getsize.c (ext2fs_get_device_size): Add support for Windows
9x/NT under Cygwin. Thanks to Sam Robb
(samrobb@users.sourceforge.net) for pointing this and the
suggested code patch.
Make sure the configure files are newer than configure.in the
debian/rules file so that a dpkg-source created patch won't
trigger an attempt rebuild of the configure script. (Addresses
Debian Bug #272558)
tune2fs.8.in: Add a description of the .journal file, why it
is created, and how e2fsck converts it to an invisible
journal. (Addresses Debian Bug #256760)
Filter out linux-gate.so, which is a pseudo entry for the 32->64bit
translation for amd64 systems, in the initrd creation script.
(Addresses Debian bug #253595)
Revamp the initrd scripts to use a new helper program,
e2initrd_helper, which obviates the need for using /bin/awk
and mounting/unmounting the root filesystem during the initrd
process. (Addresses Debian Bug #247775)
gen_uuid.c (get_node_id): glibc always defines AF_LINK, so only
try to use struct sockaddr_dl if HAVE_NET_IF_DL_H is
defined. (Addresses Debian Bug #256669)
Clean up the header file #include's for lib/blkid/getsize.c
and lib/ext2fs/getsize.c
In lib/blkid/getsize.c, include <sys/disk.h> if present since
this is where the DIOCGMEDIASIZE ioctl is defined on FreeBSD.
(Addresses Debian Bug #264630)
resize2fs.c (check_and_change_inodes): Fix debugging printf to
mask off the high 256 bits of dirent->name_len (which is
where the file type information is stored). (Addresses
Debian Bug #271605)
e2image.c, e2image.8.in: Add new option -I which allows the
administrator to install an metadata stored in an e2image
file to a filesystem. Obviously, this can be very
dangerous!
Theodore Ts'o [Fri, 25 Jun 2004 04:52:08 +0000 (00:52 -0400)]
setflags.c, fsetflags.c: On linux systems, undefine HAVE_CHFLAGS
to deal with lame glibc's that define this function
without actually implementing it. Can you say "attractive
nuisance", boys and girls? I knew you could! (Thanks to
Pavel Troller for reporting this braindamage.)
Theodore Ts'o [Thu, 27 May 2004 01:29:14 +0000 (21:29 -0400)]
closefs.c (ext2fs_flush): Make sure the master superblock is
written last, and only after other I/O has been flushed to
disk. Thanks to Junfeng Yang from the Stanford
Metacompilation group for pointing a potential ordering
constraint problem if we don't write things out in the
right order.
Theodore Ts'o [Thu, 27 May 2004 01:04:07 +0000 (21:04 -0400)]
Implement the ability for the test_io mechanism to abort after n reads
or writes to a particular block. The block is specified by
TEST_IO_BLOCK environment variable, and the read/write count
by the TEST_IO_READ_ABORT and TEST_IO_WRITE_ABORT environment
variables. The block data is now only dumped if the 0x10 bit
is set in TEST_IO_FLAGS.
Theodore Ts'o [Thu, 27 May 2004 00:58:45 +0000 (20:58 -0400)]
Fixed potential ordering constraint problem in e2fsck's journal
recovery code by implementing the sync_blockdev function. Thanks to
Junfeng Yang from the Stanford Metacompilation group for pointing this
out.
Revert change to add dependency on awk; it isn't needed since awk is
a virtual package which is "de facto essential" by virtual of the fact
that essential packages such as base-files depends on it.
probe.c (blkid_verify_devname): If the time is earlier than the
last modified time of the device, then force a reverify;
it means the system time may not be trustworthy.
In the blkid library, if the BLKID_FILE environment
variable is set, use it to find the blkid.tab file if the
calling application did not supply a filename.