Commit Graph

2934 Commits (7dca4c88f166561031011ed27287818eaa343486)

Author SHA1 Message Date
Theodore Ts'o 1af01e94cc Create the journal in the middle of the filesystem
This speeds up access to the journal by eliminating worst-case seeks
from one end of the disk to another, which can be quite common in very
fsync-intensive workloads if the file is located near the end of the
disk, and the journal is located the beginning of the disk.

In addition, this can help eliminate journal fragmentation when
flex_bg is enabled, since the first block group has a large amount of
metadata.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27 17:04:16 -04:00
Theodore Ts'o 674c0cc4cb ext2fs_mkjournal(): Don't allocate an extra block to the journal
Addresses-Sourceforge-Bug: 1483791

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27 17:03:37 -04:00
Theodore Ts'o e6baebd2a9 libblkid: Give a priority bonus to "leaf" devicemapper devices
Give a boost to dm devices which are not used to build other dm
devices, since "leaf" devices are generally more likely to be
interesting as devices to mount.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27 02:24:51 -04:00
Theodore Ts'o 0bb740621f libblkid: Unexport the private symbol blkid_devdirs
blkid_devdirs was defined in blkidP.h and was never intended to be
used outside of the library.  Since it no longer needs to be shared
across object files, rename it and turn it into a static variable.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27 00:00:44 -04:00
Theodore Ts'o 7515a74478 Remove use of devmapper library by the blkid library
The devmapper library is no longer needed given commit f4e89bcd.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-26 23:56:00 -04:00
Theodore Ts'o f4e89bcdf2 libblkid: Optimize devicemapper support
This commit works by removing all calls from libdevmapper altogether,
and using the standard support for "normal" non-dm devices.

It depends on dm devices being placed in /dev/mapper (but the previous
code had this dependency anyway), and /proc/partitions containing dm
devices.

We don't actually rip out the libdevmapper code in this commit, but
just disable it via #undef HAVE_DEVMAPPER, just so it's easier to
review and understand the fundamental code changes.  A subsequent
commit will remove the libdevmapper code, as well as unexport
the blkid_devdirs string array.

Thanks to Karel Zak for inspiring me to look at the dm code in blkid,
so I could realize how much it deserved to ripped out by its roots.  :-)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-26 23:53:22 -04:00
Theodore Ts'o 5dd77dbe5a Add support for with empty directory blocks in 64k blocksize filesystems
The rec_len field in the directory entry is 16 bits, so if the
filesystem is completely empty, rec_len of 0 is used to designate
65536, for the case where the directory entry takes the entire 64k
block.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-25 21:08:19 -04:00
Theodore Ts'o 649bd289d0 debian: Add dpkg-gensymbols support to track ABI changes to the libraries
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-25 00:00:35 -04:00
Theodore Ts'o d56ccbd8f9 libblkid: Fix namespace leakage of unicode_16be_to_utf8
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 23:34:13 -04:00
Theodore Ts'o e32677cd58 libe2p: Fix namespace leakage of os_tab
Make os_tab static, since there's no reason it should be exposed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 22:46:31 -04:00
Theodore Ts'o c4dcb1c10a libext2fs: Fix namespace leakage of crc16 functions
Rename crc16 to ext2fs_crc16, and make crc16_table static, since
there's not reason it should be exposed at all.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 22:44:33 -04:00
Theodore Ts'o 0f3c108363 Remove trailing space from the description of the r_move_itable test
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 21:58:03 -04:00
Andreas Dilger e5e12db959 fix e2fsck error message for bad htree depth
Fix error message to print the depth of a corrupt htree directory.

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Kalpak Shah <kalpak.shah@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24 21:57:31 -04:00
Andreas Dilger 03efde8abe add debugfs command to print known features
Print out the currently supported features of e2fsprogs/libext2fs
via a new "debugfs supported_features" command.  This helps scripts
to know whether it is possible to try and enable specific features
in the filesystem.

Signed-off-by: Kalpak Shah <kalpak.shah@sun.com>
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24 21:31:52 -04:00
Andreas Dilger 28b74daa10 allow integrating the "make rpm" command into a build system
Allow "make rpm" to take some extra configure options from the build
environment without having to patch the code.

Build the tarball in a temporary directory instead of the e2fsprogs
source directory.

Signed-off-by: Michael MacDonald <Michael.Macdonald@Sun.COM>
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 21:03:17 -04:00
Andreas Dilger 9f9e5c3aea libext2fs: grow dblist more aggressively
Make the dblist grow more quickly when many directory blocks are added,
otherwise the array has to get copied too often, which is slow when it
is large.

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24 20:55:49 -04:00
Andreas Dilger ba7b0feef6 e2fsck: Change comments in problem array to match what is printed
This makes it easier to locate the problem code in question.

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 20:38:22 -04:00
Andreas Dilger 864b8d4eab Fix miscellaneous compile warnings
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 20:37:39 -04:00
Andreas Dilger a5e14ead2e Document the extent and huge file flags in the chattr.1.in man page
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 20:24:23 -04:00
Andreas Dilger 1bb6f6c87e e2fsck_write_bitmaps() optimization
This patch changes the e2fsck_write_bitmaps() function to write out the
block and inode bitmaps together, instead of writing them in two passes.

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24 17:59:09 -04:00
Theodore Ts'o 87de4b70df debian: Add uuid-runtime.lintian-overrides
I want to make sure the uuidd daemon is shutdown before removing
the package.  Since the uuidd daemon is provided by the uuid-runtime
package, and I *know* exactly where it is, and I ***don't*** want the
script to be confused by some other pathname being used by the local
administrator, I specify an explicit pathname.  In addition, given the
explicit test to make sure /usr/sbin/uuidd exists, it seems non-sensical
to remove the prepended path.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:34 -04:00
Theodore Ts'o 9af10066c0 debian: add libuuid1.lintian-overrides
The libuuid1.postinst script doesn't really call adduser; it just
checks the adduser config file, if it exists.  The lintain maintainers
agree this is a spurious warning, and it will be fixed eventually.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Theodore Ts'o 5779b80ec4 debian: Remove e2fsck-static.lintian-overrides
This override is no longer necessary since lintian excludes foo.static
binaries from the static binary test.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Theodore Ts'o a26ba650a8 Fix mke2fs man page to escape all minus signs
Option specifiers must be escaped so the are printed as minus signs
(U+002D) instead of hyphens (U+2010).  Hence "mke2fs -t ext4" must be
expressed as "mke2fs \-t ext4" instead.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Theodore Ts'o 31955ed395 debian: Add debian/watch file
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Manish Katiyar 73b0542596 debugfs: Print the progname instead of argv[0] in error message
Trivial fix to print the progname instead of argv[0] in error message.

Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Manish Katiyar 4262162ac2 debugfs: Close the file handle and return in case of errors
Close the filehandle and return in case if we are unable to expand the
directory during write.

Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Theodore Ts'o b41fb00225 libblkid: Strengthen the JFS probe routine
Check to make sure a JFS filesystem is really correct by checking the
relationship between the following fields in the JFS superblock:
s_bsize, s_l2bsize, s_pbsize, s_l2pbsize, and s_l2bfactor.  Thanks to
Lesh Bogdanow for this suggestion.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:29:33 -04:00
Theodore Ts'o 78d89cda68 libblkid: Fix false detection of DFSee created filesystems.
OS/2 and DFSee creates a pseudo FAT-12/16 header in the first 512
bytes of a filesystem which looks enough like a FAT-12/16 to fool
blkid.  Part of this is because we don't require ms_magic or vs_magic
to be the strings "FAT12 ", "FAT16 ", or "FAT32 ", since some FAT
filesystem formatters don't set ms_magic or vs_magic.  To address
this, we explicitly test for "JFS     " and "HPFS    " in ms_magic,
and if they are found, we assume the filesystem is definitely not
a FAT filesystem.

Addresses-Launchpad-Bug: #255255

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24 17:24:18 -04:00
Theodore Ts'o 30ab7f4c65 Interim update of the debian/changelog and the release notes
This is in preparation for an e2fsprogs 1.41.1 release.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-23 12:35:35 -04:00
Manish Katiyar baf8ab980e libext2fs: Fix memory leak in ext2fs_initialize().
Below patch ensures that cleanup is done properly in ext2fs_initialize
from all return paths in case of errors.

Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-23 09:08:23 -04:00
Manish Katiyar c545131a4c ext2ed: Remove masix support
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-23 09:08:23 -04:00
Theodore Ts'o bad89b2af3 mke2fs: Issue a warning if the mke2fs.conf file wasn't updated
Many people are forgetting to update their mke2fs.conf file, and this
means that filesystems aren't getting created with the proper features
enabled.  So detect this case and issue a warning.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-23 09:08:15 -04:00
Theodore Ts'o 094c2d4393 e2fsck: Portability fix: Use WORDS_BIGENDIAN instead of __LITTLE_ENDIAN
__LITTLE_ENDIAN is set by the glibc headers, and isn't portable.  We
should be using WORDS_BIGENDIAN, which is set by autoconf.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 19:19:18 -04:00
Theodore Ts'o 9c460caae3 libblkid: Enhance support for MacOS's hfs, hfsplus, and hfsx filesystems
Add detection for hfsx filesystems.  Add label and uuid detetion for
hfs, hfsplus, and hfsx.

Addresses-Sourceforge-Feature-Requests: #2060292

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 16:45:44 -04:00
Theodore Ts'o 5b7adf0690 libblkid: Fix potential crash if blkid cache is out of date when probing
Fix bug added in 57926c8c55

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 12:43:14 -04:00
Theodore Ts'o 1aaaa82901 configure.in: Respect LDFLAGS environment variable if passed into configure
If the --with-ldopts option is not passed on the command line, respect
the LDFLAGS environment variable instead of forcing LDFLAGS to be
unset.  "configure --help" documents LDFLAGS as part of the standard
configure script calling convention.

Addresses-Sourceforge-Feature-Request: #1937287

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 12:26:07 -04:00
Theodore Ts'o 6ec9ef1881 libuuid: Windows portability fixes
Make the uuid library (more) portable for Windows.

Addresses-Sourceforge-Feature-Request: #1937287

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 12:15:56 -04:00
Theodore Ts'o 02d04db494 configure.in: use AC_MSG_{RESULT,WARN,ERROR} instead of echo
This gives us standard behavior when using flags such as --quiet, and
gives us standard warning output when showing warnings and errors.

Addresses-Sourceforge-Patches: #2058794

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 10:52:42 -04:00
Theodore Ts'o 2d40a91e17 libext2fs: Replace use of sprintf with strcpy/strcat to help SILO
Some bootloaders, like SILO, don't provide sprintf in their limited
bootloader environment.  Since the uses in rw_bitmaps.c is only doing
sprintf("foo %s"), it's easy to replace that usage with strcpy/strcat.

Addresses-Sourceforge-Bug: #2049120

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 10:37:18 -04:00
Theodore Ts'o 88dbf8287f resize2fs: Make sure we close out the progress bar in pass #4
This fixes a cosemtic issue where we don't complete the progress bar
and issue a newline before printing the final resize successful
message.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 09:57:44 -04:00
Theodore Ts'o 3ebaf85717 po: Add Indonesian translation from the Translation Project 2008-08-22 03:26:26 -04:00
Philipp Thomas 9564ee554e po: update de.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-22 03:22:50 -04:00
Theodore Ts'o 7f9c96ee74 resize2fs: supply block allocator for extents function
In the rare case where new blocks are needed while mutating an extent
tree, supply a specialized block allocator so that extent_node_split()
allocates valid blocks for the interior nodes of the extent tree.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 03:07:53 -04:00
Theodore Ts'o 86acdebd53 resize2fs: Fix support for filesystems with the uninit_bg feature
If the filesystem has the uninit_bg feature, then parts of the block
and inode bitmap may not be initialized.  Teach resize2fs how to deal
with these case appropriately.  (Most of these fixes were fortunately
not necessary for the common case where the resize_inode is present to
reserve space, and where the filesystem is being expanded instead of
being shrunk.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 03:03:42 -04:00
Theodore Ts'o c71d781370 libext2fs: Add support for uninit_bg feature to allocation functions
If the allocation functions need to allocate out of a block group
where the inode and/or block bitmaps have not yet been initialized,
initialize them so ext2fs_new_block() and ext2fs_new_inode() work
correctly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 02:52:12 -04:00
Theodore Ts'o 213fe9288b ext2fs_block_iterate2(): Support changing interior nodes of an extent tree
Resize2fs needs to be able to relocate the interior nodes of an extent
tree.  Add support for this feature via ext2fs_extent_replace().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 02:50:02 -04:00
Theodore Ts'o da994e9c11 ext2fs_extent_set_bmap(): Avoid creating extra extents for resize2fs
When resize2fs moves blocks belonging to an inode, it will call
ext2fs_extent_set_bmap() for logical blocks 0, 1, 2, 3, ...

Optimize for this calling pattern so we don't end up creating a
separate extent for each block.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 02:46:16 -04:00
Theodore Ts'o 2047e0a1ee ext2fs_extent_set_bmap(): fix bug when replacing a single block extent
When replacing a single block extent, make sure we set or clear the
uninitialized extent flag as requested by the caller.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 02:43:59 -04:00
Theodore Ts'o a9ea7285e6 Fix ext2fs_extent_set_bmap() when setting a block before the first extent
When setting a logical block which is before the first extent in the
extent tree, make sure the new extent goes in front, at the very
beginning of the extent tree.  This fixes a bug where previously the
new extent would be inserted out of order in this case.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 02:43:05 -04:00