Commit Graph

2402 Commits (fefaef39e046781ddc75d15a8f12369f17dbd17d)

Author SHA1 Message Date
Andreas Dilger fefaef39e0 Improve support for in-inode EA's
Add vertificaton of the in-inode EA information, and allow in-inode
EA's to have a checksum.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 21:20:26 -05:00
Theodore Ts'o 0465bee402 Activate basic f_extents test case
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 20:11:07 -05:00
Theodore Ts'o 15d482ba6e e2fsck: Add support for extents
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 20:06:18 -05:00
Theodore Ts'o cc9bf5d246 Add read/only support for extents to ext2fs_bmap()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 20:05:55 -05:00
Theodore Ts'o 43323be957 Use BLOCK_FLAG_READ_ONLY flag in debugfs, e2image, and tune2fs
Pass BLOCK_FLAG_READ_ONLY to ext2fs_block_iterate2() so that debugfs,
e2image, and tune2fs will work well with filesystems containing
extents.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 20:05:55 -05:00
Theodore Ts'o 206fea69f8 Add read-only extents support to ext2fs_block_iterate2()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 20:05:47 -05:00
Theodore Ts'o 3eb07f6493 Add support for extents to libext2fs
Initial implemenation of extents support in libext2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 20:05:35 -05:00
Theodore Ts'o e3df15abdb e2fsck: factor out code to clear an inode into e2fsck_clear_inode()
Factor out code to clear a bogus inode and update e2fsck's internal
data structures accordingly into a common routine,
e2fsck_clear_inode().  This saves about 200 bytes in the compiled x86
e2fsck executable, and makes the code more maintainable in the
long-term.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 15:27:04 -05:00
Theodore Ts'o 4ce3b77480 Don't byte swap extents information in the inode
Responsibility for byte swapping the extents information rests with
the low-level extent code, which translates the on-disk extents
information to the abstract extent format.  The on-disk format will
eventually get more complicated, in order to add support for 64-bit
block numbers, bit-compressed extents, etc.  So to avoid needing to
expose all of that complexity in swapfs.c, the in-memory contents of
i_blocks will not be byte-swapped and will be identical to the on-disk
format.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 15:27:04 -05:00
Theodore Ts'o 49ce6cb5ce Allow debugfs to be extended for use by test programs
This change allows debugfs to be reused as the base for e2fsprogs
internal test programs, by linking debugfs object files with
additional object file(s) that define additional commands.  The test
program's object file(s) should define their own comand table, and
define the symbol extra_cmds to be a pointer to the ss_request_table.
In addition, the symbol debug_prog_name can be used to override the
name of the program printed in the version banner and in the ss
prompt.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 15:27:04 -05:00
Theodore Ts'o d8d12558dc debugfs: Fix error handling in strtoblk() and common_block_args_process()
Fix strtoblk() to allow a block number 0, and
common_block_args_process() so it prints an error message if a block
number that can't be parsed by strtoul().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 15:27:04 -05:00
Theodore Ts'o bbf54adb03 Merge branch 'maint' into next 2008-02-17 17:36:45 -05:00
Theodore Ts'o 3eed36b254 Update to latest samba tdb library before LGPLv3 change
The major changes were:

* Fix realloc() leak on failure case from Jim Meyering
* Fixed various problems in transaction lock code
* Made transaction_brlock() static
* Added more fine-grained locking features

Moved from svn revision #22080 to #23590

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-17 17:35:54 -05:00
Theodore Ts'o fe263da923 Make fsck ignore mounted filesystems if given the -M option
Adapted from the SuSE patch, but fixes a number of very serious
problems with the patch in SLES:

1) This changeset uses -M instead of -m; most lowercase options are
reserved for use by the filesystem-specific fsck programs.  All new
fsck options must be upper case.

2)  This changeset will skip the root filesystem in "fsck -AM", which
the SLES patch will not do.

3)  Loading /proc/mounts into the fs_info can cause -t opts matching to
malfuction.  So this changeset uses a simplified version of the
ismounted.c function from the ext2fs library.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-17 17:35:46 -05:00
Christophe GRENIER e7cc6f7d0b Add portability checks to support DJGPP
DJGPP lacks sys/select.h and sys/un.h; add header checks to be more
portable.

Signed-off-by: Christophe Grenier <grenier@cgsecurity.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-02-17 17:33:57 -05:00
Theodore Ts'o d69e7e28ca configure.in: Don't use the dc command unless it is required
Some systems don't have the 'dc' command installed, and this causes
configure to print a warning message unnecessarily for a standard
(non-WIP and non-pre) release of e2fsprogs.

It's easy enough to avoid this problem, so let's do it.

Addresses-Sourceforge-Bug: #1893024

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-17 17:33:57 -05:00
Theodore Ts'o cfa30fd554 uuidd: Fix pid file so it has the correct pid number
The pid file was getting created before the fork(), so it had the
incorrect pid number.  No one noticed for a while, since "uuidd -k"
will kill the daemon and it has enough automatic convenience functions
that it's usually not necessary to refer to the pid file except as a
convenient place for uuidd to lock against multiple instances of the
daemon starting up.

Addresses-Sourceforge-Bug: #1893244

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-17 17:33:48 -05:00
Theodore Ts'o e70f32b79d libuuid: use fcntl locking instead of lockf
Cygwin doesn't support lockf(), so move to fcntl() locking as more
portable.  Also fix a bug which could cause get_lock() to loop forever
if the attempt to lock the file fails for some reason.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-16 10:05:48 -05:00
Theodore Ts'o 67ab6bc86b Update Czech, Dutch, Polish, Sweedish, and Vietnamese translations
Install updates from the Translation Project.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-15 17:12:18 -05:00
Theodore Ts'o 357d1863d6 libext2: Add BLOCK_FLAG_READ_ONLY flag to ext2fs_block_iterate2()
This flag allows the caller to promise that it will not try to modify
the block numbers returned by the iterator.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-10 08:04:09 -05:00
Theodore Ts'o ef80fdc8ad Merge branch 'maint' into next 2008-02-10 08:03:54 -05:00
Theodore Ts'o 37f009ae22 Set the C locale in the tests/test_script driver
Since the test_script driver uses [A-Za-z], we need to set the locale
so we don't get bitten on locals where the sort order might be
different.

Addresses-Sourceforge-Bug: #1890526

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-10 07:58:08 -05:00
Theodore Ts'o d8565d78d7 Fix incorrect distribution name in Debian's Changelog
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-10 00:24:53 -05:00
Theodore Ts'o e015f3d5ef Update release notes, version files for 1.40.6 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-10 00:16:37 -05:00
Theodore Ts'o 47526e3568 libcom_err: Use thread local storage to fix reentrancy problems
Address the theoretical problem of two threads trying to format a
different unknown error code by using TLS.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-09 23:49:19 -05:00
Theodore Ts'o 5010f295ca Document the BLKID_FILE environment variable in the libblkid man page
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-09 23:35:03 -05:00
Theodore Ts'o f1d5fce623 Update e2fsprogs translation template and Vietnamese and Czech translations
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-09 23:19:35 -05:00
Theodore Ts'o a4045c21a3 blkid: Add support for returning labels for UDF filesystems
Addresses-Sourceforge-Bug: #1886394

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-09 23:12:56 -05:00
Theodore Ts'o ab9f1a84b0 Don't try to create $DESTDIR/etc/init.d as part of make install
This isn't necessary since we don't install the init.d script (and
it's not the recommended way to start uuidd anyway).

Addresses-Sourceforge-Bug: #1885085

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-09 22:34:43 -05:00
Theodore Ts'o 838f133c72 blkid: Flush cached filesystem information on any error other than EPERM
USB devices can return ENOMEDIUM, and when the filesystem cached
information wasn't flushed, it resulted in the wrong location of a
filesystem to be returned to the caller.  The only justification for
using cached information when the open fails is in the case of a
permission denied error.

Addresses-Debian-Bug: #463787
2008-02-09 22:30:20 -05:00
Theodore Ts'o 0ddfd9a529 Allow tune2fs to set and clear the test_fs flag on ext4 filesystems
Also allow the label to be set/cleared on ext4 filesystems via e2label
and tune2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-09 22:22:38 -05:00
Theodore Ts'o cfc1931194 blkid: Automatically chose between ext4 and ext4dev as appropriate
Add logic that on Linux systems will check for the presence of the
ext4dev filesystem; if it isn't present, fall back to ext4 for
filesystems that are marked as being "OK for use on test filesystem
code".  If they are OK for use for in-development filesystem code, it
should also be fine to use stable filesystem code if there is no test
filesystem code (ext4dev) available.

The reverse is not true, of course.  We don't ever want to mount a
production filesystem using test filesystem code unless the user gives
us explicit permission via "tune2fs -E test_fs".

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-09 07:45:21 -05:00
Theodore Ts'o 414025e542 Fix bug in e2fsck which caused it to core dump if --enable-jbd-debug is used
Missing curly braces from a python programmer; my bad for noticing it!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-31 14:22:24 -05:00
Theodore Ts'o d8a1a67427 debian: Fix packaging problem caused by dpkg 1.14.16
Addresses-Debian-Bug: #436058

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-30 07:20:54 -05:00
Theodore Ts'o 428f6b32a9 Merge branch 'maint' into next
Conflicts:

	configure
	lib/ext2fs/ext2_fs.h
	misc/e2image.c
2008-01-27 20:09:05 -05:00
Theodore Ts'o c8a5708db1 Update release notes, version files for 1.40.5 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 20:01:25 -05:00
Theodore Ts'o 0d1de232a8 Create filesystems with the ext_attr feature by default
Since recent kernels have a tendency to set this feature willy-nilly,
let's just enable by default.  It's only very old kernels that don't
support it any more.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 19:38:46 -05:00
Theodore Ts'o b1631cce64 Create new filesystems with 256-byte inodes by default
This makes it easier to upgrade to ext4 in the future, and it speeds
up extended attributes handling --- important on SELinux systems!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 19:30:27 -05:00
Theodore Ts'o 7e8fe327b5 Don't build e2fsck statically by default anymore
Also removed the --enable-dynamic-static configure option.

Unfortunately the usefulness of building e2fsck statically is gone on
all modern distributions, since everything else on the system is built
dynamically these days.  In fact on some distributions it is almost
impossible to build programs statically any more.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 18:22:18 -05:00
Theodore Ts'o 4f2e8f1982 debian: Don't use dietlibc on platforms that don't support it
Addresses-Debian-Bug: #459475

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 17:20:44 -05:00
Theodore Ts'o df200fffd5 e2image: Fix potential overflow if the device name is too long
Adapted from SLES's patch: e2fsprogs-strncat.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 15:45:30 -05:00
Theodore Ts'o c2dbc18a94 Use lseek() instead of llseek() of sizeof(long) == sizeof(long long)
Previously we used a hard-coded test where for the Alpha and the IA64,
we used lseek instead of llseek().  Generalize this to whenver
sizeof(long) is the same as sizeof(long long).

It turns out this fixes a FTBFS problem on the x86_64 for Debian,
since dietlibc doesn't provide llseek() on that architecture.

Addresses-Debian-Bug: #459614

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 00:35:32 -05:00
Theodore Ts'o edeee8f36f libuuid: Make sure execl() variadic function is properly terminated
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 00:22:52 -05:00
Theodore Ts'o 69d742284d blkid: Add support for HFS+ detection
From SLES 10 patch: e2fsprogs-blkid_probe_hfsplus.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 00:21:07 -05:00
Theodore Ts'o 4dc30dac2c blkid: Make sure the blocksize in reiserfs is sane
This avoids a floating point exception for corrupt reiserfs images

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 00:14:01 -05:00
Theodore Ts'o 3e9f86326d Fix minor typo in resize2fs man page
Taken from SLES patch: e2fsprogs-1.39-resize2fs_manpage.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 00:08:49 -05:00
Theodore Ts'o a8cde73acb Ignore "safe" flag differences when e2fsck compares superblocks
Recent e2fsprogs (1.40.3 and higher) fsck compares primary superblock to
backups, and if things differ, it forces a full check.  However, the
kernel has a penchant for updating flags the first time a feature is
used - attributes, large files, etc.

This is a bad idea, and we should break the kernel of this habit,
especially for the ext4 feature flags.  But for now, let's make e2fsck
avoid forcing a full check and backup except when absolutely
necessary.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-26 23:17:50 -05:00
Theodore Ts'o 2921332fd8 Teach the blkid library about ext4/ext4dev
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-26 22:25:50 -05:00
Theodore Ts'o 6cb27404f5 Add support for the test_fs flag
The test_fs flag is an "ok to be used with test kernel code" flag.  It
makes it easier for us to determine whether a filesystem should be
mounted using ext4 or not.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-26 21:47:40 -05:00
Theodore Ts'o 66549a437c Update Swedish translation file from the Translation Project
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-21 14:01:52 -05:00