Whamcloud - gitweb
tools/e2fsprogs.git
17 years ago[COVERITY] Allow blkid_dev_has_tag to check if a tag exists when value==NULL
Theodore Ts'o [Sun, 18 Mar 2007 15:21:44 +0000 (11:21 -0400)]
[COVERITY] Allow blkid_dev_has_tag to check if a tag exists when value==NULL

blkid_dev_has_tag() will immediately return -1 (an error if value is
NULL.  Thus at the test later on value cannot be NULL. There are two
possible ways to go about fixing this. The first would be to remove the
first NULL check for value.  The second one would be to remove the
second check (and the deadcode).

I chose the second path because the functionality added is something
which a programmer could reasonably expect given the function name, and
it is highly unlikely any existing code is depending on the fact that
blkid_dev_has_tag() will return an error if value is NULL.

Coverity ID: 3: Deadcode

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years ago[COVERITY] Fix missing return code check for ext2fs_write_inode
Brian Behlendorf [Sun, 18 Mar 2007 15:16:33 +0000 (11:16 -0400)]
[COVERITY] Fix missing return code check for ext2fs_write_inode

Found 2 of the three places where a return code for ext2fs_write_inode() was
not being checked.

The second fix in e2fsck/emptydir.c is basically just to shut coverity up even
though it really is unnecessary.

Coverity ID: 1: Checked Return

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAllow the debugfs lcd command to work w/o a filesystem being open
Theodore Ts'o [Wed, 7 Mar 2007 13:09:10 +0000 (08:09 -0500)]
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>
17 years agoFix memory leak in blkid library
Theodore Ts'o [Wed, 7 Mar 2007 00:56:18 +0000 (19:56 -0500)]
Fix memory leak in blkid library

Addresses Debian Bug: #413661

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd versioned dependency in Debian's shlibs for libblkid
Theodore Ts'o [Sun, 4 Mar 2007 13:17:18 +0000 (08:17 -0500)]
Add versioned dependency in Debian's shlibs for libblkid

Add dependency to account for the new blkid function blkid_probe_all_new()
was added to e2fsprogs 1.39.   The lack of this versioned dependency
caused a failure in rpc.mountd as detailed in Debian Bug #413057.

Addresses Debian Bug: #413208

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix dump_usued segault in debugfs if used without open filesystem
Matthias Koenig [Sun, 28 Jan 2007 17:40:28 +0000 (12:40 -0500)]
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>
17 years agoUse the newer add/remove_error_table com_err interfaces
Theodore Ts'o [Tue, 26 Dec 2006 08:38:07 +0000 (03:38 -0500)]
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>
17 years agoAdd debugging code to the com_err library
Theodore Ts'o [Fri, 22 Dec 2006 18:38:38 +0000 (13:38 -0500)]
Add debugging code to the com_err library

If the environment variable COMERR_DEBUG is set to 1, print out debugging
messages as error tables are added and removed from the com_err library.
If the COMERR_DEBUG_FILE environment variable is set (and the process is
not setuid) the debugging messages may be redirected to a file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix (as yet unused) struct ext4_group_desc to add a missing bg_pad field
Theodore Ts'o [Thu, 30 Nov 2006 19:48:48 +0000 (14:48 -0500)]
Fix (as yet unused) struct ext4_group_desc to add a missing bg_pad field

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdjust badblocks -n/-w exclusive usage message
Theodore Ts'o [Sat, 18 Nov 2006 04:00:19 +0000 (23:00 -0500)]
Adjust badblocks -n/-w exclusive usage message

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd libreadline.so.5 to the list of readline libraries used by libss
Theodore Ts'o [Sat, 18 Nov 2006 03:56:23 +0000 (22:56 -0500)]
Add libreadline.so.5 to the list of readline libraries used by libss

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdded tag E2FSPROGS-1_40-WIP-1114 for changeset 20144d6af15c E2FSPROGS-1_40-WIP-1114
Theodore Ts'o [Wed, 15 Nov 2006 04:49:56 +0000 (23:49 -0500)]
Added tag E2FSPROGS-1_40-WIP-1114 for changeset 20144d6af15c

17 years agoUpdate version.h, RELEASE-NOTES, debian/changelog for 1.40-WIP release
Theodore Ts'o [Wed, 15 Nov 2006 04:49:07 +0000 (23:49 -0500)]
Update version.h, RELEASE-NOTES, debian/changelog for 1.40-WIP release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoUpdate WFLAGS to suppress spurious warning messages
Theodore Ts'o [Wed, 15 Nov 2006 04:40:19 +0000 (23:40 -0500)]
Update WFLAGS to suppress spurious warning messages

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix misc. gcc -Wall complaints in the misc and e2fsck directories
Theodore Ts'o [Wed, 15 Nov 2006 04:38:17 +0000 (23:38 -0500)]
Fix misc. gcc -Wall complaints in the misc and e2fsck directories

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix gcc -Wall complaints in libext2fs
Theodore Ts'o [Wed, 15 Nov 2006 04:14:12 +0000 (23:14 -0500)]
Fix gcc -Wall complaints in libext2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix type punning bugs in ext2fs_get_mem() and ext2fs_free_mem()
Theodore Ts'o [Tue, 14 Nov 2006 05:34:34 +0000 (00:34 -0500)]
Fix type punning bugs in ext2fs_get_mem() and ext2fs_free_mem()

This was causing dumpe2fs to crash on the ARM platform when examining
the badblocks list.

Also reverts an incorrect fix made by changeset 38078f692c20

Addresses Debian Bug: #397044

17 years agoAllow debugfs and dumpe2fs to support fs features under development
Theodore Ts'o [Mon, 13 Nov 2006 04:26:46 +0000 (23:26 -0500)]
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>
17 years agoAdd explanatory message to badblocks that -n and -w are mutually exclusive
Theodore Ts'o [Mon, 13 Nov 2006 04:09:03 +0000 (23:09 -0500)]
Add explanatory message to badblocks that -n and -w are mutually exclusive

Addresses Debian Bug: #371869

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoCheck in binary extent test image file into the source tree.
Theodore Ts'o [Mon, 13 Nov 2006 03:57:39 +0000 (22:57 -0500)]
Check in binary extent test image file into the source tree.

This is not yet ready to be used yet, but add it into the tree so that
future patches don't have to deal with manually adding this binary
image file into the tree.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoCheck in ext4 extent headers into the source tree
Theodore Ts'o [Mon, 13 Nov 2006 03:54:35 +0000 (22:54 -0500)]
Check in ext4 extent headers into the source tree

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd support for printing new filesystem features
Theodore Ts'o [Mon, 13 Nov 2006 03:50:18 +0000 (22:50 -0500)]
Add support for printing new filesystem features

Add support for printing the huge_file, gdt_checksum, dir_nlink,
extra_isize, extent, and 64bit features.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoWork around GCC bug on the Arm platform
Theodore Ts'o [Mon, 13 Nov 2006 03:22:00 +0000 (22:22 -0500)]
Work around GCC bug on the Arm platform

Addresses Debian Bug: #397044

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoUpdate draft-leach-uuids-guids-01.txt with rfc4122.txt
Theodore Ts'o [Mon, 13 Nov 2006 01:22:06 +0000 (20:22 -0500)]
Update draft-leach-uuids-guids-01.txt with rfc4122.txt

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFixes for building RPM's via "make rpm"
Andreas Dilger [Mon, 13 Nov 2006 00:41:25 +0000 (19:41 -0500)]
Fixes for building RPM's via "make rpm"

Fixed version number generation so that the same common
algorithm is used for Debian and RPM version numbering schemes.
This allows the RPM spec file to do the right thing for WIP releases.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAvoid infinite substitution loop in subst caused by autoconf pre-v2.60
Theodore Ts'o [Sun, 12 Nov 2006 22:43:50 +0000 (17:43 -0500)]
Avoid infinite substitution loop in subst caused by autoconf pre-v2.60

Autoconf versions before 2.60 don't have datarootdir defined, and so this
resulted in a @datarootdir@ --> @datarootdir@ infinite expansion.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoSet local environment variables to C so mk_cmds and compile_et always work
Theodore Ts'o [Sun, 12 Nov 2006 15:43:31 +0000 (10:43 -0500)]
Set local environment variables to C so mk_cmds and compile_et always work

Addresses SourceForge Bug: #1532177

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAllow unix_io offsets greater than 2G
Theodore Ts'o [Sun, 12 Nov 2006 15:40:40 +0000 (10:40 -0500)]
Allow unix_io offsets greater than 2G

Addresses SourceForge Bug: #1547922

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd directory hashed signed/unsigned hint to superblock
Theodore Ts'o [Sun, 12 Nov 2006 03:32:35 +0000 (22:32 -0500)]
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>
17 years agoAdd new a new tests make target "checked-failed" which reruns any failed tests
Theodore Ts'o [Sat, 11 Nov 2006 14:45:50 +0000 (09:45 -0500)]
Add new a new tests make target "checked-failed" which reruns any failed tests

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoOn-disk format for controlling the inode size
Theodore Ts'o [Sat, 11 Nov 2006 14:45:22 +0000 (09:45 -0500)]
On-disk format for controlling the inode size

- EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE (0x0040?) - add s_min_extra_isize and
  s_want_extra_isize fields to superblock, which allow specifying
  the minimum and desired i_extra_isize fields in large inodes
  (for nsec+epoch timestamps, potential other uses).  Needs RO_COMPAT
  flag handling, needs e2fsck support, patch complete, little testing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoOn-disk format definition for 64-bit support
Theodore Ts'o [Sat, 11 Nov 2006 14:44:47 +0000 (09:44 -0500)]
On-disk format definition for 64-bit support

- EXT4_FEATURE_INCOMPAT_64BIT (0x0080) - support for 64-bit block count
  fields in the superblock (s_blocks_count_hi, s_free_blocks_count_hi),
  large group descriptors (s_desc_size), extents with high 16 bits
  (ee_start_hi, ei_leaf_hi), inode ACL (i_file_acl_hi).  May also grow
  to encompass the previously proposed BIG_BG.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoOn-disk format for large number of subdirectories
Theodore Ts'o [Sat, 11 Nov 2006 14:43:42 +0000 (09:43 -0500)]
On-disk format for large number of subdirectories

- EXT4_FEATURE_RO_COMPAT_DIR_NLINK (0x0020?) - allow directories to have
  > 65000 subdirectories (i_nlinks) by setting i_nlinks = 1 for such
  directories.  RO_COMPAT protects old filesystems from unlinking such
  directories incorrectly and losing all files therein.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoOn-disk format definition for group descriptor checksums
Theodore Ts'o [Sat, 11 Nov 2006 14:41:52 +0000 (09:41 -0500)]
On-disk format definition for group descriptor checksums

- EXT4_FEATURE_RO_COMPAT_GDT_CSUM (0x0010?) - store a crc16 checksum in
  the group descriptor (s_uuid[16] | __u32 group | ext3_group_desc
  (excluding gd_checksum itself)).  This allows the kernel to more safely
  manage UNINIT groups.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoOn-disk format definition for huge files
Theodore Ts'o [Sat, 11 Nov 2006 11:32:03 +0000 (06:32 -0500)]
On-disk format definition for huge files

- EXT4_FEATURE_RO_COMPAT_HUGE_FILE (0x0008) - change i_blocks to be
  in units of s_blocksize units instead of 512-byte sectors, use
  l_i_frag and l_i_fsize as i_blocks_hi (could also be part of 64BIT).

E2fsck and debugfs changed to support i_blocks_hi instead of l_i_frag and
l_i_fsize.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix e2fsck and mke2fs -c to be pass the last _block change to badblocks
Theodore Ts'o [Wed, 8 Nov 2006 05:41:50 +0000 (00:41 -0500)]
Fix e2fsck and mke2fs -c to be pass the last _block change to badblocks

Badblocks now interprets last_block argument as the last block to check,
instead of the number of blocks to check, to be consistent with the
badblocks man page.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoUpdate debian/changelog for 1.39+1.40-WIP-2006.10.02+dfsg-2 release
Theodore Ts'o [Sun, 22 Oct 2006 04:44:15 +0000 (00:44 -0400)]
Update debian/changelog for 1.39+1.40-WIP-2006.10.02+dfsg-2 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd failsafe against duplicate UUID's generated by threaded programs
Theodore Ts'o [Sun, 22 Oct 2006 04:18:49 +0000 (00:18 -0400)]
Add failsafe against duplicate UUID's generated by threaded programs

Add in randomness based on Linux's thread id (gettid) to avoid race
conditions when two threads try to generate uuid's at the same time.
This shouldn't be an issue if /dev/urandom has proper locking and is
present, so this is just a failsafe.

Addresses SourceForge Bug: #1529672

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd datarootdir definition for compatibility with autoconf 2.60
Theodore Ts'o [Sun, 22 Oct 2006 04:14:26 +0000 (00:14 -0400)]
Add datarootdir definition for compatibility with autoconf 2.60

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix potential e2fsck -n crash
Theodore Ts'o [Sun, 22 Oct 2006 03:27:03 +0000 (23:27 -0400)]
Fix potential e2fsck -n crash

Don't core dump if there is a corrupt htree interior node.  If the block
number is larger than the number of blocks in the directory, don't write
past the end of malloc'ed memory.

Addresses SourceForge Bug: #1512778

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix amd64 build due to -lpthread ordering problem
Theodore Ts'o [Sun, 22 Oct 2006 01:46:47 +0000 (21:46 -0400)]
Fix amd64 build due to -lpthread ordering problem

Addresses Debian Bug: #393680

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix mke2fs error checking when creating revision 0 filesystems
Theodore Ts'o [Wed, 18 Oct 2006 04:31:11 +0000 (00:31 -0400)]
Fix mke2fs error checking when creating revision 0 filesystems

Fix revision 0 error checking so that it doesn't give spurious error
when the user gives a command-line option of "-O none".Add error
checking so that "-r 0 -j", "-r 0 -s 1", and "-r 0 -E resize=XXX" will
print an explanatory error message and abort.

Addresses Debian bug: #392107

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoUpdate Debian packaging for 1.39+1.40-WIP-2006.10.02+dfsg-1
Theodore Ts'o [Wed, 4 Oct 2006 13:12:35 +0000 (09:12 -0400)]
Update Debian packaging for 1.39+1.40-WIP-2006.10.02+dfsg-1

Remove I-D because of DFSG license Nazi's.

Make e2fsck and uuid-dev have its own /usr/share/doc directories, and make
the e2fsck-static package not depend on the e2fsprogs package.

Addresses Debian Bug: #383521

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix interpretation of the last_block command-line parameter to badblocks
Theodore Ts'o [Wed, 4 Oct 2006 03:35:57 +0000 (23:35 -0400)]
Fix interpretation of the last_block command-line parameter to badblocks

Also update the display messages so they are accurate.

Addresses Debian Bug: #386475

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoUpdate version.h, RELEASE-NOTES, debian/changelog for 1.40-WIP release
Theodore Ts'o [Mon, 2 Oct 2006 17:34:48 +0000 (13:34 -0400)]
Update version.h, RELEASE-NOTES, debian/changelog for 1.40-WIP release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRemove useful UUID specification from Debian packaging thanks to license Nazi's
Theodore Ts'o [Mon, 2 Oct 2006 17:31:10 +0000 (13:31 -0400)]
Remove useful UUID specification from Debian packaging thanks to license Nazi's

Addresses Debian Bug: #390664

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoCheck for potential 64-bit overflow in ext2fs_get_device_size()
Eric Sandeen [Mon, 2 Oct 2006 13:30:41 +0000 (09:30 -0400)]
Check for potential 64-bit overflow in ext2fs_get_device_size()

Check for potential overflow for filesystems contained in regular files
where the filesystem image size is returned by stat64().

Signed-off-by: Eric Sandeen <esandeen@sandeen.net>
17 years agoMinor correction to e2fsck.conf man page
Theodore Ts'o [Mon, 2 Oct 2006 12:38:44 +0000 (08:38 -0400)]
Minor correction to e2fsck.conf man page

Addresses Debian Bug: #369761

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agodebian: Add versioned build-dep on texi2html
Theodore Ts'o [Mon, 2 Oct 2006 12:33:29 +0000 (08:33 -0400)]
debian: Add versioned build-dep on texi2html

Addresses Debian Bug: #389554

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoIncrease default journal size to guarantee working on-line resizing
Theodore Ts'o [Mon, 2 Oct 2006 12:31:54 +0000 (08:31 -0400)]
Increase default journal size to guarantee working on-line resizing

Make the smallest journal be 1400 blocks instead of 1024 blocks to
make sure there is enough room to support on-line resizing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix resize2fs error msgs if the fs or kernel doesn't support on-line resize
Theodore Ts'o [Mon, 2 Oct 2006 12:30:34 +0000 (08:30 -0400)]
Fix resize2fs error msgs if the fs or kernel doesn't support on-line resize

Check to make sure the filesystem has a resize inode if it is needed to
grow the filesystem.  Print the correct error message if the kernel
returns an ENOTTY error to the group extend ioctl

Addresses Debian Bug: #380548

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix Debian FTBFS problem caused by devmapper library using pthreads
Theodore Ts'o [Mon, 2 Oct 2006 02:18:08 +0000 (22:18 -0400)]
Fix Debian FTBFS problem caused by devmapper library using pthreads

Addresses Debian bug: #388718

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix build problem if byte swapping has been disabled.
Theodore Ts'o [Mon, 2 Oct 2006 01:42:21 +0000 (21:42 -0400)]
Fix build problem if byte swapping has been disabled.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix misc/Makefile.in so that it builds even if e2fsck hasn't been built yet
Theodore Ts'o [Mon, 2 Oct 2006 01:14:37 +0000 (21:14 -0400)]
Fix misc/Makefile.in so that it builds even if e2fsck hasn't been built yet

Addresses Sourceforge Bug: #1565561

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix e2p_percent() crash if percentage was zero.
Theodore Ts'o [Fri, 29 Sep 2006 14:23:16 +0000 (10:23 -0400)]
Fix e2p_percent() crash if percentage was zero.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoClarify copyright license status of lib/et and lib/ss in the COPYING file
Theodore Ts'o [Fri, 29 Sep 2006 14:21:43 +0000 (10:21 -0400)]
Clarify copyright license status of lib/et and lib/ss in the COPYING file

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoblkid_devno_to_devname(): Avoid recursive loops due to symlinks in /dev
Theodore Ts'o [Mon, 25 Sep 2006 02:33:38 +0000 (22:33 -0400)]
blkid_devno_to_devname(): Avoid recursive loops due to symlinks in /dev

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix blkid bug with correctly reporting FAT filesystem labels that are empty
Karel Zak [Mon, 18 Sep 2006 01:23:46 +0000 (21:23 -0400)]
Fix blkid bug with correctly reporting FAT filesystem labels that are empty

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoAdd GFS/GFS2 support to the blkid library.
Karel Zak [Mon, 18 Sep 2006 01:10:58 +0000 (21:10 -0400)]
Add GFS/GFS2 support to the blkid library.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoUpdate French and Dutch translations
Theodore Ts'o [Wed, 13 Sep 2006 20:43:55 +0000 (16:43 -0400)]
Update French and Dutch translations

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix more rounding overflows for filesystems that have 2**32-1 blocks
Eric Sandeen [Tue, 12 Sep 2006 18:56:18 +0000 (14:56 -0400)]
Fix more rounding overflows for filesystems that have 2**32-1 blocks

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoAdd checks to make sure inode counts don't overflow a 32-bit value
Eric Sandeen [Tue, 12 Sep 2006 18:56:17 +0000 (14:56 -0400)]
Add checks to make sure inode counts don't overflow a 32-bit value

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoCreate new ext2fs library inlines: ext2fs_group_{first,last}_block()
Eric Sandeen [Tue, 12 Sep 2006 18:56:16 +0000 (14:56 -0400)]
Create new ext2fs library inlines: ext2fs_group_{first,last}_block()

Create new ext2fs library inline functions in order to calculate
the starting and ending blocks in a block group.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoFix signed vs unsigned printf format strings for block and inode numbers
Eric Sandeen [Tue, 12 Sep 2006 18:56:15 +0000 (14:56 -0400)]
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>
17 years agoRemove unused variables
Eric Sandeen [Tue, 12 Sep 2006 18:56:12 +0000 (14:56 -0400)]
Remove unused variables

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoFix loops over group descriptors to prevent 2**32-1 block number overflows
Eric Sandeen [Tue, 12 Sep 2006 18:55:22 +0000 (14:55 -0400)]
Fix loops over group descriptors to prevent 2**32-1 block number overflows

For loops iterating over all group descriptors, consistently define
first_block and last_block in a way that they are inclusive of the
range, and do not overflow.

Previously on the last block group we did a test of <= first +
dec_blocks; this would actually wrap back to 0 for a total block count
of 2^32-1

Also add handling of last block group which may be smaller.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoMinor man page updates to tune2fs(8) and uuidgen(1)
Theodore Ts'o [Tue, 12 Sep 2006 06:33:08 +0000 (02:33 -0400)]
Minor man page updates to tune2fs(8) and uuidgen(1)

Addresses Debian Bug: #373004

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFixed RPM spec file to use the License tag instead of Copyright
Theodore Ts'o [Tue, 12 Sep 2006 05:43:42 +0000 (01:43 -0400)]
Fixed RPM spec file to use the License tag instead of Copyright

Also explicitly specify the license as GPLv2.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix bug in device mapper scanning; probe_one() doesn't want a leading /dev
Theodore Ts'o [Tue, 12 Sep 2006 05:30:53 +0000 (01:30 -0400)]
Fix bug in device mapper scanning; probe_one() doesn't want a leading /dev

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRemove duplicate entry in the RPM .spec file.
Theodore Ts'o [Mon, 11 Sep 2006 05:14:53 +0000 (01:14 -0400)]
Remove duplicate entry in the RPM .spec file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix potential 2**32-1 overflow by using e2p_percent()
Theodore Ts'o [Wed, 30 Aug 2006 07:08:13 +0000 (03:08 -0400)]
Fix potential 2**32-1 overflow by using e2p_percent()

Add a new functiom, e2p_percent(), which correct calculates the percentage
of a number based on a given percentage, without worrying about overflow
issues.  This is used where we calculate the number of reserved blocks using
a percentage of the total number of blocks in a filesystem.

Based on patches from Eric Sandeen, but generalized to use this new function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoDetect overflows in loop counters
Eric Sandeen [Wed, 30 Aug 2006 06:16:55 +0000 (02:16 -0400)]
Detect overflows in loop counters

For loops such as:

for (i=1; i <= fs->super->s_blocks_count; i++) {
        <do_stuff>
}

if i is an int and s_blocks_count is (2^32-1), the condition is never false.
Change these loops to:

for (i=1; i <= fs->super->s_blocks_count && i > 0; i++) {
        <do_stuff>
}

to stop the loop when we overflow i

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRemove unnecessary and unused resize2fs build rule from misc/Makefile.in
Theodore Ts'o [Wed, 30 Aug 2006 06:06:41 +0000 (02:06 -0400)]
Remove unnecessary and unused resize2fs build rule from misc/Makefile.in

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix potential 2**32-1 overflow problems by ext2fs_div_ceil()
Theodore Ts'o [Wed, 30 Aug 2006 05:57:00 +0000 (01:57 -0400)]
Fix potential 2**32-1 overflow problems by ext2fs_div_ceil()

Add a new function, ext2fs_div_ceil(), which correctly calculates a division
of two unsigned integer where the result is always rounded up the next
largest integer.   This is used everywhere where we might have
previously caused an overflow when the number of blocks
or inodes is too close to 2**32-1.

Based on patches from Eric Sandeen, but generalized to use this new function

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
17 years agoFix silly spelling error in e2fsck
Theodore Ts'o [Tue, 29 Aug 2006 21:12:18 +0000 (17:12 -0400)]
Fix silly spelling error in e2fsck

Addresses SourceForge bug: #1531372

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix debugfs coredump when lsdel is run without an open filesystem
Theodore Ts'o [Tue, 29 Aug 2006 21:02:56 +0000 (17:02 -0400)]
Fix debugfs coredump when lsdel is run without an open filesystem

Addresses Debian Bug: #378335

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd Vietnamese translation
Theodore Ts'o [Sun, 20 Aug 2006 01:16:17 +0000 (21:16 -0400)]
Add Vietnamese translation

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoblkid.8.in: Fix description of the -l option to be more accurate
Andreas Dilger [Sun, 20 Aug 2006 01:12:15 +0000 (21:12 -0400)]
blkid.8.in: Fix description of the -l option to be more accurate

This patch fixes the blkid.8.in description of the "-l" option.  The man
page gives the impression that the first match is the one that is returned.
However, the blkid_find_dev_with_tag() function returns the device with
the highest priority (which is good, because that is what people really want).

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoThis patch fixes up an error in the lib/blkid/Makefile.in which was causing
Andreas Dilger [Sun, 20 Aug 2006 00:05:28 +0000 (20:05 -0400)]
This patch fixes up an error in the lib/blkid/Makefile.in which was causing
all lib/blkid/tst* files to be removed with "make clean", in particular
tst_types.c.  That was causing a failure of "make check" in an RPM source
tree.  Fix is to explicitly list the test binaries, as lib/ext2fs/Makefile.in
does.

As "make check" was only calling test_probe and tst_types (and none
of the other tst_* tests) it was not clear what was going on, and an
"hg update" would always return the old tst_types.c file back so the
problem was only being seen intermittently...  It isn't clear whether
you want the other tst_* programs to be run as part of "make check".

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoIf diff -u is supported, use it to report test failures.
Theodore Ts'o [Sun, 6 Aug 2006 18:33:13 +0000 (14:33 -0400)]
If diff -u is supported, use it to report test failures.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAdd 64-bit byte swapping functions
Andreas Dilger [Sun, 6 Aug 2006 05:39:30 +0000 (01:39 -0400)]
Add 64-bit byte swapping functions

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
17 years agoMake the findsuper program more powerful
Andreas Dilger [Sun, 6 Aug 2006 04:56:37 +0000 (00:56 -0400)]
Make the findsuper program more powerful

Improve the findsuper program by printing the uuid and label from the
superblocks, as well as the starting and ending offsets of the
filesystem given the information in the superblock.  Omit by
default printing superblocks that are likely found in located in an ext3
journal unless an explicit -j option is given.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRequire mke2fs -F -F for really dangerous operations
Andreas Dilger [Sat, 5 Aug 2006 23:05:53 +0000 (19:05 -0400)]
Require mke2fs -F -F for really dangerous operations

Disambiguate the use of "-F" (force) flag for mke2fs to avoid dangerous
situations.  The use of -F is needed for regular backing files and
for filesystems on whole block devices.  It should NOT be confused
with mke2fs on an apparently-mounted or in-use filesystem.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoRename EXT3_EXTENTS_FL to EXT4_EXTENTS_FL and make it visible to the user
Andreas Dilger [Sat, 5 Aug 2006 22:50:22 +0000 (18:50 -0400)]
Rename EXT3_EXTENTS_FL to EXT4_EXTENTS_FL and make it visible to the user

lsattr will display the EXT4_EXTENTS_FL flag

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoCreate the generated files read-only to remind developers not to edit them.
Andreas Dilger [Sat, 5 Aug 2006 18:41:00 +0000 (14:41 -0400)]
Create the generated files read-only to remind developers not to edit them.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoAllow default inode_size to be specified in mke2fs.conf and document mke2fs -I
Andreas Dilger [Sun, 16 Jul 2006 02:08:20 +0000 (22:08 -0400)]
Allow default inode_size to be specified in mke2fs.conf and document mke2fs -I

This patch allows "inode_size" to be specified in the mke2fs.conf file,
and always compiles in the "-I" option.  In addition, it disallows
specifying the inode size on rev 0 filesystems, though I don't think
this was much of a danger anyways.

Clean up dead lines in ext2fs.h.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoFix spelling typo in chattr(1) man page
Theodore Ts'o [Sun, 16 Jul 2006 01:55:33 +0000 (21:55 -0400)]
Fix spelling typo in chattr(1) man page

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years agoProtect ext2_ext_attr.h from multiple inclusion
Andreas Dilger [Wed, 28 Jun 2006 15:29:56 +0000 (11:29 -0400)]
Protect ext2_ext_attr.h from multiple inclusion

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
18 years agoMinor fix to prevent e2fsck.h being included twice:
Andreas Dilger [Wed, 28 Jun 2006 15:26:42 +0000 (11:26 -0400)]
Minor fix to prevent e2fsck.h being included twice:

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
18 years agoadd "make rpm" target to top-level Makefile
Andreas Dilger [Wed, 21 Jun 2006 04:05:49 +0000 (00:05 -0400)]
add "make rpm" target to top-level Makefile

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
18 years agofix comment for blkid_get_dev_size()
Andreas Dilger [Wed, 21 Jun 2006 04:04:08 +0000 (00:04 -0400)]
fix comment for blkid_get_dev_size()

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
18 years agodebugfs "stat" should print unsigned values for xattrs
Andreas Dilger [Wed, 21 Jun 2006 04:01:42 +0000 (00:01 -0400)]
debugfs "stat" should print unsigned values for xattrs

This patch changes debugfs to print unsigned chars when "stat" on an inode
finds xattrs in the inode.  Without this change, the values are printed
as signed chars, e.g. "ffffffec" instead of "ec".

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
18 years agoExclude mercurial files from the RPM build tree to speed up copy/build.
Andreas Dilger [Wed, 21 Jun 2006 03:59:43 +0000 (23:59 -0400)]
Exclude mercurial files from the RPM build tree to speed up copy/build.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
18 years agoInstall mke2fs.conf into root_sysconfdir rather than /etc.
Matthias Andree [Mon, 12 Jun 2006 11:54:16 +0000 (13:54 +0200)]
Install mke2fs.conf into root_sysconfdir rather than /etc.

18 years agoRead mke2fs.conf and e2fsck.conf from root_sysconfdir rather than harcoded /etc.
Matthias Andree [Sat, 10 Jun 2006 14:08:18 +0000 (16:08 +0200)]
Read mke2fs.conf and e2fsck.conf from root_sysconfdir rather than harcoded /etc.

18 years agoAdd parentheses and casts to make GCC happy.
Matthias Andree [Tue, 30 May 2006 14:29:49 +0000 (16:29 +0200)]
Add parentheses and casts to make GCC happy.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoAdd prototype for e2fsck_write_inode_full.
Matthias Andree [Tue, 30 May 2006 14:29:15 +0000 (16:29 +0200)]
Add prototype for e2fsck_write_inode_full.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoAdd missing #include <ctype.h>.
Matthias Andree [Tue, 30 May 2006 14:28:42 +0000 (16:28 +0200)]
Add missing #include <ctype.h>.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoFix non-Linux compiler warning (missing return statement).
Matthias Andree [Tue, 30 May 2006 14:28:22 +0000 (16:28 +0200)]
Fix non-Linux compiler warning (missing return statement).

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
18 years agoDeclare getopt() according to POSIX 2001 if getopt.h not found.
Matthias Andree [Tue, 30 May 2006 14:27:45 +0000 (16:27 +0200)]
Declare getopt() according to POSIX 2001 if getopt.h not found.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>