OSDN Git Service
Andreas Dilger [Wed, 9 Jan 2008 19:59:47 +0000 (20:59 +0100)]
mke2fs: Make lost+found always have at least 2 blocks
Make sure lost+found has always at least 2 disk blocks. This will provide at
least elementary test that we have not screwed-up support for 64KB blocks since
the second directory block will be empty.
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 4 Jan 2008 20:28:51 +0000 (15:28 -0500)]
debugfs: Add -p option to ls subcommand.
Originally submitted by Jason Pyeron:
While working with a compromized system (suckit root kit) hidden files
were viewable by debugfs but not any other utility. When spaces and
tabs were put into the directory names defugfs did not "show" them.
"ls -p" quotes the output so is can be parsed easily.
Addresses-Red-Hat-Bugzilla: #149480
Addresses-Sourceforge-Feature-Request: #
1201667
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 17:41:35 +0000 (12:41 -0500)]
Merge branch 'maint' into next
Conflicts:
configure
debian/rules
e2fsck/swapfs.c
lib/ext2fs/ext2_fs.h
Theodore Ts'o [Tue, 1 Jan 2008 17:25:36 +0000 (12:25 -0500)]
Fix build failure on non-Linux/non-Hurd/non-Masix systems
The previous fix didn't quite work, but this one should!
Addresses-Sourceforge-Bug: #
1861633
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 16:37:20 +0000 (11:37 -0500)]
debugfs: allow the undel command reallocate without linking the inode
When recovering a large number of deleted files, linking the undeleted
inodes to directories may require a directory to be expanded. This
could allocate a block that that had been used by one of the
yet-to-be-undeleted files. So the 'undel' command been enhanced to
allow the destination pathname to be optional. This will allow the
cautious user to undelete all of the inodes without specifying a
destination pathname, and then either use debugfs's link command to
add hard links, or use e2fsck to link all of the recovered files to
the lost+found directory.
Addresses-Sourceforge-Feature-Request: #967141
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 15:59:57 +0000 (10:59 -0500)]
e2fsck: When optimizing non-htree directories, sort by inode number
Previously "e2fsck -fD" on a non-htree directory would sort the
directory alphabetically by name. That's stupid. Better to sort the
directory by inode number, since that will optimize performance much
more significantly than sorting by name!
Addresses-Sourceforge-Feature-Request: #532439
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 15:42:41 +0000 (10:42 -0500)]
e2image: If there is an error while writing a block, call exit(1)
If the disk fills while e2image is writing its output file, it will
spew a large number of error messages instead of exiting with a
non-zero status code after the first failure.
Addresses-Sourceforge-Feature-Request: #606508
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 15:27:38 +0000 (10:27 -0500)]
debugfs: Add #include <string.h> to pick up prototype for strcasecmp
Addresses-Sourceforge-Patch: #
1861659
Reported-by: Mike Frysinger <vapier@users.sourceforge.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 14:16:16 +0000 (09:16 -0500)]
uuidd: Add _GNU_SOURCE #define to pick up setres[ug]id() prototypes
Addresses-Sourceforge-Patch: #
1861663
Reported-by: Mike Frysinger <vapier@users.sourceforge.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 07:20:07 +0000 (02:20 -0500)]
debian: Fix all postinst/prerm/postrm scripts to include debhelper additions
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 06:19:19 +0000 (01:19 -0500)]
libss: Remove unnecessary Makefile dependency for test_ss
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 29 Dec 2007 15:19:33 +0000 (10:19 -0500)]
Update release notes, version files for 1.40.4 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 05:17:57 +0000 (00:17 -0500)]
Expand discussion of the -D option in e2fsck's man page
Add an explanation of how e2fsck might decide to optimize a few
directories even without the -D option being specified.
Addresses-Debian-Bug: #441872
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 04:35:10 +0000 (23:35 -0500)]
debian: Fix the document ID in comerr_dev.doc-base
The old document ID, com_err, used an illegal character ('_'); change
it to be comerr-manual to be conformant with the doc-base requirements.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 04:12:35 +0000 (23:12 -0500)]
Update dependencies in lib/uuid/Makefile.in
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 1 Jan 2008 03:22:46 +0000 (22:22 -0500)]
debian: Use useradd and groupadd in favor of adduser
The adduser package is 'important', and while it is often installed,
we can't guarantee that it will always be there. A required package,
or a package which is dragged in by a required package, such as
libuuid1, shouldn't depend on an 'important' package since that would
implicitly make it be required, which shouldn't be done unless
absolutely necesary.
So we replace the call to adduser with the lower-level useradd and
groupadd programs. They are part of the passwd package, which is
required to be on all Debian systems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 31 Dec 2007 22:17:39 +0000 (17:17 -0500)]
debian: build the e2fsck-static package so it works on 2.4 kernels
Some people are still running ancient Debian distributions, such as
woody, with a 2.4 kernel, and they want to be able to use the
e2fsck-static package on backlevel systems.
It turns out that we can't just statically link against glibc anymore,
since glibc now uses thread-local storage everywhere. So we now build
e2fsck-static using dietlibc.
Addresses-Debian-Bug: #458017
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 31 Dec 2007 19:43:11 +0000 (14:43 -0500)]
Fix build error in blkid/tst_types.c when using diet libc
When compiling with diet libc, <sys/types.h> must be included in order
to define the types used in asm/types.h. Strange choice, but
workable. This doesn't cause much problems for e2fsprogs except
blkid/tst_types.h, which needed a #include of <sys/types.h>.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 31 Dec 2007 19:36:48 +0000 (14:36 -0500)]
Test for sys/syscall.h in configure to fix dietlibc build problem
When compiling with dietlibc, sys/syscall.h isn't supported; as of
dietlibc 0.30, it exists but it references a non-existent asm/unistd.h
header file. So we have to test for its existence and avoid using it
in lib/uuid/gen_uuid.c if it is not supported.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 31 Dec 2007 16:20:01 +0000 (11:20 -0500)]
debian: Do not use TLS or uuidd when building the bootfloppy udeb's
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 31 Dec 2007 16:16:56 +0000 (11:16 -0500)]
Add --disable-uuidd configure option
Add a configure option which causes the uuidd helper daemon not to be
built or used by the uuid library.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 31 Dec 2007 15:45:01 +0000 (10:45 -0500)]
Add --disable-tls configure option
Add option to forcibly disable the use of thread local storage
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 30 Dec 2007 16:05:39 +0000 (11:05 -0500)]
Fix build failure on non-Linux/non-Hurd/non-Masix systems
inode_uid() and inode_gid() weren't getting defined on systems that
were not Linux, Hurd, or Masix.
Addresses-Sourceforge-Bug: #
1859778
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 27 Dec 2007 15:08:13 +0000 (10:08 -0500)]
Convert use of ext2fs_get_mem to ext2fs_get_array for overflow detection
Add some additional checks, primarily in resize2fs and in the rarely
used (and soon to-be-deprecated) e2fsck byte-swap filesystem function.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 25 Dec 2007 19:22:47 +0000 (14:22 -0500)]
Update Vietnamese translation from the Translation Project
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 25 Dec 2007 19:19:15 +0000 (14:19 -0500)]
uuidd: Avoid race conditions to that only one uuidd is started
Use an improved locking protocol based on the pid file to assure that
only one uuidd is started. Apparently the kernel does not prevent
multiple processes from racing to bind to a Unix domain socket.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Fri, 21 Dec 2007 16:32:48 +0000 (11:32 -0500)]
libuuid: Fix bug which caused uuidd to fail if sizeof(int) != sizeof(int *)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Tue, 18 Dec 2007 04:03:53 +0000 (23:03 -0500)]
Add #define needed for Hurd ioctl definitions
Addresses-Debian-Bug: #437720
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 17 Dec 2007 20:31:19 +0000 (15:31 -0500)]
debian: Add a dependency on libuuid1 to the uuid-runtime package
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 17 Dec 2007 20:26:47 +0000 (15:26 -0500)]
libuuid: Only try to start the uuidd daemon a limited number of times
If we fail to create the uuidd daemon after 5 or 6 tries, another
10,000 tries probably won't be successful.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 17 Dec 2007 20:16:44 +0000 (15:16 -0500)]
libuuid: When starting uuidd, use waitpid() to reap the zombie process
The uuidd process will fork and let the parent process exit to create
the daemon. So use waitpid to reap the zombie, as well as using it to
time when it is safe to try to connect to the daemon.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 17 Dec 2007 20:12:04 +0000 (15:12 -0500)]
uuidd: Use /var/lib/libuuid instead of /var/run/uuidd
/var/run can get completely removed at reboot, and uuidd doesn't have
permissions to recreate /var/run/uuidd. So instead use
/var/lib/libuuidd for the unix domain socket and pid files.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 17 Dec 2007 15:28:01 +0000 (10:28 -0500)]
Merge branch 'maint' into next
Conflicts:
lib/ext2fs/closefs.c
Theodore Ts'o [Sun, 16 Dec 2007 22:21:38 +0000 (17:21 -0500)]
Add uuidd daemon to prevent duplicate time-based UUID's
Also store the clock sequence information in a state file in
/var/lib/misc/uuid-clock so that if the time goes backwards the clock
sequence counter can get bumped. This allows us to completely
correctly generate time-based (version 1) UUID's according to the
algorithm specified RFC 4122.
Addresses-Sourceforge-Bug: #
1529672
Addresses-Red-Hat-Bugzilla: #233471
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 20:41:15 +0000 (15:41 -0500)]
fsck: '#' is only a comment character at the beginning of an fstab line
Fuse and ssh fstab lines such as:
wdfs#https://dav.hoster.com/foo/bar /mnt/hoster fuse user,noauto 0 0
will cause fsck to issue warnings about invalid fstab lines, because
fsck was previously treating '#' as a comment when it appeared
anywhere in an fstab line, not just at the beginning of the line.
Addresses-Gentoo-bug: #195405
Addresses-Sourceforge-bug: #
1826147
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 17:26:57 +0000 (12:26 -0500)]
blkid: Output non-printing characters using ^ and M- notation
When printing the value of tags in a formatted format, print control
characters and characters with the high eight bit set using the ^ and
M- notation, respectively. This prevents a filesystem with a garbage
label from potentially screwing up the user's screen (for example,
putting it into graphical mode).
Addresses-Ubuntu-Bug: #78087
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 04:13:05 +0000 (23:13 -0500)]
Remove Rwandan translation
Upon the advice of Benno Schulenberg; the translation had already been
removed on the Translation Project site.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 04:11:31 +0000 (23:11 -0500)]
Update Dutch and Polish translations from the Translation Project
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 03:31:03 +0000 (22:31 -0500)]
libcom_err: Fix sign-extension problem on 64-bit systems in error_message()
On 64-bit systems (or anything with sizeof(long) > sizeof(int)), we
sometimes get error codes passed to error_message which have been cast
from an (int) to an (unsigned int). This almost always happens if
you're using libgssapi_krb5, which returns an error code which is less
than 0 but is returned in an (unsigned int).
For example, -1765328377L gets cast to
2529638919, which is
0x96c73a07, not 0xffffffff96c73a07, so error_message() fails to find a
matching error table.
When error_message() then calls the error_table_name() function to get a
name to use in the "unknown code" message, it gets a correct value back.
This happens because error_table_name() drops most of the higher bits of
the parameter it's passed before doing anything else with it (&
077777777f,
or & 0xffffff). If we did the same thing in error_message(), we wouldn't
have a problem there, either.
Problem reported and fixed by: Nalin Dahyabhai
Addresses-Sourceforge-Bug: #
1809658
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 03:21:31 +0000 (22:21 -0500)]
blkid: Avoid division by zero error when probing an invalid FAT filesystem
Addresses-Sourceforge-Bug: #
1831627
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 03:09:48 +0000 (22:09 -0500)]
libss: Fix "make check" test case to work portably
The "make check" test in lib/ss would fail if '.' is not in the user's
PATH, and if the libss shared library had not yet been installed yet.
Addresses-Sourceforge-Bug: #
1848974
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 02:13:42 +0000 (21:13 -0500)]
Fix uuid_unparse man page to give a correct example UUID output string
Addresses-Debian-Bug: #444883
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Samuel Thibault [Tue, 14 Aug 2007 09:25:45 +0000 (11:25 +0200)]
Fix Debian rules files to support building non-Linux archs
Addresses-Debian-Bug: #437720
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 01:34:41 +0000 (20:34 -0500)]
Fix cross-compilation support in Debian's build rules
Addresses-Debian-Bug: #451172
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 16 Dec 2007 00:39:37 +0000 (19:39 -0500)]
ext2fs_flushfs: Remove the NEEDS_RECOVERY from the backup superblocks
Now that e2fsck tries to backup the primary superblock to the backups
when the feature sets ar different, it's important when tune2fs writes
out a changed superblock, that we filter out the
EXT3_FEATURE_INCOMPAT_RECOVER feature to the backup superblocks, since
it will be removed from the primary superblock either when the
filesystem is mounted uncleanly or when journal is replayed.
Addresses-Debian-Bug: #454926
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 9 Dec 2007 22:03:01 +0000 (17:03 -0500)]
Merge branch 'maint' into next
Conflicts:
lib/ext2fs/closefs.c
Theodore Ts'o [Mon, 3 Dec 2007 23:33:39 +0000 (18:33 -0500)]
Update release notes, version files, etc., for 1.40.3 release.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 10 Nov 2007 00:01:06 +0000 (19:01 -0500)]
libext2fs: Add checks to prevent integer overflows passed to malloc()
This addresses a potential security vulnerability where an untrusted
filesystem can be corrupted in such a way that a program using
libext2fs will allocate a buffer which is far too small. This can
lead to either a crash or potentially a heap-based buffer overflow
crash. No known exploits exist, but main concern is where an
untrusted user who possesses privileged access in a guest Xen
environment could corrupt a filesystem which is then accessed by the
pygrub program, running as root in the dom0 host environment, thus
allowing the untrusted user to gain privileged access in the host OS.
Thanks to the McAfee AVERT Research group for reporting this issue.
Addresses CVE-2007-5497.
Signed-off-by: Rafal Wojtczuk <rafal_wojtczuk@mcafee.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 6 Dec 2007 02:01:22 +0000 (21:01 -0500)]
Add Ubuntu-specific e2fsck.conf file to work around Ubuntu issues
Ubuntu has init script and installer issues which cause them to have
significant problems with time zones. This is compounded with a
relatively inexperienced user base who want to dual boot with Windows
and so have their hardware clocks tick localtime.
Addresses-Ubuntu-Bug: #131201
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 6 Dec 2007 01:46:12 +0000 (20:46 -0500)]
Update Debian policy compliance to version 3.7.3.0
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 6 Dec 2007 01:14:43 +0000 (20:14 -0500)]
gen-tarball: Ignore the Meta directory when creating the release tarballs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Thu, 6 Dec 2007 00:35:20 +0000 (19:35 -0500)]
Update Spanish translation and e2fsprogs.pot file for 1.40.3 release
Addresses-Debian-Bug: #411562
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 2 Dec 2007 10:52:40 +0000 (05:52 -0500)]
libss: Fix parallel build failure
A missing dependency on ss_err.h meant that std_rqs.o could fail when
e2fsprogs was being built using make -j.
Thanks to Robert Kerr for reporting this bug.
Addresses-Sourceforge-Bug: #
1842331
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Thu, 29 Nov 2007 18:57:35 +0000 (12:57 -0600)]
e2fsprogs: fix blkid whole-disk scanning heuristics
The heuristics in blkid/devname.c probe_all() for scanning whole disks
with no partitions assume that a device name with no digit on the end
will always be present as a delineator, i.e.:
sda
sda1
sdb
sdc
In this case, when sdc is seen, it's the clue to go back and scan sdb.
However, for something like:
sda
sda1
sdb
loop0
this falls down, and sdb is never scanned.
(thanks to Karel Zak for pointing this out).
Addresses-Red-Hat-Bugzilla: #400321
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 1 Dec 2007 12:08:45 +0000 (07:08 -0500)]
libext2fs: Fix a corner case bug in ext2fs_unlink
We cannot merge a removed directory entry to just arbitrary previous
directory entry. The previous entry must be in the same block. So
really bad things can happen when are deleting the first directory
entry in a block where the last directory entry in the previous
directory block is not in use. We fix this bug by checking to see if
the current entry is not the first one in the block before trying to
merge it to the previous entry.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Andreas Dilger [Fri, 9 Nov 2007 01:20:15 +0000 (18:20 -0700)]
fix check_mntent_file() to pass mode for open(O_CREAT)
On my FC8 install, ismounted.c fails to build because open(O_CREAT) is
used without passing a mode. The following trivial patch fixes it.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 26 Nov 2007 12:15:58 +0000 (07:15 -0500)]
Fix errors in test_ss.c so it can be an example application and test case
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Arun Thomas [Fri, 9 Nov 2007 20:46:10 +0000 (15:46 -0500)]
e2image in raw-mode appends an extra byte to image-file
In raw mode (-r), e2image appends an extra byte to the image-file's
end if the last block requires a sparse write. Consequently, the
resulting image-file is one byte larger than the original in
size. This patch fixes the problem by seeking to one less than the
given offset, so that the byte write does not overflow into the next
block.
This problem can be reproduced by doing an e2image -r dev image-file
and comparing the original and resulting image sizes. This assumes the
image is sparse at the end. For my tests, I created a 100MB sparse
image with two files.
Signed-off-by: Arun Thomas <thomasar@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 4 Nov 2007 01:01:01 +0000 (21:01 -0400)]
Merge basic FLEX_BG support
Merge commit '
c2d4300b8a4a13d8a78b86c386f76259f23feec2' into next
Jose R. Santos [Tue, 14 Aug 2007 04:32:57 +0000 (23:32 -0500)]
Enable FLEX_BG feature support
Add FLEX_BG as a supported feature bit.
Add support to mke2fs to create filesystems with FLEX_BG.
Add support to tune2fs to add (and remove, if it won't break
filesystem consistency) the FLEX_BG feature.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--
lib/e2p/feature.c | 2 ++
lib/ext2fs/ext2fs.h | 6 ++++--
misc/mke2fs.c | 7 ++++++-
3 files changed, 12 insertions(+), 3 deletions(-)
Jose R. Santos [Tue, 14 Aug 2007 04:33:03 +0000 (23:33 -0500)]
Relax group descriptor checking for FLEX_BG
The FLEX_BG feature allows the inode table, block bitmap, and inode
bitmaps to be located anywhere in the filesystem. Update e2fsck and
libext2fs's checking code to recognize this.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--
e2fsck/super.c | 14 ++++++++++++--
lib/ext2fs/check_desc.c | 15 +++++++++++++--
2 files changed, 25 insertions(+), 4 deletions(-)
Jose R. Santos [Mon, 22 Oct 2007 02:03:14 +0000 (21:03 -0500)]
lib/ext2fs/Makefile.in: Reorder some of the $(SRCS) in alphabetical order.
All files under $(OBJS) and $(SRCS) should be in alphabetical order
but this is not always the case. Let fix some some of these before
applying new files to the list of $(SRCS).
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--
lib/ext2fs/Makefile.in | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Jose R. Santos [Tue, 14 Aug 2007 04:32:51 +0000 (23:32 -0500)]
Reserve the INCOMPAT feature number for FLEX_BG.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--
lib/ext2fs/ext2_fs.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Theodore Ts'o [Thu, 1 Nov 2007 05:54:22 +0000 (01:54 -0400)]
Merge branch 'cl/remove-masix' into next
Coly Li [Thu, 23 Aug 2007 07:09:03 +0000 (15:09 +0800)]
mke2fs: remove masix support
This patch remove masix support from mke2fs.
Signed-off-by: Coly Li <coyli@suse.de>
Coly Li [Thu, 23 Aug 2007 07:08:18 +0000 (15:08 +0800)]
e2fsck: remove masix support
This patch remove masix support from e2fsck.
Signed-off-by: Coly Li <coyli@suse.de>
Coly Li [Thu, 23 Aug 2007 07:08:30 +0000 (15:08 +0800)]
libext2fs: remove masix support
This patch remove masix support from lib/ext2fs.
Signed-off-by: Coly Li <coyli@suse.de>
Coly Li [Thu, 23 Aug 2007 07:08:35 +0000 (15:08 +0800)]
document: remove masix from data structure
This patch remove masix union from data structure in ext2ed-design.sgml.
Signed-off-by: Coly Li <coyli@suse.de>
Coly Li [Thu, 23 Aug 2007 07:08:37 +0000 (15:08 +0800)]
debugfs: remove masix support
This patch remove masix supporting from debugfs.
Singed-off-by: Coly Li <coyli@suse.de>
--
Theodore Ts'o [Thu, 1 Nov 2007 05:19:32 +0000 (01:19 -0400)]
Fix typo in the summary section of the blkid man page
Addresses-SourceForge-Bug: #
1821333
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Dmitry V. Levin [Sat, 20 Oct 2007 18:10:26 +0000 (22:10 +0400)]
check_ea_in_inode: Cleanup e2fsck_write_inode_full() call
Avoid pointer cast and call e2fsck_write_inode_full() the same way
as check_inode_extra_space() does.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Dmitry V. Levin [Sat, 20 Oct 2007 18:09:30 +0000 (22:09 +0400)]
blkid.pc, ss.pc: Move private libs from "Libs:" to "Libs.private:"
According to pkg-config(1) manual page, private libraries should be
defined by "Libs.private:" line. Private libraries are libraries which
are not exposed through our library, but are needed in the case of
static linking.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Dmitry V. Levin [Sat, 20 Oct 2007 18:09:13 +0000 (22:09 +0400)]
texinfo: Fix directory entries
According to texinfo documentation, @dircategory and
@direntry...@end direntry commands are more appropriate.
For details see
http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Installing-Dir-Entries.html
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Dmitry V. Levin [Sat, 20 Oct 2007 18:08:51 +0000 (22:08 +0400)]
blkid/test_probe.in: Fix temporary files handling
Avoid placing files with predictable names in /tmp.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Dmitry V. Levin [Sat, 20 Oct 2007 18:08:40 +0000 (22:08 +0400)]
Check fgets(3) return value
When fgets() function fails, contents of the buffer is undefined. That
is, fgets() return value needs to be checked, to avoid undefined behavior.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Dmitry V. Levin [Sat, 20 Oct 2007 18:08:20 +0000 (22:08 +0400)]
e2image: Fix potential off-by-one fs_device_name buffer overflow
In write_image_file(), fix length argument of strncat(3) call.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 22:11:24 +0000 (18:11 -0400)]
Merge branch 'tt/badblocks-cleanup' into next
Theodore Ts'o [Mon, 22 Oct 2007 14:19:20 +0000 (10:19 -0400)]
badblocks: Factor out calls to strtoul to a helper function
The strtoul() function has a lot of messy error checking that needs to
be done; by factoring it out into one place we can make sure it's done
right in all of the places where it is called.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 14:09:05 +0000 (10:09 -0400)]
badblocks: Change unsigned long to blk_t and unsigned int, as appropriate
This will make it easier for us to support 64-bit block numbers when
the time comes. Not that running badblocks on a > 4TB machine is
anything I want to contemplate!
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 13:51:50 +0000 (09:51 -0400)]
badblocks: Use unsigned int instead of unsigned long for test patterns
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 14:19:20 +0000 (10:19 -0400)]
badblocks: Factor out calls to strtoul to a helper function
The strtoul() function has a lot of messy error checking that needs to
be done; by factoring it out into one place we can make sure it's done
right in all of the places where it is called.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 14:09:05 +0000 (10:09 -0400)]
badblocks: Change unsigned long to blk_t and unsigned int, as appropriate
This will make it easier for us to support 64-bit block numbers when
the time comes. Not that running badblocks on a > 4TB machine is
anything I want to contemplate!
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 13:51:50 +0000 (09:51 -0400)]
badblocks: Use unsigned int instead of unsigned long for test patterns
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 12:51:39 +0000 (08:51 -0400)]
chattr: provide an exit code in case of failure and add -f flag
Fix chattr so that if there are errors, it will report it via a
non-zero exit code. It will now explicitly give errors when
attempting to set files that are not files or directories (which are
currently not supported under Linux). The -f flag will suppress error
messages from being printed, although the exit status will still be
non-zero.
Addresses-Red-Hat-Bugzilla: #180596
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Theodore Ts'o [Mon, 22 Oct 2007 12:25:13 +0000 (08:25 -0400)]
libe2p: Change iterate_on_dir so that it counts non-zero returns
To allow error messages to be reflected up, if the callback function
returns a non-zero value, bump a counter and return the number of
times the callback function signals an error by returning a non-zero
status code.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 22 Oct 2007 05:36:13 +0000 (01:36 -0400)]
libe2p: Use lstat() instead of stat() in fsetflags() and fgetflags()
We can't set the flags on symbolic links, so check for them using
lstat().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Mon, 15 Oct 2007 20:24:56 +0000 (16:24 -0400)]
Merge branch 'maint' into next
Theodore Ts'o [Mon, 15 Oct 2007 20:20:54 +0000 (16:20 -0400)]
mke2fs: Change usage message to use -E instead -R, which is deprecated
The -R option is only used for backwards compatibility, and -E is
preferred, so change the usage message accordingly.
Signed-off-by: Coly Li <coyli@suse.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Mon, 15 Oct 2007 17:48:44 +0000 (12:48 -0500)]
libblkid: recognize squashfs filesystems on BE systems.
squashfs has no uuid or labels, so all we need is the magic
(for big-endian too!)
Addresses-Red-Hat-Bugzilla: #305151
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Valerie Clement [Thu, 30 Aug 2007 15:38:13 +0000 (17:38 +0200)]
libext2fs: Add EXT2_DESC_SIZE and EXT2_DESC_PER_BLOCK macros
Add macros to support variable-length group descriptors for ext4.
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Valerie Clement [Thu, 30 Aug 2007 15:33:40 +0000 (17:33 +0200)]
libext2fs: cleanup usage of unsigned int or __u32 and replace it with blk_t
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Valerie Clement [Thu, 30 Aug 2007 15:31:36 +0000 (17:31 +0200)]
libext2fs: use ext2fs_group_first_block() instead of open-coded equivalent
Use ext2fs_group_first_block() instead of the open-coded equivalent in
ext2fs_super_and_bgd_loc() and ext2fs_descriptor_block_loc().
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 14 Oct 2007 15:23:20 +0000 (11:23 -0400)]
Add blk64_t type definition
This will be used for all new functions so we can gradually move
e2fsprogs to support 64 bit blocks.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Eric Sandeen [Tue, 25 Sep 2007 17:02:50 +0000 (12:02 -0500)]
libblkid: detect squashfs
libblkid: recognize squashfs filesystems
squashfs has no uuid or labels, so all we need is the magic.
Addresses-Red-Hat-Bugzilla: #305151
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Theodore Ts'o [Sat, 6 Oct 2007 16:41:26 +0000 (12:41 -0400)]
Merge branch 'maint'
Theodore Ts'o [Mon, 1 Oct 2007 13:18:54 +0000 (09:18 -0400)]
e2fsck: backup superblocks if key constants have changed
If the primary superblock differs from the backup superblock in
certain key respects, force a full check (if e2fsck was invoked in
preen mode). If the filesystem check passes cleanly, and the
filesystem was opened in read/write mode, then write the primary
superblock to all of the backups.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sat, 6 Oct 2007 16:37:08 +0000 (12:37 -0400)]
e2fsck: update the backup superblocks if the feature bitmasks are changed
If e2fsck adds or deletes any of the feature bitmasks, clear
EXT2_FLAG_MASTER_SB_ONLY so the backup superblocks are updated when
e2fsck finishes.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Sep 2007 15:39:24 +0000 (11:39 -0400)]
ext2fs_dblist_dir_iterate: Fix ABORT propagation logic
ext2fs_dblist_dir_iterate() calls ext2fs_dblist_iterate(), which calls
ext2fs_process_dir_block(), which in turn calls the helper function
db_dir_proc() which calls callback function passed into
ext2fs_dblist_dir_iterate(). At each stage the conventions for
signalling requests to abort the iteration or to signal errors
changes, db_dir_proc() was not properly mapping the abort request back
to ext2fs_dblist_iterate().
Currently db_dir_proc() is ignoring errors (i/o errors or directory
block corrupt errors) from ext2fs_process_dir_block(), since the main
user of ext2fs_dblist_dir_iterate() is e2fsck, for which this is the
correct behavior. In the future ext2fs_dblist_dir_iterate() could
take a flag which would cause it to abort if
ext2fs_process_dir_block() returns an error; however, it's not clear
how useful this would be since we don't have a way of signalling the
exact nature of which block had the error, and the caller wouldn't
have a good way of knowing what percentage of the directory block list
had been processed. Ultimately this may not be the best interface for
applications that need that level of error reporting.
Thanks to Vladimir V. Saveliev <vs@clusterfs.com> for pointing out
this problem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Sep 2007 13:50:11 +0000 (09:50 -0400)]
libblkid: Add more magic numbers that might mean there is a FAT filesystem
The FAT filesystem doesn't have its superblock with a set of magic
strings in a fixed location. Therefore, we must also check for the
FAT filesystem if it looks like we have an MBR at the beginning of the
partition. We previously checked if the first byte was a jump
instruction but that missed some USB disks with only one bootable
partition. Now we check for the MBR signature (0x55AA at offset 510)
as well as any partition where byte 0 is \351 or \353.
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o [Sun, 23 Sep 2007 12:20:51 +0000 (08:20 -0400)]
e2fsck: Don't mark the filesystem invalid because of time errors
If superblock mount time or last write time is in the future, and the
user refuses to fix the problem, don't mark the filesystem as being
invalid and needing to be checked.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>