Commit Graph

198 Commits (714da4515e716a35edf602d0ea8dcd072ad9e0d8)

Author SHA1 Message Date
Theodore Ts'o d7b64725ee Update Release Notes, Changelogs, version.h, etc. for 1.40 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-24 17:32:47 -04:00
Andreas Dilger de8f3a7621 Fix gcc -Wall warnings, especially on 64-bit systems
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-05-25 11:18:11 -04:00
Eric Sandeen 5113a6e32b Fix mke2fs and debugfs to support large (> 16 bit) uid's and gid's
Mke2fs is supposed to set the uid/gid ownership of the root directory when
a non-rooot user creates the filesystem.  This wasn't working correctly
if the uid/gid was > 16 bits.   In additional, debugfs wasn't displaying
large uid/gid's correctly.  This patch fixes these two programs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-05-08 00:10:54 -04:00
Theodore Ts'o d362a3fb7e Define the l_i_iversion field in ext2_inode
The l_i_version field is now defined from the old l_i_reserved1 field in
the ext2 inode.  This field will be used to store high 32 bits of the
64-bit inode version number.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-19 01:53:53 -04:00
Theodore Ts'o c7c1209efd Add new debugfs command "set_block_group"
This command allows the user to set a value in the block group descriptors
for a particular block group.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-13 15:56:00 -04:00
Theodore Ts'o a4ea6b98f3 Fix debugfs's date parser so that it accepts integer values
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-10 21:10:55 -04:00
Theodore Ts'o efac5a7f0d debugfs: support > 2GB files for the dump and rdump commands
Add _GNU_SOURCE define to make sure O_LARGEFILE is defined for
do_dump(), and use O_LARGEFILE when writing files using do_rdump().

Addresses Debian Bug: #412614

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-02 18:30:46 -04:00
Brian Behlendorf 971fe05630 [COVERITY] Handle potential case in debugfs if ext2fs_get_pathname returns NULL
Coverity ID: 51: Use After Free

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2007-03-29 00:32:23 -04:00
Theodore Ts'o d904dd2ac0 [COVERITY] Fix coverity warning in debugfs
This is a no-op since long_opt isn't currently being used; the -l option
to htree_dump is currently unwired to anything at the moment.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Coverity ID: 47: Used before assigned
2007-03-29 00:26:10 -04:00
Brian Behlendorf 0bed54fd3e [COVERITY] Fix file handle leak in debugfs's logdump (in error case)
Also fixed a bug in checking if the fopen failed.

Coverity ID: 30: Resource Leak

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-23 23:01:09 -04:00
Brian Behlendorf 2f1ecfa5f8 [COVERITY] Fix memory leak on error handling in the debugfs's icheck command
Coverity ID: 25: Resource Leak

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2007-03-21 19:16:11 -04:00
Brian Behlendorf 89456558df [COVERITY] Fix (error case) memory leak in debugfs
Handle leaked cbuf due to early returns with a generic failure path.

Coverity ID: 24: Resource Leak

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-21 17:53:33 -04:00
Brian Behlendorf b772900b4b [COVERITY] Avoid static buffer overruns in debugfs
Add an extra byte to EXT2_NAME_LEN in the static allocation for the
required trailing null.  This allows filenames up to the maximum
length of EXT2_NAME_LEN withover an overrun.

Coverity ID: 11: Overrun Static
Coverity ID: 12: Overrun Static
Coverity ID: 13: Overrun Static

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-21 15:09:15 -04:00
Theodore Ts'o 57a1cbb643 Allow the debugfs lcd command to work w/o a filesystem being open
Addresses LTC Bugzilla #27513

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-07 08:09:10 -05:00
Matthias Koenig 97fa31b947 Fix dump_usued segault in debugfs if used without open filesystem
The dump_unused command in debugfs segfaults if used without an open
filesystem:

sor:~ # debugfs
debugfs 1.39 (29-May-2006)
debugfs:  dump_unused
Segmentation fault

Patch (from IBM) below.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
2007-01-28 12:40:28 -05:00
Theodore Ts'o a6d8302b48 Use the newer add/remove_error_table com_err interfaces
Change all of the e2fsprogs programs to use the newer add_error_table()
and remove_error_table() interfaces instead of the much older
initialize_*_error_table() function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-12-26 03:38:07 -05:00
Theodore Ts'o cf8272e108 Allow debugfs and dumpe2fs to support fs features under development
Add support for the new flag EXT2_FLAG_SOFTSUPP_FEATURES flag to
ext2fs_open() , which allows application to open filesystes with features
which are currently only partially supported by e2fsprogs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-12 23:26:46 -05:00
Theodore Ts'o f77704e416 Add directory hashed signed/unsigned hint to superblock
The e2fsprogs and kernel implementation of directory hash tree has a
bug which causes the implementation to be dependent on whether
characters are signed or unsigned.  Platforms such as the PowerPC,
Arm, and S/390 have signed characters by default, which means that
hash directories on those systems are incompatible with hash
directories on other systems, such as the x86.

To fix this we add a new flags field to the superblock, and define two
new bits in that field to indicate whether or not the directory should
be signed or unsigned.  If the bits are not set, e2fsck and fixed
kernels will set them to the signed/unsigned value of the currently
running platform, and then respect those bits when calculating the
directory hash.  This allows compatibility with current filesystems,
as well as allowing cross-architectural compatibility.

Addresses Debian Bug: #389772

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11 22:32:35 -05:00
Theodore Ts'o cce2f497e0 Fix Debian FTBFS problem caused by devmapper library using pthreads
Addresses Debian bug: #388718

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-01 22:18:08 -04:00
Eric Sandeen d0ff90d520 Fix signed vs unsigned printf format strings for block and inode numbers
There were still some %d's lurking when we print blocks & inodes; also
many of the counters in the e2fsck_struct were signed, and probably
need to be unsigned to avoid overflows.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-09-12 14:56:15 -04:00
Theodore Ts'o 6cab406d2b Fix debugfs coredump when lsdel is run without an open filesystem
Addresses Debian Bug: #378335

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-08-29 17:02:56 -04:00
Theodore Ts'o 9c07dc00b8 Add missing backwards compatibility for ancient Linux systems
This fixes some (but not all) of the compatibility bugs which prevented
e2fsprogs from being compiled on a Linux 2.0.35 system.  There are still
some unprotected use of long long's, and apparently some type problems
with the uuid library, but these can be fixed up later.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-29 11:06:16 -04:00
Theodore Ts'o 2c83031791 Fix debugfs's dump_unsued commands on filesystems with a 64k blocksize
Use EXT2_MAX_BLOCK_SIZE instead of a hardcoded blocksize of 32768, since 
this will fail on a filesystem with a 64k blocksize.  (Addresses SourceForge
bug #1424311)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-28 23:42:47 -04:00
Theodore Ts'o e3e92534ac Fix type warning problem with time_t in debugfs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-21 19:26:06 -04:00
Theodore Ts'o f5fa20078b Add support for EXT2_FEATURE_COMPAT_LAZY_BG
This feature is initially intended for testing purposes; it allows an
ext2/ext3 developer to create very large filesystems using sparse files
where most of the block groups are not initialized and so do not require
much disk space.  Eventually it could be used as a way of speeding up
mke2fs and e2fsck for large filesystem, but that would be best done by 
adding an RO_COMPAT extension to the filesystem to allow the inode table
to be lazily initialized on a per-block basis, instead of being entirely initialized
or entirely unused on a per-blockgroup basis.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-08 20:17:26 -04:00
Theodore Ts'o 49c6b4e947 Add handling for invalid option characters in debugfs subcommands
Fix the debugfs commands htree_dump, dx_hash, and list_dir so they print a
print a usage message when an illegal option character is given.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-04-27 20:59:42 -04:00
Takashi Sato 8deb80a5d1 Fix format statements to make e2fsprogs programs 32-bit clean
Change the format string(%d, %ld) for a block number and inode number
to %u or %lu.

Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 21:43:46 -05:00
Theodore Ts'o 98eb44bdb5 Add an option to debugfs to open filesystems in exclusive mode
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 19:58:13 -05:00
Theodore Ts'o 6a2efe047d Fix debugfs's icheck to correctly report the owner of an EA block
Hello Ted,
here is a minor fixup with debugfs "icheck" finding a block in an EA.
It was reporting the inode number as one too low because it was set
after the EA check is done.

From: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-08 18:22:06 -05:00
Theodore Ts'o 9b9a780f5a Fix various gcc -Wall complaints.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-10 21:50:30 -05:00
Theodore Ts'o 4efae606bf New debugfs command: set_current_time
Generalize the time parsing code and move it to
util.c:string_to_time().  Add new command, set_current_time, which
sets the time used to set the filesystems's time fields.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-24 21:56:38 -04:00
Theodore Ts'o 38d732bb5a Fix debugfs's set_inode_field so it can properly set i_size
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-09-06 05:42:44 -04:00
Theodore Ts'o caf037a456 Fix debugfs's set_inode_fields command from silently failing.
The set_inodes_field command was silently failing when setting one of
the following fields: frag, fsize, uid_high, gid_high, and author.
The type size for these fields were set to an incorrect value in the
inode_fields table.
2005-07-04 12:24:40 -05:00
Theodore Ts'o 1f965c8d96 Update for e2fsprogs 1.38 release. 2005-06-30 20:06:45 -04:00
Theodore Ts'o 64777391eb debugfs.c (do_stat): Check to make sure a filesystem is open
and abort if with an error if not, to prevent a seg fault
	in that case.
2005-05-05 17:21:46 -04:00
Theodore Ts'o fd4b28efd3 Update for the e2fsprogs 1.37 release. 2005-03-21 22:37:03 -05:00
Theodore Ts'o c9ae3f9a49 Make debugfs's stat command print the size of the extra inode fields,
if any.
2005-03-21 01:08:10 -05:00
Theodore Ts'o 030970ed75 Fix e2fsck, debugfs, and the ext2fs_mkdir function so that when we create
a new inode we make sure that the extra information in the inode (any extra
fields in a large inode and any ea-in-inode information) is cleared.  This 
can happen when e2fsck creates a new root inode or a new lost+found directory,
or when the user uses the debugfs write, mknod, or mkdir commands.  Otherwise,
the newly create inode could inherit garbage (or old EA information) from
a previously deleted inode.
2005-03-20 20:05:22 -05:00
Theodore Ts'o ea822eeba3 Enhance debugfs's stat command so it can dump extended attributes
which are stored in the inode body.
2005-03-20 18:03:58 -05:00
Theodore Ts'o 3eee5e9eed Update for release of e2fsprogs 1.36. 2005-02-05 18:26:03 -05:00
Theodore Ts'o 07f031fd1d Define _XOPEN_SOURCE to be 500 to fix compilation problems on Solaris. 2005-02-03 20:38:52 -05:00
Theodore Ts'o 89c801561d set_fields.c: Add support for the jnl_blocks[] for set_super_value 2005-01-20 21:45:27 -05:00
Theodore Ts'o 619a8ea70c Cleanup C code in debugfs's setfield. Added missing return statement (turned
out it didn't cause a functional bug) and added #define _XOPEN_SOURCE on 
non-Solaris systems to pick up strptime()'s definition.
2005-01-19 13:26:38 -05:00
Theodore Ts'o 1d3a951118 Make the official name of the new debugfs set_inode command be
set_inode_field, since it is more intuitive.
2005-01-07 21:14:12 -05:00
Theodore Ts'o 08fd3f36c3 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:

	set_inode /test/inode bmap[1282] 57
2004-12-23 14:11:34 -05:00
Theodore Ts'o 7dec050a80 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.
2004-12-21 20:37:36 -05:00
Theodore Ts'o a06bd026c7 Add support for newer superblock fields in debugfs's set_super_value
command.
2004-12-16 20:15:35 -05:00
Theodore Ts'o 522798d342 Add install-strip and install-shlibs-strip targets
Use Linux-kernel-style makefile output for "make install"

Update intl/Makefile.in to version from gettext 0.14.1
2004-12-15 11:28:55 -05:00
Theodore Ts'o 6d4022786d Use MKINSTALLDIRS macro so that the Makefiles can find the script
correctly.

Update Makefile dependencies.

Update "make depend" production so that it filters out comments
inserted by newer gcc compilers.

Remove sync from e2fsck's "make all" target.
2004-12-14 21:46:26 -05:00
Theodore Ts'o 8ff1a86005 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.
2004-11-30 19:57:20 -05:00